Converting my Application Theme to Lollipop

Boardy

I am currently working on some changes to my app to properly target the new Android 5.0 Lollipop that has just been released.

I have the following in my styles.xml files in the values-v21 directory

<resources>

    <!-- Application theme. -->
    <style name="AppTheme" parent="android:Theme.Material.Light">
        <item name="android:actionBarStyle">@style/MyActionBar</item>
        <item name="android:actionBarTabTextStyle">@style/actionBarTabStyle</item>
        <item name="android:actionMenuTextColor">@color/white</item>
    </style>

    <style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
        <item name="android:background">@color/appPrimaryColour</item>
    </style>

    <style name="actionBarTabStyle" parent="@android:style/Widget.Holo.ActionBar.TabText">
        <item name="android:textColor">@color/white</item>
    </style>

</resources>

I've changed the theme but I have customised my action bar with the following for the old Holo theme

<style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">

and

<style name="actionBarTabStyle" parent="@android:style/Widget.Holo.ActionBar.TabText">

I can't find what the equivalent would be for Lollipop, I've tried @android:style/Widget.Material.Light.ActionBar.Solid.Inverse @android:style/Widget.Material.ActionBar.TabText" but it then says it can't find the resources.

alanv

Just extend from Theme.Material.Light.DarkActionBar, which sets up the action bar theme to point to Theme.Material (dark) values for background and foreground colors. Also, you should be setting colorPrimary, colorPrimaryDark, and colorAccent in your AppTheme rather than manually setting the action bar background color.

<style name="AppTheme" parent="android:Theme.Material.Light.DarkActionBar">
    <item name="android:colorPrimary">@color/appPrimaryColour</item>
    <item name="android:colorPrimaryDark"> ... </item>
    <item name="android:colorAccent"> ... </item>
</style>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Converting my Application Theme to Lollipop

From Dev

Lollipop Theme issue

From Dev

Transparent Theme Crashes in Lollipop

From Dev

Transparent Theme Crashes in Lollipop

From Dev

Using theme for my Qt widget application

From Dev

Theme for settings (preferences) post lollipop

From Dev

How to get Holo Light theme working in my Xamarin application

From Dev

Can't change colorAccent from my application's theme

From Dev

Change the theme of my whole android studio application confusion

From Dev

ActionMode Material theme in pre-Lollipop

From Dev

Set a theme on a View programmatically on Android 5.0 Lollipop

From Dev

android Theme.Holo.Light.DarkActionBar on lollipop

From Dev

Will the Kitkat application will run in Lollipop version

From Dev

Set application theme in Qt

From Dev

Installing theme for Yii Application

From Dev

Angular theme is not compiling in application

From Dev

How to use Visual Studio 11 Dark Theme on my own WPF application?

From Dev

My wordpress theme error

From Dev

Theme.AppCompat.DayNight doesn't work on Android Lollipop

From Dev

Theme.AppCompat.DayNight doesn't work on Android Lollipop

From Dev

New theme product gives "ValueError: Theme my.theme is not available"

From Dev

Converting a Java Applet to an Application

From Dev

Converting a laravel application to lumen

From Dev

Converting application JS to CoffeeScript

From Dev

Strange behavior of android theme Theme.AppCompat.Light.NoActionBar in Lollipop+ devices

From Dev

Android lollipop emulator Nexus S not running the application

From Dev

sinch force close on application start on android lollipop

From Dev

Application crashes when checking license in Lollipop

From Dev

Application installed on Android Lollipop, but blocked from running

Related Related

  1. 1

    Converting my Application Theme to Lollipop

  2. 2

    Lollipop Theme issue

  3. 3

    Transparent Theme Crashes in Lollipop

  4. 4

    Transparent Theme Crashes in Lollipop

  5. 5

    Using theme for my Qt widget application

  6. 6

    Theme for settings (preferences) post lollipop

  7. 7

    How to get Holo Light theme working in my Xamarin application

  8. 8

    Can't change colorAccent from my application's theme

  9. 9

    Change the theme of my whole android studio application confusion

  10. 10

    ActionMode Material theme in pre-Lollipop

  11. 11

    Set a theme on a View programmatically on Android 5.0 Lollipop

  12. 12

    android Theme.Holo.Light.DarkActionBar on lollipop

  13. 13

    Will the Kitkat application will run in Lollipop version

  14. 14

    Set application theme in Qt

  15. 15

    Installing theme for Yii Application

  16. 16

    Angular theme is not compiling in application

  17. 17

    How to use Visual Studio 11 Dark Theme on my own WPF application?

  18. 18

    My wordpress theme error

  19. 19

    Theme.AppCompat.DayNight doesn't work on Android Lollipop

  20. 20

    Theme.AppCompat.DayNight doesn't work on Android Lollipop

  21. 21

    New theme product gives "ValueError: Theme my.theme is not available"

  22. 22

    Converting a Java Applet to an Application

  23. 23

    Converting a laravel application to lumen

  24. 24

    Converting application JS to CoffeeScript

  25. 25

    Strange behavior of android theme Theme.AppCompat.Light.NoActionBar in Lollipop+ devices

  26. 26

    Android lollipop emulator Nexus S not running the application

  27. 27

    sinch force close on application start on android lollipop

  28. 28

    Application crashes when checking license in Lollipop

  29. 29

    Application installed on Android Lollipop, but blocked from running

HotTag

Archive