Custom Preference Including EditText
I am creating an custom preference which contains an EditText
.
The problem is when user clicks the EdiText
for input suggestion box opens up and EditText
looses focus. When Edit开发者_高级运维Text
is clicked again for input, no problem occurs until 'blank space' is entered, which results in suggestion box and hence loss of focus.
What I mean by suggestion box is the box which pops up when entering text in EditText
You can disable Auto Suggestion by using android:inputType="textFilter"
attribute in your XML file.
Another solution that worked for me: In AndroidMenifest.xml add android:windowSoftInputMode="adjustPan" in the activity.
Found here: http://www.mail-archive.com/android-developers@googlegroups.com/msg132688.html
精彩评论