I want to scroll up the entair screen up when keyboard opened like below.How to do that?
Asked
Active
Viewed 583 times
-1
-
1use `android:windowSoftInputMode="adjustResize"` in your activity tag n see – Charuක Mar 02 '17 at 12:33
-
Please refer [link1](http://stackoverflow.com/questions/1964789/move-layouts-up-when-soft-keyboard-is-shown) and [link2](http://stackoverflow.com/questions/9111813/how-to-move-the-layout-up-when-the-soft-keyboard-is-shown-android) for your refrence – vijay chhalotre Mar 02 '17 at 12:58
-
android:windowSoftInputMode="adjustResize this one working fine – m.v.n.kalyani Mar 03 '17 at 09:51
-
but if i implement in my project not woking.not at all scrolling. – m.v.n.kalyani Mar 03 '17 at 09:52
3 Answers
0
Apply android:windowSoftInputMode="adjustPan|adjustResize" with activity tag in manifest file.
-
android:windowSoftInputMode="adjustPan|adjustResize" not working for me – m.v.n.kalyani Mar 03 '17 at 09:50
-
use android:windowSoftInputMode="adjustResize" and put your layout in scrollview. – Vaibhavi Mar 03 '17 at 11:01
0
android:windowSoftInputMode="adjustPan|adjustResize"
and put complete layout in LinearLayout and ScrollView & define
layout_height="0dp"
layout_weight="1"
Note: No view have parameter layout_height="match_parent"
KKSINGLA
- 1,284
- 2
- 10
- 22
0
I had also same issue just adding a single line to my AndroidManifest file's activity.
<activity
android:name=".activities.YOURACTIVITY"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustResize|stateVisible"/>
If you want keyboard should appear with start Activity then use stateVisible otherwise use stateHidden.
Here the most important value is the adjustResize. This will shift the whole UI up to give room for the softkeyboard.
Garg
- 2,731
- 2
- 36
- 47