Android - 窗口中的多个EditText字段调整大小

ape*_*ure 6 android android-layout

在我的一个观点中,我有三个EditText领域.前两个是单行,第三个是多行.我正在使用android:windowSoftInputMode="stateVisible|adjustResize".但是当IME出现并且它具有焦点时,第三个字段在纵向模式下折叠太小.

是否可以选择设置最小高度,以强制窗口向下滚动以容纳第三个字段?

我已经尝试设置android:minHeight="20dip"xml的文件,但这并没有影响.

EditText问题是这样的:

<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">
Run Code Online (Sandbox Code Playgroud)

谢谢.

ape*_*ure 2

android:minHeight 确实有效,但父视图需要包装在 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>
Run Code Online (Sandbox Code Playgroud)