No, best way is to create seperate values folders values
, values-v14
, and values-v21
. Best practice for now is to use Theme.Appcompat, it's available if you use extend AppcompatActivity
class
<!-- Main Base Theme -->
<style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
</style>
You can modify your styles inside each folder if you want your app to look different for android versions 14 and below, above 14 but below 21, or 21 and above.
You can change part after Theme.AppCompat
however you like, NoActionBar is useful if you wish to use Toolbar from Design library of Android.