首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

Android 批改Window属性

2012-07-01 
Android 修改Window属性自定义标题栏requestWindowFeature(Window.FEATURE_CUSTOM_TITLE)getWindow().set

Android 修改Window属性
自定义标题栏

requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,R.layout.custom_title);



custom_title.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/screen"    android:layout_width="match_parent" android:layout_height="match_parent"    android:orientation="vertical">    <TextView android:id="@+id/left_text"        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_alignParentLeft="true"        android:text="@string/custom_title_left" />    <TextView android:id="@+id/right_text"        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_alignParentRight="true"        android:text="@string/custom_title_right" /></RelativeLayout>



热点排行