频道栏目
IT货架 > > 正文
Android 自定义title
网友分享于:Jan 1, 1970 8:00:00 AM    来源: IT货架   

标签:android   style   blog   http   color   java   io   ar   2014   

requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);   
		setContentView(Res.layout(this, "layout_select"));   //软件activity的布局
		getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, Res.layout(this, "layout_title_bar"));  //titlebar为自己标题栏的布局
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
		


<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">

    <style name="PayHubWindowTitleBackground">
        <item name="android:background">@color/title_bg</item>
    </style>

    <style name="TitleBar_Pay_Hub" parent="android:Theme">
        <item name="android:windowTitleBackgroundStyle">@style/PayHubWindowTitleBackground</item>
    </style>
    
    <style name="TitleTheme" parent="android:Theme">      
          
        <!-- Window attributes -->  
        <item name="android:windowTitleBackgroundStyle">@style/PayHubWindowTitleBackground</item> 
        <item name="android:windowTitleSize">@dimen/title_height</item>
    </style>

</resources>


<activity
            android:name="com.lenovo.newui.SelectActivity"
            android:configChanges="keyboardHidden|orientation|navigation"
            android:screenOrientation="portrait"
            android:theme="@style/TitleTheme" >
        </activity>


Android 自定义title

标签:android   style   blog   http   color   java   io   ar   2014   

相关板块推荐 iPhone WindowsPhone

广告服务联系QQ:1134687142 | 网站地图

版权所有: IT货架- 内容来自互联网,仅供用于技术学习,请遵循相关法律法规. 京ICP备11030978号-1