Home » , » Apply Material Theme to Activity

Apply Material Theme to Activity

Posted by Android Flash Firmware on Thursday, July 28, 2016


This video show how to apply Android provided Material Theme to your Activity.


- Edit values/styles.xml to add a new style inherits from Android provided Material Theme: android:Theme.Material, android:Theme.Material.Light or android:Theme.Material.Light.DarkActionBar.

- Edit AndroidManifest.xml to use the new style.

- You have to change your MainActivity extends Activity. Otherwise the following error will happen:
You need to use a Theme.AppCompat theme (or descendant) with this activity.

The video also show how it display on Multi-Window Mode.


Next:
- Customize theme's colors


0 comments:

Post a Comment

Popular Posts

Blog Archive

.comment-content a {display: none;}