1、代码实现
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
//==============注意要在加载setContentView(R.layout.main)之前设置,不然程序崩溃===============
//无title
requestWindowFeature(Window.FEATURE_NO_TITLE);
//全屏
getWindow().setFlags(WindowManager.LayoutParams. FLAG_FULLSCREEN ,
WindowManager.LayoutParams. FLAG_FULLSCREEN);
//==============注意要在加载setContentView(R.layout.main)之前设置,不然程序崩溃===============
setContentView(R.layout.main);
}
2、在AndroidManifest.xml的Activity 属性中设置
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
<activity android:name="com.dapai178.chesshall.ExpandableListViewTest"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>