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應用程序? –