黑马程序员技术交流社区
标题:
安卓 android:lines="5"
[打印本页]
作者:
mengxiang1993
时间:
2015-3-11 22:33
标题:
安卓 android:lines="5"
已经在视图中写了android:lines="5"
EditText 并没有显示出5行,还是1行,难道是因为布局是LInearLayout?必须是相对布局?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/tv_input"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/input_number"
android:textSize="20dp" />
<EditText
android:id="@+id/et_input_number"
android:singleLine="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="phone" />
<TextView
android:id="@+id/tv_input_cotent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/input_content"
android:textSize="20dp" />
<EditText
android:id="@+id/et_input_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:lines="5" />
<Button
android:id="@+id/btn_send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/send_number"/>
</LinearLayout>
复制代码
效果图:还是一行
QQ图片20150311223303.jpg
(27.94 KB, 下载次数: 3)
下载附件
2015-3-11 22:33 上传
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/)
黑马程序员IT技术论坛 X3.2