设置提示信息,输入值类型,输入框引入图片,设置输入框的形状
16lz
2021-12-04
1.设置提示信息
android:hint="input the PWD"
2、设置输入值的类型
android:inputType="number"
3、设置输入框包含的图片
android:drawableLeft="@drawable/baidu"
文件结构如图:
4、设置输入框的形状
android:background="@drawable/shape"
其中shape为上图中的xml文件
shape中内容为:
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充颜色 -->
<solid android:color="#ffffff"/>
<!-- 设置矩形的四个角为矩形 -->
<!-- 弧形的半径 -->
<corners android:radius="7dip"/>
</shape>
更多相关文章
- android WebView知识
- android保存文件到手机内存
- Android(安卓)boot.img介绍
- Android(安卓)NDK工程的编译和链接调试
- android横屏竖屏设置
- android数字证书-签名(步骤)
- Android版本适配问题处理
- Android的多媒体框架Opencore代码阅读
- Android(安卓)Web development Note