android 隐藏标题栏代码 无效
this.requestWindowFeature(Window.FEATURE_NO_TITLE);这段代码没有作用在xml加android:theme="@andro...
this.requestWindowFeature(Window.FEATURE_NO_TITLE);这段代码没有作用
在xml加android:theme="@android:style/Theme.NoTitleBar.Fullscreen",运行会报错
为什么啊
public class MainActivity extends ActionBarActivity {
GameSurfaceView view;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
view=new GameSurfaceView(this);
setContentView(view);
}
} 展开
在xml加android:theme="@android:style/Theme.NoTitleBar.Fullscreen",运行会报错
为什么啊
public class MainActivity extends ActionBarActivity {
GameSurfaceView view;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
view=new GameSurfaceView(this);
setContentView(view);
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询