首页 > 其他 > 详细

自定Action Bar Style

时间:2014-08-28 17:04:11      阅读:203      评论:0      收藏:0      [点我收藏+]
<!-- Base application theme is the default theme. -->
	<style name="Theme" parent="android:Theme"></style>

	<!-- Variation on the Holo Light theme that styles the Action Bar -->
	<style name="Theme.AndroidDevelopers" parent="android:style/Theme.Holo.Light">
		<item name="android:selectableItemBackground">@drawable/ad_selectable_background</item>
		<item name="android:popupMenuStyle">@style/MyPopupMenu</item>
		<item name="android:dropDownListViewStyle">@style/MyDropDownListView</item>
        <item name="android:actionBarTabStyle">@style/MyActionBarTabStyle</item>
        <item name="android:actionDropDownStyle">@style/MyDropDownNav</item>
        <item name="android:listChoiceIndicatorMultiple">@drawable/ad_btn_check_holo_light</item>
        <item name="android:listChoiceIndicatorSingle">@drawable/ad_btn_radio_holo_light</item>
		<!--<item name="android:actionOverflowButtonStyle">@style/MyOverflowButton</item>-->
	</style>
	
	<!-- style the overflow menu -->
	<style name="MyPopupMenu" parent="android:style/Widget.Holo.Light.ListPopupWindow">
		<item name="android:popupBackground">@drawable/ad_menu_dropdown_panel_holo_light</item>	
	</style>
	
	<!-- style the items within the overflow menu -->
	<style name="MyDropDownListView" parent="android:style/Widget.Holo.ListView.DropDown">
		<item name="android:listSelector">@drawable/ad_selectable_background</item>
	</style>

    <!-- style for the tabs -->
    <!-- <style name="MyActionBarTabStyle" parent="android:style/Widget.Holo.Light.ActionBarView_TabView"> -->
        <style name="MyActionBarTabStyle">
        <item name="android:background">@drawable/actionbar_tab_bg</item>
        <item name="android:paddingLeft">32dp</item>
        <item name="android:paddingRight">32dp</item>
    </style>
	
	<!-- style the list navigation -->
	<!-- <style name="MyDropDownNav" parent="android:style/Widget.Holo.Light.Spinner.DropDown.ActionBar"> -->
	<style name="MyDropDownNav" parent="android:style/Widget.Holo.Light.Spinner">
		<item name="android:background">@drawable/ad_spinner_background_holo_light</item>
		<item name="android:popupBackground">@drawable/ad_menu_dropdown_panel_holo_light</item>
		<item name="android:dropDownSelector">@drawable/ad_selectable_background</item>
	</style>

	<!-- the following can be used to style the overflow menu button
	     only do this if you have an *extremely* good reason to!! -->
	<!--<style name="MyOverflowButton" parent="@android:style/Widget.Holo.ActionButton.Overflow">
		<item name="android:src">@android:drawable/ic_menu_view</item>
		<item name="android:background">@drawable/action_button_background</item>
	</style>-->


自定Action Bar Style

原文:http://my.oschina.net/bv10000/blog/307676

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!