Current location - Recipe Complete Network - Complete cookbook - The difference between android.support.v4.app.fragment and android.app.Fragment
The difference between android.support.v4.app.fragment and android.app.Fragment
The minimum version supported by 1. is different. The minimum compatible version of android.app.Fragment is Android: minsdkversion = "11",that is, version 3.0 of Android. support.v4.app.fragment, and the minimum compatible version is Android: minsdkversion = "4 "for version 1.6. 2.jar package splits Android. Support.v4.app.fragment needs to be imported. 3. The method adopted in the activity is different from that of android.app.fragment (listfragment). Getfragmentmanager()。 Findfragmentbyid (r.id.userlist), inherited activityandroid.support.v4.app.fragment, obtained by using (list fragment) getSupportFragmentManager (). Findfragmentbyid (r.id.userlist), and it needs to inherit Android. support.v4.app.fragmentactivity.