【发布时间】:2012-08-13 11:31:19
【问题描述】:
在我的应用程序中,我将屏幕方向锁定为纵向。但是当用户点击编辑文本框时我正在更改它。在纵向模式下它工作正常。但在横向模式下编辑文本高度几乎是实际大小的两倍。下面给出的是我用于编辑文本的 xml。
<EditText
android:id="@+id/mylist_AddNewFFtext"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@drawable/mylist_stdcenterelement"
android:imeOptions="actionSend|actionGo|actionDone"
android:inputType="text|textCapWords"
android:maxLength="1000"
android:padding="5dp"
android:textColor="@android:color/black"
android:textSize="14sp"
android:textStyle="bold"
android:visibility="visible" />
我已删除 weight=1 属性。但它不起作用。我该如何解决这个问题?
【问题讨论】:
-
将宽度和高度更改为“wrap_parent”,这意味着视图将足够大以包含其内容。
-
那么在我开始输入之前编辑框的大小将是零仪式?
-
不,它不会是零!试试这个。
-
是的,尺寸不为零......但它不能解决我的问题:(
标签: android size android-edittext orientation-changes