No window to dispatch pointer action 0

项目“Heal Your Body”

今天发现,所有button的点击事件都无法响应,连touch事件也没有了,唉,痛苦啊,


logcat提示:

09-05 15:12:47.229: WARN/WindowManager(59): No window to dispatch pointer action 0
09-05 15:12:47.343: WARN/WindowManager(59): No window to dispatch pointer action 1


solution:

http://www.eoeandroid.com/thread-52726-1-1.html


原来在baseActivity里:

requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.TYPE_STATUS_BAR, WindowManager.LayoutParams.TYPE_STATUS_BAR); //症结所在


给window设置了一个特殊的flag后,如果这个flag的值太大,就会是触摸屏失去clickable

WindowManager.LayoutParams.TYPE_STATUS_BAR的值为2000

需要改成1024以下:(WindowManager.LayoutParams.FLAG_FULLSCREEN的值为1024)


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


同样实现了全屏显示,但是又不会使触摸事件消失




你可能感兴趣的:(Dispatch)