Method 1. You can add a line of code to the OnCreate method of the Mainactivity
Requestwindowfeature (Window.feature_no_title);
This general mainaactivity is inherited from the activity, and this sentence must be written in front of the Setcontentview () method.
Method 2: Add attributes in Androidmanifest.xml
Android:theme= "@android: Style/theme.notitlebar"
Add a property to the application tag, the entire app has no title bar (below), and if you just want an activity that doesn't have a title bar, add the attribute to the Activity tab.
<?xml version= "1.0" encoding= "Utf-8"? ><manifest xmlns:android= "http// Schemas.android.com/apk/res/android " package=" Leetle.game.llkan " android:versioncode= "1" android:versionname= "1.0" > <uses-sdk android:minsdkversion= " " android:targetsdkversion= " /> <application" android:allowbackup= "true" android:icon= "@drawable/ic_launcher" android:label= "@string/app_name" android:theme= "@android: style/ Theme.notitlebar " > <activity aNdroid:name= "Leetle.game.llkan.activity.MainActivity" android:screenorientation= "Portrait" android:label= "@string/app_name" > <intent-filter> <action android:name= "Android.intent.action.MAIN" /> <category Android:name= "Android.intent.category.LAUNCHER" /> </intent-filter> </activity > </application></manifest>
I've only used these two methods at this time, if there are other ways to add them.
2015.01.02
Li Yengiang
Android App-Remove title bar