Requestwindowfeature (window.feature_custom_title); Setcontentview (Res.layout (This, "layout_select")); The layout of the Software activity GetWindow (). Setfeatureint (Window.feature_custom_title, Res.layout (This, "Layout_title_bar")); TitleBar for the layout of its own title bar 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 Custom Title