开发者

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

Custom Preference Including 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜