In android,sometimes our focus may lost,where is the reason

if we has a ViewGroup,and the viewGroup is focusable.in this case ,we should the attribute :

android:descendantFocusability = blocksDescendants (if descendants don't need focus)
android:descendantFocusability = beforeDescendants (if descendants need focus)

if we set nothing,the focus may lost(or not visible)
原文地址:https://www.cnblogs.com/jianglijs/p/8108361.html