One of the flags in WindowManager.LayoutParams is FLAG_LOCAL_FOCUS_MODE. It is used together with Window.setLocalFocus method. Unfortunately, the documentation describes the method very succinctly: "Set focus locally". What does it mean? What does it do?
A window with local focus does not report focus changes to the window manager.
While I suspect this is mainly used for automated testing, a real world use case would be an input method for Android TV implemented using Button widgets. You want to be able to focus your buttons in response to dpad navigation, but you don't want these events reported to the window manager because if they are, the window manager will unfocus the window the user is typing in, causing the input method manager to close the input method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With