In the development process, you may encounter the problem: When a long interface is just initialized at the end of the default is not the top, but a control, such as ListView, you may also encounter the edittext of their own pop-up soft keyboard problems and so on. In fact, these are the focus of access to the problem, do not want to have such a small bug to focus on the issue of access to reasonable control. Most people add this property to a control when they initialize it:
Xxx.setfocusable (FALSE);
In fact, Android provides the focus-controlled properties when creating XML layout files:
Android:descendantfocusability= "Blocksdescendants"
Explain the corresponding attributes and corresponding expressions.
This property is the relationship between the ViewGroup and its child controls when a view gets the focus.
The value of the property has three kinds:
Beforedescendants:viewgroup takes precedence over its child class controls and gets the focus
Afterdescendants:viewgroup gets focus only when its subclass control does not need to get focus
Blocksdescendants:viewgroup overrides the subclass control and gets the focus directly