Some material design are only supported starting from android 21 API , so for this purpose we need to provide alternative styles that will work on devices running earlier version . (like they say in documentation ) .
for example :
res/values/styles.xml
res/values-v21/styles.xml
They also have mentioned V7 support library that includes Material design styles .
From here I am little bit confused !
Suppose that my default theme extends from Theme.AppCompat
.
Why Should I provide an alternative style for 21 api knowing that Theme.AppCompat
is made for compatibility ?
You should do so to use functionalities from api 21 that does not previously exist. For exemple, on api 21 and later you can make the statusbar translucent, and this is not done by default with the appcompat, because that's not the default behavior.