开发者

Android full Screen flag gives an exception

开发者 https://www.devze.com 2022-12-31 00:47 出处:网络
In my android app I set this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN );

In my android app I set

this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
                                WindowManager.LayoutParams.FLAG_FULLSCREEN );

Then my touch screen event doesnt’ work any more.

Further Explaining, I have a button and onClick it changes the contentView by setContentView(R.layout.choose_player);. It works fine. B开发者_如何学编程ut if you take the focus to the button by the trackball(making it yellow) and tap on it, it gives the exception.

java.lang.IllegalArgumentException: parameter must be a descendant of this view


just remove "this" from your call. Then it would look like as below... getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);

0

精彩评论

暂无评论...
验证码 换一张
取 消