【发布时间】:2015-11-30 19:28:05
【问题描述】:
在我的 android 应用程序中,我想在编辑文本视图中设置 2 行的限制。
我在我的设计中设置:
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textViewBarcode"
android:textSize="13sp"
android:textColor="@color/DefaultGreen"
android:inputType="text"
android:hint="@string/HintBarcode"
android:textColorHint="@color/DefaultGreen"
android:textIsSelectable="false"
android:singleLine="false"
android:height="20dp"
android:editable="false"
android:maxlines="2"/>
但这不起作用
应该可以在 textview 中进行一次返回 - 但仅此而已。 这可能吗??
【问题讨论】:
-
android:marlines="2" 和 singleLine="false"
-
抱歉,错误的值。再看一遍。就是这样