安卓 EditText
继承自TextView
属性
hint
提示
inputType
限制输入类型
drawableXxxx
在某个位置加图标
eg:drawableLeft
drawablePadding
图标和文字的间距
点击按钮获取EditText文字
代码
xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:orientation="vertical"
android:padding="5dp">
<EditText