Wednesday 15 July 2015

window managers - Android WindowManager.Layoutparams.flags to detect dispatchKeyEvent() -


I have a CustomView which extends RelativeLayout, im using this layout with the following Flags WindowManager.addView () method Adding to the screen is

  final integer flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH;   

dispatchKeyEvent () is overridden in the CustomView class, but after the window is not being called when I add the button dispatchKeyEvent (back to press it).

If I remove WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE from the flag, then the dispatchKeyEvent () is called, but im not able to detect touch events inside the customView.

Please suggest the flag combination through which my customView can detect both touch and key events and also touch out the scene

Please delete me post if it is duplicate. After the text "itemprop =" text ">

got the answer, just add the focus flag dynamically when your view is visible, add focus flag. When it removes its invisible flag to send touch events to other scenes.

1 comment:

  1. Giuseppe: Window Managers - Android Windowmanager.Layoutparams.Flags To Detect
    Dispatchkeyevent() - >>>>> Download Now

    >>>>> Download Full

    Giuseppe: Window Managers - Android Windowmanager.Layoutparams.Flags To Detect
    Dispatchkeyevent() - >>>>> Download LINK

    >>>>> Download Now

    Giuseppe: Window Managers - Android Windowmanager.Layoutparams.Flags To Detect
    Dispatchkeyevent() - >>>>> Download Full

    >>>>> Download LINK 3x

    ReplyDelete