adnroid actionbar属性

<span style="background-color: rgb(102, 102, 102);"><resources>
    
    <style name="Theme.FullScreen" parent="android:style/Theme.Holo.Light">
        <item name="android:windowFullscreen">true</item>
        <item name="android:actionBarStyle">@style/Holo.ActionBar</item>
        <item name="android:windowContentOverlay">@null</item>		//没有actionbar和下面部分的分割线
        <item name="android:actionOverflowButtonStyle">@style/MyOverflowButton</item>	//actionbar上溢出按钮风格
    </style>
    
    <style name="Holo.ActionBar" parent="@android:style/Widget.Holo.ActionBar">
        <item name="android:displayOptions">useLogo|showTitle</item>
        <item name="android:background">@android:color/transparent</item>	
        <item name="android:backgroundStacked">@null</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:titleTextStyle">@style/ActionBarTitle</item>	//actionbar字体风格
    </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">@drawable/mtk_ic_menu_overflow</item>  
    </style> 
    
    <style name="ActionBarTitle" parent="@android:style/TextAppearance.Holo.Large">
    <item name="android:textColor">@android:color/white</item>
    <item name="android:textSize">20sp</item>
</style>
</resources></span>




actionBar = getSupportActionBar();
actionBar.setHomeButtonEnabled(false);
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setDisplayShowHomeEnabled(true);
actionBar.setDisplayShowTitleEnabled(true);
actionBar.setTitle("My Profile");
actionBar.setDisplayUseLogoEnabled(false);

你可能感兴趣的:(android,Actionbar,属性)