在Android應用程序的MainActivity的onCreate()函數中加代碼便可: web
public class MainActivity extends Activity {ide
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);函數
//隱去標題欄(應用程序的名字)
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,this
//隱去狀態欄部分(電池等圖標和一切修飾部分)
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
}
}
spa