Reputation: 1105
Want to know the actual difference between RequestFocus
and ReqeustFocusFromTouch
. When should each be used, how should each be used, and in which situations is each helpful?
Give some examples and explain them in detail.
Upvotes: 8
Views: 2708
Reputation: 69744
From official doc
View
or to one of its descendants. A View
will not actually take focus if it is not focusable (isFocusable()
returns false),requestFocus()
that will allow views that are not focusable in touch mode to request focus when they are touched.Returns
boolean
Whether this view or one of its descendants actually took focus.
Upvotes: 4