Android中TextView和EditView常用属性设置
android:layout_gravity="center_vertical"//设置控件显示的位置:默认top,这里居中显示,还有bottom
android:background="@android:drawable/edit_text"这个属性,就可以回到原来的2.3式的风格了。
android:hint="请输入数字!"//设置显示在空间上的提示信息
android:numeric="integer"//设置只能输入整数,如果是小数则是:decimal
android:maxLength="8"
转载
2020-03-02 16:13:57 ·
171 阅读 ·
0 评论