Android Hide the title bar in 2 ways

2010年10月6日 星期三

Android 隱藏標題列 狀態列

隱藏標題列
In android programming, we can hide the title bar in 2 ways.
Hiding the title bar is used to show the full screen in browser,game related applications, etc.

First method is through AndroidManifest.xml.
Use below source in your androidmanifest.xml to hide the title bar.

<activity android:name=".your class Name"
android:theme="@android:style/Theme.NoTitleBar"
</activity>

Second method is through coding
//before setContentView
requestWindowFeature(Window.FEATURE_NO_TITLE);


隱藏status bar。
//hide system status bar
final Window win = getWindow();
win.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);

0 意見:

張貼留言

  © Blogger template The Professional Template II by Ourblogtemplates.com 2009

Back to TOP