First, the focus problem of EditText
Problem Description: When the page contains only two edittext, want to hide the input method, and remove the edittext focus (only to remove focus, because you need to listen to focus changes to do some of the action), but because the interface of the focus can not be removed, After each clearfocus, the system will re-find a control that can focus from the interface, and then the first edittext will always onfocus again to get to the focus.
Workaround:
Add the following to the layout of edittext so that layout can get foucus, and you can get focus before the child controls, and at the same time, the layout calls Requestfocus at Clearfocus. The focus is shifted from edittext to layout, which solves the problem of the EditText control gaining focus. Reference: Http://stackoverflow.com/questions/14424654/how-to-clear-focus-for-edittext
Android:descendantfocusability= "Beforedescendants"
Android:focusableintouchmode= "true"
Android Work Problem Solving record