The Android UI default title bar is defined by Android:label, displayed in the upper-left corner of the screen, and Android allows the activity to customize the title bar, using custom layout to reset the title bar, such as the Windows Mobile style title bar.
App->activity->custom Title re-defines the activity title bar as a left or right two text box whose layout definition r.layout.custom_title_1 as follows
<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>
is a left and right two text box.
For each activity, in addition to using the Content view set by Setcontentview, there is also a Windows class object that controls the title bar, allows you to customize the title bar, or does not display the title bar.
Windows defines some FEATURE that allow developers to make customizations: the FEATURE ID corresponding to the custom title bar is Window.feature_custom_title
Requestwindowfeature (window.feature_custom_title);
Setcontentview (r.layout.custom_title);
GetWindow (). Setfeatureint (Window.feature_custom_title, r.layout.custom_title_1);