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>



更多相关文章

  1. android WebView知识
  2. android保存文件到手机内存
  3. Android(安卓)boot.img介绍
  4. Android(安卓)NDK工程的编译和链接调试
  5. android横屏竖屏设置
  6. android数字证书-签名(步骤)
  7. Android版本适配问题处理
  8. Android的多媒体框架Opencore代码阅读
  9. Android(安卓)Web development Note

随机推荐

  1. android下进行opencv开发的配置
  2. Ubuntu Lucid(10.04)上安装Google Androi
  3. EXOPlayer居中播放,类似ImageView的CENTER
  4. Android简明开发教程十六:Button 画刷示例
  5. android 保持屏幕长亮及解锁的方法
  6. Android中使用Intent打开本地图库
  7. test
  8. android按钮main.xm_基础篇
  9. Android(安卓)Drawable、Bitmap、byte[]
  10. CollapsingToolbarLayout标准使用方式