You want to customize the title of the activity page in oncreateCodeAs follows:
Final window = getwindow (); Boolean usetitlefeature = false; If (window. getcontainer () = NULL) {usetitlefeature = Window. requestfeature (window. feature_custom_title);} setcontentview (resource. layout. liftinspection); If (usetitlefeature) {window. setfeatureint (window. feature_custom_title, R. layout. inspection_title );}
Android 4.0 works normally, but the following error is reported in version:
Cannot combine custom title with other title features
The reason is that android thinks that you have set the Activity title and then tries to merge the custom title.
The solution is empirical:
Add a new theme such as mytheme to the styles file,
Add the following active configuration items to the androidmaniest file:
Android: theme = "@ Android: style/mytheme"
(Do not use apptheme)