13

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?

sockeqwe
  • 15,574
  • 24
  • 88
  • 144

2 Answers2

13

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

David
  • 3,971
  • 1
  • 26
  • 65
CNBorn
  • 1,338
  • 3
  • 9
  • 9
11

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)

Raghunandan
  • 132,755
  • 26
  • 225
  • 256
  • But does `FragmentActivity` get more updates / bugfixes than `android.app.Activity` or is `FragmentActivity` simply some kind of wrapper class that will call the methods of `android.app.Activity`? – sockeqwe Jul 27 '14 at 17:02
  • @sockeqwe `FragmentActivty` is the base class for SupportBased Fragment's. You understood wrong. This has nothing to do with updates or bugfixes. It has to do with what api levels you want your app to run on. – Raghunandan Jul 27 '14 at 17:04
  • Yeah, you are right. But what about components like `FragmentManager`. Is there any code in support v4 that will be used in Android Honeycomb and above. What Im trying to ask / say is, does support v4 fixes some bugs that may occur in native Activty / Fragment from `android.app` package? I mean, the Play Services library is an external library to allow google to update this library more often (probably also for doing bugfixes more often) ... Does support v4 brings any of this advantages like play services do? – sockeqwe Jul 27 '14 at 17:12
  • @sockeqwe nothing do with bug fixes. You have FragmentManager natively http://developer.android.com/reference/android/app/FragmentManager.html. Support library is for api level below 11. Some features like actionbar is not available natively below 11. Fragments were introduced in 11. So if you want your app with fragments to support below 11 you will use support based fragments from support library. **Nothing to do wth bug fixes/updates**. If you develop for api level above 14 don't think about AppCompat – Raghunandan Jul 27 '14 at 17:16
  • ok, thank you very much! So I will use Activity and Fragment from the `android.app` package. However, there are some other things like NotificationCompat for android wear that I may will use, but that depends on my app requirements. Thanks! – sockeqwe Jul 27 '14 at 17:19