Custom theme

In this post you create your custom theme.

Custom theme

The first step is generate the drawable.

The second step import AppCompat library.

The third step in res/values-v14/style.xml

<!-- general styles for the action bar -->

<style>
<item name="android:popupMenuStyle">@style/PopupMenu.Example</item>
        <item name="android:dropDownListViewStyle">@style/DropDownListView.Example</item>
        <item name="android:actionBarStyle">@style/MyTheme.ActionBarStyle</item>
        <item name="android:actionBarTabStyle">@style/ActionBarTabStyle.Example</item>
        <item name="android:actionDropDownStyle">@style/DropDownNav.Example</item>
        <item name="android:actionBarStyle">@style/ActionBar.Solid.Example</item>
        <item name="android:actionModeBackground">@drawable/cab_background_top_example</item>
        <item name="android:actionModeSplitBackground">@drawable/cab_background_bottom_example</item>

</style>
<style>
<item name="android:background">@drawable/ab_solid_example</item>
        <item name="android:backgroundStacked">@drawable/ab_stacked_solid_example</item>
        <item name="android:backgroundSplit">@drawable/ab_bottom_solid_example</item>
        <item name="android:textColor">@color/blue</item>
        <item name="android:titleTextStyle">@style/MyTheme.ActionBar.TitleTextStyle</item>
</style>

<style>
<item name="android:textColor">@color/white</item>
<item name="android:textStyle">bold</item>

</style>

<style>
<item name="android:background">@drawable/ab_transparent_example</item>
<item name="android:progressBarStyle">@style/ProgressBar.Example</item>
</style>

<style>
<item name="android:popupBackground">@drawable/menu_dropdown_panel_example</item>
</style>

<style>
<item name="android:listSelector">@drawable/menu_dropdown_panel_example</item>
</style>

<style>
<item name="android:background">@drawable/tab_selected_example</item>
</style>

<style>
<item name="android:background">@drawable/spinner_ab_default_example</item>
<item name="android:popupBackground">@drawable/menu_dropdown_panel_example</item>
<item name="android:dropDownSelector">@drawable/menu_dropdown_panel_example</item>
</style>

<!-- this style is only referenced in a Light.DarkActionBar based theme -->

<style>
<item name="android:popupMenuStyle">@style/PopupMenu.Example</item>
<item name="android:dropDownListViewStyle">@style/DropDownListView.Example</item>
</style>

Leave a Reply

Your email address will not be published. Required fields are marked *