In one of my views, I have three EditText
fields. The first two are single-line, and the third is multi-line. I'm using android:windowSoftInputMode="stateVisible|adjustResize".
however the third field collapses far too small in portrait mode when the IME comes up and it has focus.
Is there an option to set a minimum height that would force the window to scroll down to accommodate the third field?
I have tried setting android:minHeight="20dip"
in the xml
file, but this has no effect.
The EditText
in question looks like:
<EditText
android:id="@+id/msgreplyarea"
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:gravity="top"
android:layout_weight="1"
android:layout_marginLeft="10dip" android:layout_marginRight="10dip"
android:layout_marginTop="10px"
android:inputType="textCapSentences|textMultiLine"
android:imeOptions="flagNoEnterAction">
Thanks.
android:minHeight does work, but the parent view needs to be wrapped in a ScollView
<ScrollView
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:scrollbarStyle="outsideInset"
android:fillViewport="true">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<EditText
android:id="@+id/replyarea"
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:gravity="top"
android:singleLine="false" android:layout_weight="1"
android:layout_marginLeft="10dip" android:layout_marginRight="10dip"
android:layout_marginTop="10px"
android:minHeight="120dp"
android:inputType="textAutoCorrect|textCapSentences|textMultiLine"
android:imeOptions="flagNoEnterAction" />
</LinearLayout>
</ScrollView>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With