NEXTGENINTL
NEXTGENINTL

Reputation: 33

How to use 2 themes

I have created two themes from here and here, but the two themes are quite the opposite; the first one changes the action bar color and has the name Theme.Example whereas the other changes the colors of buttons and other widgets, but not the action bar, with the name Example. In the mainfest file, it appears you can only insert one theme at a time, but I would like to know how to use both. Thank you.

Upvotes: 0

Views: 42

Answers (1)

nbe_42
nbe_42

Reputation: 1222

You can use inheritance pattern for resources !

<style name="Example" parent="@style/Theme.Example">

All attributes from Theme.Example will be used in the theme Example.

And in your manifest :

<application android:theme="@style/Example">

Upvotes: 1

Related Questions