I am using android studio 1.0
Trying to make material design app that is compatible with older versions of android too...
Made new blank project, Added compile 'com.android.support:appcompat-v7:21.0.3'
dependency to the gradle file
Still no luck :/
Anyone please help me out....
-
3Just create it. What's the problem? – Simon Dec 25 '14 at 20:01
-
@Simon I can't add theme.material if i create the file manually – Salmaan Dec 25 '14 at 20:14
-
Please refer this.. it solved my issue http://stackoverflow.com/questions/27553431/values-21-folder-is-gone-after-android-studio-1-0 – Srikanth P Mar 20 '15 at 11:23
3 Answers
Create the values-v21 folder and create styles.xml Inside styles.xml choose Material Theme.

- 3,070
- 3
- 16
- 24
-
Open your main.xml. select Graphical Layout. Look for Theme drop down menu. From there you can select Material Theme. If your sdk is updated. Theme.Material will be listed in that Theme drop down. – ch3tanz Dec 26 '14 at 10:00
-
-
It was in older versions of Android Sudio. In Android Studio 1.0 you have to create by yourself. Check your SDK version update it to Android 5.0 (Api 21). And you will be good to go.
Maintain material design Compatibility to older version of Android by following this link. https://developer.android.com/training/material/compatibility.html
Cheers..

- 4,498
- 8
- 38
- 59
If you want to make a material design app that is compatible with older versions of Android, you really need to include the library
'com.android.support:appcompat-v7:21.+'
And make some changes to your app. This link shows a pretty good how to
http://android-developers.blogspot.com.br/2014/10/appcompat-v21-material-design-for-pre.html
The most importante change is the new Toolbar, that you can eather include in every layout you want, or work with "ActioBarActivities". Again, reading this official blog post will help you.
But, as the title of your question said, you can create a folder called "values-21" and put a new "style.xml", that will target only Android Lollipop. In this file, you can extend android:Theme.Material
and use some features that are only present in Android 5.0, like ripples and some animations.

- 2,122
- 3
- 21
- 30