본문 바로가기

프로그래밍/Android 짜투리 지식

[android] listView의 touch 순서를 바꾸고자 할때

보통은 listview -> child item 순서인데

descendantFocusability 로 해결가능

본문

Defines the relationship between the ViewGroup and its descendants when looking for a View to take focus.

Must be one of the following constant values.

ConstantValueDescription
beforeDescendants0The ViewGroup will get focus before any of its descendants.
afterDescendants1The ViewGroup will get focus only if none of its descendants want it.
blocksDescendants2The ViewGroup will block its descendants from receiving focus.

This corresponds to the global attribute resource symbol descendantFocusability.

Related Methods