3.EditText控件
16lz
2021-01-23
移除EditText上的输入焦点:(默认聚焦到第一个EditText,可以将第一个EditText隐藏
android:layout_width="0dp"
android:layout_height="0dp"/>)
限制输入字符数量:android:maxLength="11"
多行文本框:(默认会自动换行)
android:singleLine="true"
限制EditText输入信息:android:inputType="number"
设置提示信息:android:hint="this is a hint"
在EditText中显示图片:(drawable left/top/right/bottom)
android:drawableLeft="@drawable/ic_launcher"
设置圆角:
shape.xml
<?xml version="1.0" encoding="utf-8"?>
xmlns:tools=" http://schemas.android.com/tools">
activity_main.xml
android:singleLine="true"
android:layout_height="0dp"/>)
限制输入字符数量:android:maxLength="11"
多行文本框:(默认会自动换行)
android:singleLine="true"
限制EditText输入信息:android:inputType="number"
设置提示信息:android:hint="this is a hint"
在EditText中显示图片:(drawable left/top/right/bottom)
android:drawableLeft="@drawable/ic_launcher"
设置圆角:
shape.xml
<?xml version="1.0" encoding="utf-8"?>
activity_main.xml
android:singleLine="true"
更多相关文章
- AndroidUi(2)-圆角矩形
- android实现圆角矩形
- android圆角矩形的实现
- 如何用C语言计算矩形的周长和面积?(附代码)
- C语言怎么计算矩形的面积和周长
- c语言实现输入圆的半径计算圆的面积
- HTML5中canvas实现矩形颜色渐变
- 矩形嵌套 DP 南阳理工 http://acm.nyist.net/JudgeOnline/proble
- Android圆弧形ListView的实现