星空网 > 软件开发 > 操作系统

Android TV 全屏无标题

想要全部窗口全屏无标题,修改

res\values\styles.

<resources>  <!--     Base application theme, dependent on API level. This theme is replaced     by AppBaseTheme from res/values-vXX/styles.      Theme customizations available in newer API levels can go in      res/values-vXX/styles. customizations related to      backward-compatibility can go here.    -->  </style>  <!-- Application theme. -->  <style name="AppTheme" parent="AppBaseTheme">    <!-- 设置无标题-->    <item name="android:windowNoTitle">true</item>    <!-- 设置全屏-->    <item name="android:windowFullscreen">true</item>    <!-- All customizations that are NOT specific to a particular API-level can go here. -->  </style></resources>

 

如果要单个窗口设置用如下2个方法

1. 修改AndroidManifest.

    <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. 在代码中设置

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);this.requestWindowFeature(Window.FEATURE_NO_TITLE);

 





原标题:Android TV 全屏无标题

关键词:Android

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流