I\'m writing an application that uses the following code to draw an edittext on the screen over running applications:
WindowManager.LayoutParams params = new
My bad.. I realized if I remove the WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE it works fine.. silly mistake
i resolved this issue by using FLAG_NOT_FOCUSABLE
Programatically:
editText.requestFocus();
Or through XML:
<EditText...>
<requestFocus />
</EditText>
Use WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
WindowManager.LayoutParams params = new WindowManager.LayoutParams(
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.TYPE_PHONE,
WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL,
PixelFormat.TRANSLUCENT);
For more detail and example follow the link: https://github.com/atifmahmood29/overlays-floating-window-like-facebook-messenger