Search code examples
androidandroid-theme

How to Update App to (native?) Material design


I see that Google updated some apps (like Hangout) to the new Material Design.

How can I do that too? I have a Nexus 5(Android 4.4), but if I set the Theme in the styles.xml to "android: style / Theme.Material", Android Studio reports (of course) API 21 +: Android L (Preview) needed.

How has Google done this?


Solution

  • You need to use appcompat v21 - material design for pre-Lollipop devices. To use the same (if you are on android studio) Update your SDK and add appcompat as a dependency in your build.gradle:

    dependencies {  
        ...
        compile "com.android.support:appcompat-v7:21.0.0"
    }
    

    And i guess you are ready to go code using material design for pre L devices.

    You can read more about it here.