自定义标题栏
custom_title.xml
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>
自定义标题栏设置
本文介绍了如何使用Android自定义标题栏的方法,通过调用特定API实现窗口自定义标题功能,并展示了具体的XML布局文件示例。

2016

被折叠的 条评论
为什么被折叠?



