步骤: 1.在values目录下的strings.xml文件中加入颜色:比方 <color name="ccc">#ccc</color> 2.假设你直接这样写: tv.setTextColor(R.color.ccc); 理论上 ...
lt xml version . encoding utf gt lt shape xmlns:android http: schemas.android.com apk res android gt lt stroke android:color d d d android:width dp gt 设置边框的颜色和宽度 设置边框的圆角 lt corners android:topLeftRad ...
2017-11-06 10:47 0 2867 推荐指数:
步骤: 1.在values目录下的strings.xml文件中加入颜色:比方 <color name="ccc">#ccc</color> 2.假设你直接这样写: tv.setTextColor(R.color.ccc); 理论上 ...
1、设置边框、圆角、背景色案例 在drawable中 新建一个edge.xml文件 Activity页面引用: 如下案例所示: 说明: solid为填充色 即内部的背景填充色 ,stroke 为边框 可以设置颜色和宽度 效果 ...
http://blog.sina.com.cn/s/blog_677089db0100us05.html http://hi.baidu.com/popln/blog/item/a8f3921e29 ...
1. 按钮边框颜色 //设置边框颜色 [btn.layer setMasksToBounds:YES]; [btn.layer setCornerRadius:10.0]; //设置矩形四个圆角半径 //边框宽度 ...
//swift3.0,如果是2.0的话也可以照着这个样子去写,语法有所变动。根据联想出来的就可以了。 let tx = UITextField(frame: CGRect(x: 100, y: 10 ...
第一步:为了更好的比较,准备两个一模一样的EditText(当Activity启动时,焦点会在第一个EditText上,如果你不希望这样只需要写一个高度和宽带为0的EditText即可避免,这里就不这 ...