G1的屏幕的分辨率是320×480,虽说不小但也谈不上大,所以有的应用要使用起来,最好还是希望把状态栏(Status Bar)和标题栏(Title Bar)也隐藏了,这样就可以有更大的屏幕空间给应用程序。


@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);

final Window win = getWindow();
// No Statusbar
win.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);

// No Titlebar
requestWindowFeature(Window.FEATURE_NO_TITLE);

setContentView(R.layout.mylayout);
}

摘自anddev

Tags:

6 Responses to “如何设置隐藏标题栏和状态栏?”

  1. 原来是这样弄的。





  2. If you are willing to buy real estate, you will have to get the business loans. Furthermore, my mother commonly utilizes a financial loan, which seems to be really useful.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>