android xml界面布局特殊属性

edittext属性:

android:layout_gravity="center_vertical"      //设置控件显示的位置:默认top,这里居中显示,还有bottom        

android:hint="请输入数字!"                  //设置显示在空间上的提示信息      

android:numeric="integer"                    //设置只能输入整数,如果是小数则是:decimal        

android:singleLine="true"                     //设置单行输入,一旦设置为true,则文字不会自动换行。 

android:password="true"                     //设置只能输入密码        

android:textColor = "#ff$200"                 //字体颜色         android:textStyle="bold"                      //字体,bold, italic, bolditalic         android:textSize="20dip"                     //大小         

android:capitalize = "characters"              //以大写字母写            

android:textColorHighlight="#cccccc"         //被选中文字的底色,默认为蓝色      

android:textColorHint="#ffff00"               //设置提示信息文字的颜色,默认为灰色       

android:textScaleX="1.5"                    //控制字与字之间的间距         

android:typeface="monospace"              //字型,normal, sans, serif, monospace      

android:background="@null"                 //空间背景,这里没有,指透明       

android:layout_weight="1"                   //权重  



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值