Should I use AppCompat v7 if minsdk is 14

喜夏-厌秋 提交于 2019-12-21 03:40:03

问题


should I still use app compat v7 if my app has minSdk = 14?

Is there any advantage with ActionBar in Android L ?

Should I use android.support.v4.app.FragmentActivity from support v4 or should I use the android.app.Activity class (which has support for fragments since honeycomb)?

Should I also use android.app.Fragment or android.support.v4.app.Fragment?

I guess that I should use support v4 FragmentActivity and Fragment, but there is no need for app compat v7, right?

What do you think?


回答1:


AppCompat is used for api level below 11. Since 11 you have action bar natively. So there is no need to use AppCompat on api levle 11 and above.

Extend Activtiy and use Fragment ( not android.support.v4.app.Fragment)




回答2:


If you want to use Material Design style for SDK 14+, you should also use AppCompat v7:21.0.+

You app can use Material as its main theme, and functional from API 7.

More info you can check this link



来源:https://stackoverflow.com/questions/24983239/should-i-use-appcompat-v7-if-minsdk-is-14

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!