Android设置无标题的方法
在onCreate()中写入:
requestWindowFeature(Window.FEATURE_NO_TITLE);
例如:
protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.peoplepage);
这里要注意:
requestWindowFeature(Window.FEATURE_NO_TITLE);要放在setContentView的前面。否则程序会崩溃。