android resize layout when keyboard appears

android, java

Solution

I believe the problem is this line

`android:configChanges="keyboardHidden|orientation|screenSize"`

in your code. This line tells the `Android` that your `Activity` will handle this 3 events on its own. If you remove this line, i believe you will have the desired effect.

See here for the `configChanges` attribute.

Problem

I would like to reposition layout when keyboard appears, for example when editing a text field, in order to get visibility on focused field. I tried windowSoftInputMode but I cannot get any difference. How to reach it? Thank you. ``` <activity android:name="com.xxxx.projecte1.TabBar_Activity" android:theme="@android:style/Theme.NoTitleBar" android:configChanges="keyboardHidden|orientation|screenSize" android:windowSoftInputMode="adjustResize" /> ```

Original source

Related problems