Android - EditTextPreference does not close keyboard once dialog dismissed
Asked Answered
C

0

6

I'm building a settings screen using PreferenceFragment within PreferenceActivity. Everything works fine other than an annoying issue where the soft keyboard stays visible after an EditTextPreference dialog has been closed, either by tapping Cancel, OK or tapping outside the dialog.

This is the first app I've built using API level 15 (4.0.3). My previous app was for API level 8 (2.2) and just used PreferenceActivity for its settings (no fragment). In that app, the keyboard always closes automatically on tapping Cancel, OK or outside the dialog - no code required.

Is it now normal to have to code the closing of the keyboard after dismissing an EditTextPreference dialog? If so which event to I need to use to trap this?

Codification answered 16/4, 2015 at 11:19 Comment(4)
you could set android:imeOptions="actionDone", once done is pressed it will automatically close the keyboard, I think keyboard should be closed when Edittext lose the focusTheroid
tapping the Done/Finished button on the keyboard just closes the keyboard and leaves the EditTextPreference dialog on screen.Codification
check this out #19218082Theroid
I have the same problem as the OP. It is very annoying.Miletus

© 2022 - 2024 — McMap. All rights reserved.