I dont like to do much stuff in layout with xml, but I can read it well and everything is working. Why this warning is there ? I can disable it for sure, but I just don't understand it. I just want that bottom view catch click events so they don't get under, this seems working good and clickable is doing it, so I don't need focusable there at all, but I see it...
Focusable means that it can gain the focus from an input device like a keyboard. Input devices like keyboards cannot decide which view to send its input events to based on the inputs itself, so they send them to the view that has focus.
clickable - Defines whether this view reacts to click events.
Focusable in touch mode is a property that you can set yourself either from code or XML.
For accessibility purposes. For instance, if the user is navigating through the keyboard, they can not move onto the clickable item without focusable attribute, hence cannot click.
Reference: https://android.googlesource.com/platform/tools/base/+/studio-master-dev/lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/KeyboardNavigationDetector.java?autodive=0%2F
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