尝试请求没有倾斜杆时,应用程序崩溃

时间:2015-05-22 05:53:42

标签: android android-studio

当我尝试请求没有标题栏时,我的应用程序崩溃了

  

super.onCreate(savedInstanceState);           this.requestWindowFeature(Window.FEATURE_NO_TITLE);                this.getWindow()。setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,                 WindowManager.LayoutParams.FLAG_FULLSCREEN);           的setContentView(R.layout.activity_main);

2 个答案:

答案 0 :(得分:0)

this.requestWindowFeature(Window.FEATURE_NO_TITLE)

之前致电super.onCreate(savedInstanceState)

答案 1 :(得分:0)

在你的style.xml中编写以下代码:

r(function(){
    alert('DOM Ready!');
});
function r(f){/in/.test(document.readyState)?setTimeout('r('+f+')',9):f()}

将此主题应用于您要隐藏操作栏的活动

<style name="NoAB" parent="Theme.AppCompat.Light.NoActionBar"></style>