difference between `focusable` and `clickable`

AndroidFocusClickable

Android Problem Overview


What is the difference between clickable and focusable in android?

Android Solutions


Solution 1 - Android

Clickable means that it can be clicked by a pointer device or be tapped by a touch device. 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.

Solution 2 - Android

Focusable means ACTION_UP event will occur. It will gain it and it won't release it.

Clickable means ACTION_DOWN first and ACTION_UP at the end. It will gain and release it at the end.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestioneugeneView Question on Stackoverflow
Solution 1 - AndroidK-balloView Answer on Stackoverflow
Solution 2 - AndroidRajeshVijayakumarView Answer on Stackoverflow