super.onCreate(savedInstanceState);
前只需添加这让画面全屏this.setTheme(android.R.style.Theme_NoTitleBar_Fullscreen);
OR
添加this.requestWindowFeature(Window.FEATURE_NO_TITLE);
和 this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN)
前setContentView
例如:
@Override
public void onCreate(Bundle savedInstanceState){
/**sets Theme and Style (must be set BEFORE super.onCreate)*/
this.setTheme(android.R.style.Theme_NoTitleBar_Fullscreen);
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
OR
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
/**Changes Window. Removes title and/or notification bar (must be set BEFORE setContentView)*/
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
(或者你也可以通过舱单做得一样什么homer_simpson说。)
这是原生的Android或Java代码。使用Sencha Touch 2,我们正在编写JavaScript,然后编译成APK。我不认为我可以用这个抱歉。 除非您知道在我将它编译为APK之前如何将Java代码添加到我的Sencha Touch 2应用程序? –