Reputation: 648
I have few editText in ScrollView. If there are many editTexts, and they exceed the display, everything works fine, but if they doesnt, and soft keyboard is opened, I cant scroll it(keyboard covers few of them). My layout:
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<EditText
android:layout_width="200dp"
android:layout_height="wrap_content"
/>
<EditText
android:layout_width="200dp"
android:layout_height="wrap_content"
/>
<EditText
android:layout_width="200dp"
android:layout_height="wrap_content"
/>
<EditText
android:layout_width="200dp"
android:layout_height="wrap_content"
/>
<EditText
android:layout_width="200dp"
android:layout_height="wrap_content"
/>
</LinearLayout>
</ScrollView>
Any suggestions?
Upvotes: 0
Views: 2031
Reputation: 273
I added this field in the ScrollView tag:
android:isScrollContainer="false"
Upvotes: 1
Reputation: 1259
You may need to change the "windowSoftInputMode" for the activity in your manifest file:
android:windowSoftInputMode="adjustResize"
I would try that.
Upvotes: 0
Reputation: 7425
You can use windowSoftInputMode attribute for your activity and set it to "adjustResize". This will make room for your soft keyboard.
<activity android:windowSoftInputMode="adjustResize" />
Upvotes: 0