본문 바로가기
프로그래밍 놀이터/안드로이드, Java

[android] custom actionbar theme example

by 돼지왕 왕돼지 2014. 3. 10.
반응형


 android, custom actionbar theme example  


<App Theme For Actionbar>

<style name="MyActionBarTheme" parent="@style/Theme.AppCompat.Light">

    <item name="actionBarStyle">@style/MyActionBar</item>

    <item name="android:actionBarStyle" tools:targetApi="11">@style/MyActionBar</item>


    <item name="actionBarTabTextStyle">@style/MyActionBarTabText</item>

    <item name="android:actionBarTabTextStyle" tools:targetApi="11">@style/MyActionBarTabText</item>

</style>

 

<Actionbar Theme>

<style name="MyActionBar" parent="@style/Widget.AppCompat.Light.ActionBar.Solid">

    <item name="android:background">@color/bg_actionbar</item>

    <item name="background">@color/bg_actionbar</item>


    <item name="titleTextStyle">@style/MyActionBarTitleText</item>

    <item name="android:titleTextStyle" tools:targetApi="11">@style/MyActionBarTitleText</item>

</style>


<Actionbar Title Theme>

 <style name="MyActionBarTitleText" parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title">

    <item name="android:textColor">#ffffff</item>

</style>


<Actionbar Tab Theme>

<style name="MyActionBarTabText" parent="@style/Widget.AppCompat.Light.ActionBar.TabText">

    <item name="android:textSize">15sp</item>

</style>







반응형

댓글