How can I configure EditTextPreference to have scroll bar
In my android application, I have a EditTextPreference as one of my preferences in my PreferenceActivity. My question is how I can add a 'scroll bar' for the text of the EditText Preference? Sometime when the text is too long and when the 'soft keyboard' pops up, I don't see the buttons of the edit text dial开发者_运维百科og.
Thank you.
You can access the EditText of the EditTextPreference programmatically via getEditText()
and then call setMovementMethod(new ScrollingMovementMethod())
on your EditText to make it scrollable.
Or you can set any EditText attributes on the EditTextPreference XML like android:scrollbars="vertical"
.
精彩评论