最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Android 開發(fā)隱藏標(biāo)題欄的方法總結(jié)

 更新時(shí)間:2017年04月27日 15:42:50   作者:WrBug  
這篇文章主要介紹了android 開發(fā)隱藏標(biāo)題欄的方法總結(jié)的相關(guān)資料,需要的朋友可以參考下

android 開發(fā)隱藏標(biāo)題欄的方法總結(jié)

1. 推薦?。ㄒ?yàn)楝F(xiàn)在工程都默認(rèn)的為AppTheme)

在value/styles.xml里面添加自定義屬性

<resources xmlns:android="http://schemas.android.com/apk/res/android">
  <!-- Application theme. -->
  <style name="AppTheme" parent="AppBaseTheme">
    <item name="android:windowNoTitle">true</item>
</resources>

 2.

public class MainActivity extends Activity{
  @Override
  protected void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    // 隱藏標(biāo)題欄
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    // 隱藏狀態(tài)欄
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
    WindowManager.LayoutParams.FLAG_FULLSCREEN);
    //一定要放在setContentView()之前!
    setContentView(R.layout.activity_main);
  }
}

3.

<!-- 同時(shí)隱藏狀態(tài)欄和標(biāo)題欄 -->
<activity
  android:name="com.ysj.demo.MainActivity"
  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
  android:label="@string/app_name" >
  <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
  </intent-filter>
</activity>
 

4.打開項(xiàng)目文件AndroidManifest.xml ,打開Application選擇TAB頁,在頁面下方的Application Nodes中點(diǎn)選擇相應(yīng)的類,   配置右側(cè)的Theme屬性。

在彈出選擇框中點(diǎn)選"system Resources",選擇Theme.NoTitleBar項(xiàng)目,然后重新打開頁面就行了

感謝閱讀,希望能幫助到大家,謝謝大家對(duì)本站的支持!

相關(guān)文章

最新評(píng)論

南开区| 华坪县| 石楼县| 乳山市| 景东| 彭州市| 长乐市| 秦安县| 儋州市| 普安县| 明星| 恭城| 融水| 清水县| 贺州市| 三台县| 黔西| 古丈县| 延津县| 武定县| 交口县| 凤城市| 西藏| 稻城县| 双柏县| 柳州市| 上栗县| 郎溪县| 津南区| 普格县| 修文县| 东辽县| 大洼县| 西安市| 望城县| 峡江县| 元朗区| 铜川市| 芦溪县| 烟台市| 德江县|