0

I use standart EditTextPreference but on different Android versions it looks differently:

API 7 enter image description here

API 10 enter image description here

enter image description here

How can I achieve good view? Maybe resize keyboard or something else?

Konstantin.Efimenko
  • 1,242
  • 1
  • 14
  • 38

1 Answers1

0

This helped me solve the problem:

https://stackoverflow.com/a/8481314/1752613

public class MyEditTextPreference extends EditTextPreference
{
    public MyEditTextPreference(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected void showDialog(Bundle bundle) {
        super.showDialog(bundle);

        Dialog dialog = getDialog();
        if(dialog != null) {
            Window window = dialog.getWindow();
            window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE |
                WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
        }
    }
}
Community
  • 1
  • 1
Konstantin.Efimenko
  • 1,242
  • 1
  • 14
  • 38