区别:FragmentActivity is a subclass of Activity that was built for the Android Support Package.

The FragmentActivity class adds a couple new methods to ensure compatibility with older versions of Android, but other than that, there really isn't much of a difference between the two. Just make sure you change all calls to getLoaderManager() and getFragmentManager() to getSupportLoaderManager() and getSupportFragmentManager() respectively.


使用:use Activity if you are using android.app.Fragment; use FragmentActivity if you are using android.support.v4.app.Fragment. Never attach a android.support.v4.app.Fragment to a android.app.Activity, as this will cause an exception to be thrown.

http://stackoverflow.com/questions/10477997/difference-between-activity-and-fragmentactivity


更多相关文章

  1. Android(安卓)对象序列化 Serializable实现与Parcelabel实现的区
  2. 802.11(wifi)中SSID、BSSID、ESSID的区别
  3. getExternalFilesDir()与getExternalStorageDirectory()区别
  4. Android(安卓)fill_parent、wrap_content和match_parent的区别
  5. Flutter系列之UI篇:flutter与android UI构建的区别—flutter widg
  6. Android比iOS卡得原因和本质区别总结
  7. android的Thread、Runnable、Asyntask的区别与联系
  8. android相对布局中@id和@+id的区别(原理)
  9. Hbuilder集成个推时Android和ISO中推送的区别

随机推荐

  1. android音乐文件乱码显示问题解决
  2. Android Volley.jar包下载
  3. generateDefaultLayoutParams()
  4. Android多进程加载资源失败问题分析:andr
  5. Android intent.Action 参数值及对应功能
  6. 我对IT的一点了解
  7. Android 中Preferences的使用!
  8. Android(安卓)获取签名证书的详细信息(Ecl
  9. android SharedPreferences 使用
  10. Android之Sqlite模糊查询