Android TV full screen without title, androidtv

Source: Internet
Author: User

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);

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.