edittext 随文字换行 而高度增加
来源:互联网 发布:空知英秋 神乐门 知乎 编辑:程序博客网 时间:2024/06/06 05:28
<EditText android:id="@id/shareadd_content" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="left|top" android:hint="@string/input_share_content" android:textColor="@color/gay_33" android:minLines="3" android:background="@drawable/bg_newsdetail_edit" />
这里主要是这两个属性:
android:layout_height="wrap_content" android:minLines="3"
还有就是 edittext的父控件的高度 也要设置成包裹类型
<LinearLayout android:background="@color/white" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="52dp" android:layout_marginRight="10dp" android:gravity="center_vertical" android:orientation="horizontal" > <TextView android:gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_marginLeft="10dp android:text="详细地址:" android:textColor="#4A4A4A" android:textSize="14sp" /> <!-- android:textColor="@color/color_acacac" --> <EditText android:layout_marginTop="3dp" android:layout_marginBottom="3dp" android:minLines="1" android:gravity="center_vertical" android:id="@+id/et_address" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:background="@null" android:textColor="#000000" android:textSize="13sp" /> </LinearLayout>
0 0
- edittext 随文字换行 而高度增加
- Android EditText控件即设置最小高度又运行高度随内容增加而变化
- Android EditText控件即设置最小高度又运行高度随内容增加而变化
- 随着文字内容增加,div的高度也跟着增加,并且文字自动换行
- iOS label高度随字数增加而增长
- UITextView高度随文字自动增加类似于微信
- iframe父页面随子页面高度的增加而增加
- ios中Textview高度随文字的高度的变化而变化
- Android 带文字的进度条,文字颜色随进度条的增加而渐变的效果
- 限制Android的EditText输入文字时换行
- iOS UITextView 高度随文字自动增加,并跟随键盘移动(一)
- iOS UITextView 高度随文字自动增加,并跟随键盘移动(二)
- iOS UITextView 高度随文字自动增加,并跟随键盘移动(一)
- iOS UITextView 高度随文字自动增加,并跟随键盘移动(二)
- 改变EditText光标宽度、颜色、高度增加用户体验
- 自定义TextView,解决文字换行,\n换行符换行,导致高度计算不对问题(计算ListView高度)
- Flex TextArea 根据文字内容自动增加高度
- 设置textView根据输入的文字自动增加高度
- 浅谈对各种途径npm镜像的理解
- Hello World!!
- yii2时间范围查询
- iOS frame动画
- php常用语句及函数
- edittext 随文字换行 而高度增加
- Android Window理解(3.2)---子窗口Menu及系统Toast创建
- Spark描述DAG的2种Task类型解析
- 如何理解 Java 中的 <T extends Comparable<? super T>>
- motan学习笔记 二 motan架构分析
- mysql 中两张表已经创建,建立两个表的关联
- Codeforces 611D New Year And Ancient Prophecy DP+递推式优化
- cef3增加外壳程序
- html入门,css入门