Android TV full screen without title, androidtv
If you want all windows to have no title in full screen, modify
Res \ values \ styles. xml allows you to set themes and styles.
<Resources> <! -- Base application theme, dependent on API level. this theme is replaced by AppBaseTheme from res/values-vXX/styles. xml on newer devices. --> <style name = "AppBaseTheme" parent = "android: Theme. light "> <! -- Theme customizations available in newer API levels can go in res/values-vXX/styles. xml, while customizations related to backward-compatibility can go here. --> </style> <! -- Application theme. --> <style name = "AppTheme" parent = "AppBaseTheme"> <! -- Set no title --> <item name = "android: windowNoTitle"> true </item> <! -- Set full screen --> <item name = "android: windowFullscreen"> true </item> <! -- All mizmizations that are NOT specific to a special API-level can go here. --> </style> </resources>
Use the following two methods to set a single window:
1. Modify AndroidManifest. xml
<activity android:name=".Convert" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
Android: theme = "@ android: style/Theme. NoTitleBar. Fullscreen"
2. Set in the code
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);this.requestWindowFeature(Window.FEATURE_NO_TITLE);