0
我想管理多行編輯文本控件相對於設備屏幕高度的高度。高度應該是屏幕的40%。xamarin android如何通過屏幕高度增加多行編輯文本高度?
我已經使用了最大線條,線條和最小線條屬性。如果我設置了這些屬性,那麼高度確實會改變,但是如果屏幕高度改變或者設備轉移到水平,那麼編輯文本將不在屏幕上。總之,多行編輯文本高度必須是動態的,並且屏幕大小。它應該隨着屏幕尺寸的其他控制而縮小和擴大。
截圖:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:focusableInTouchMode="true"
android:background="#e8eeff">
<EditText
android:id="@+id/etTextMultiLine"
android:inputType="textMultiLine"
android:gravity="top|left"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:scrollbars="vertical"
android:hint="Enter a Text"
android:background="@layout/EditTextStyle"
android:textColorHint="#404144"
android:textColor="#404144"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:padding="5dp" />