Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System Overlay Window causes touch problems for keyboard and back button

I'm trying to create an app like the Halo Notification on Paranoid Android. So far, so good.

However, when my "halo" is on the screen I can move it around just fine and most of the touch events do work. However, when I try popping the keyboard up by tapping on an EditText nothing happens. The window seems to consume the focus. The back button also doesn't work, but the home and recent apps buttons work.

I'm testing the application on a rooted Nexus 4 running PA's AOSP 4.4

The code (layout parameters) I have used to create the halo window is:

 WindowManager.LayoutParams params = new WindowManager.LayoutParams(
        WindowManager.LayoutParams.WRAP_CONTENT,
        WindowManager.LayoutParams.WRAP_CONTENT,
        WindowManager.LayoutParams.TYPE_SYSTEM_ERROR,
        WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL,
        PixelFormat.TRANSLUCENT);

Any idea what's causing this selective consumption of touch events?

like image 302
Karthik Balakrishnan Avatar asked Dec 07 '13 04:12

Karthik Balakrishnan


1 Answers

Try to add the flag: FLAG_NOT_FOCUSABLE .

like image 151
Pitty Avatar answered Oct 12 '22 23:10

Pitty