EditText is embedded in ListView, which causes Android keyboard crash. edittext android
Today, I encountered a strange problem. When I clicked EditText on my hammer and Samsung mobile phone, the keyboard flashed and fell back. I did not find this problem on other mobile phones, and I did not find it after searching for a long time, after that, I finally found the answer on StackOverFlow and shared the answer here.
Http://stackoverflow.com/questions/20406472/edittext-in-listview-loses-focus-when-pressed-on-android-4-x
The reason is that when EditText is in ListView, when EditText gets the focus, the ActionBar will take the focus away, causing the keyboard to flash and exit.
The solution is as follows:
First, add
Android: descendantFocusability = "beforeDescendants"
Then add
Android: windowSoftInputMode = "adjustPan"
Run it again.
If you feel helpful to yourself, I hope you can help me with it. Thank you :)
Blog: http://blog.csdn.net/zhaoxy2850
Address: http://blog.csdn.net/zhaoxy_thu/article/details/45200285
Please indicate the source for reprinting. Thank you!