android GridView item中组件获取焦点

项目中在使用GridView控件时,里面的item有imageView、buttion等子控件。 html

可是GridView默认焦点是让item获取焦点,因此要使子控件获取焦点的话,要在gridview的属性中设置: android

android:descendantFocusability="afterDescendants" spa


http://developer.android.com/reference/android/view/ViewGroup.html#attr_android:descendantFocusability htm

相关文章
相关标签/搜索