Remove the title of the app
Use this code: Requestwindowfeature (Window.feature_no_title)
Using the report in Android Studio:
caused By:android.util.AndroidRuntimeException:requestFeature () must be called before adding content
Workaround:
APP title after Android 4.0, called Actionbar by default activity is with Actionbar, remove Actionbar way with the following several:
the second type is recommended, the first test fails
1. In the configuration file through Android:theme= "" No Actionbar topics:
<activity
Android:name= ". Mainactivity "
Android:label= "@string/app_name"
<!--This line of code can hide Actionbar--
Android:theme= "@android: Style/theme.light.notitlebar" >
<intent-filter>
<action android:name= "Android.intent.action.MAIN"/>
<category android:name= "Android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
2. Hide in Activity code:
public class Mainactivity extends Activity {
@Override
protected void OnCreate (Bundle savedinstancestate) {
Super.oncreate (savedinstancestate);
Setcontentview (R.layout.activity_main);
ActionBar ActionBar = Getactionbar ();Get Actionbar
actionbar.hide ();Hide Actionbar
}
}
Remove the title of the app