Difference between focusable and focusableInTouchMode?

后端 未结 4 904
野性不改
野性不改 2020-12-07 15:50

I want to know the actual difference between them... When should each be used, how should each be used, and in which situations is each helpful?

Give some examples a

4条回答
  •  孤城傲影
    2020-12-07 16:12

    Focused is a state for view and generally focus can be changed with trackball and dpad. Your view can have different background when state is focused.

    Focusable in touch mode allows view to gain focus when user is touching the view, good example of this kind of component is EditText.

    With Button or any clickable component pressed state is usually what you are interested in.

提交回复
热议问题