I used the XML syntax to create a PreferenceActivity with a PreferenceScreen. I added an EditTextPreference and noticed that this renders as a dialog. Is there a way to make the EditText in-place i.e., the text field is displayed right in the PreferenceScreen instead of popping up as a dialog?
I used the XML syntax to create a PreferenceActivity with a PreferenceScreen . I
Share
In case anyone comes across the same problem, this cannot be accomplished with the built-in Preference classes, but you can subclass
Preference, and overridegetView()to return aViewGroupcontaining an in-lineEditText(or simply theEditTextitself).You could probably achieve this by providing the
android:layoutattribute in the XML too (although I haven’t tried this).EDIT:
I tried the
android:layoutapproach above, and it works pretty well.