quemb / QMBForm

Create simple Android forms
MIT License
180 stars 43 forks source link

Why is adjustPan needed for EditText based rows? #29

Open ljdelavega opened 7 years ago

ljdelavega commented 7 years ago

In your README you have this: Attention! If you use EditText based form elements, make sure you set "windowSoftInputMode" to "adjustPan"

Do it in your manifest:

<activity android:windowSoftInputMode="adjustPan"/> Or programmatically in the onCreate method of your activity

@Override protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);

}

Why is this needed? I have run into some issues due to "adjustPan" (like rows covering the system status bar and random focus issues with soft keyboards) and would like to use the "adjustResize" option but when I try it, the keyboard just flashes up and down and I can't enter anything.

Is there a special reason why we must use "adjustPan"?