<?xmlversion=”1.0″encoding=”utf-8″?> <shapexmlns:android=”http://schemas.android.com/apk/res/android”> <solidandroid:color=”#00000000″/> <strokeandroid:width=”1dp”color=”#ff000000″/> <padding android:left=”1dp” android:top=”1dp” android:right=”1dp” android:bottom=”1dp”/> </shape>

solid android:color=“” //使用这种颜色全部实心填充

stroke 描边

android:width=“1dp” color=“#ff000000” 边的颜色是#ff000000,宽度为1dp

padding 间隔 距离上下左右边框的距离为1dp

在开发的过程中你还会用到

gradient 此属性控制布局的渐变颜色

如<gradient android:startColor=”#ff0000″

android:endColor=”#ffffff” 设置渐变颜色,从#ff0000渐变到#ffffff

android:angle=”90″ 设置渐变角度必须为45度得整数倍

android:type=”linear” 将渐变模式设置成线性模式

>

corners 属性设置边角角度

<corners

android:topRightRadius=”20dp” 右上角
android:bottomLeftRadius=”20dp” 右下角
android:topLeftRadius=”1dp” 左上角
android:bottomRightRadius=”0dp” 左下角

>

更多相关文章

  1. Android修改图片颜色-转成灰度图
  2. Android开发开发技巧之 EditText 属性大全
  3. TextView属性
  4. XML属性
  5. Android组件属性

随机推荐

  1. 如何检索Android设备的唯一ID
  2. [Android算法] Android蓝牙开发浅谈
  3. Alibaba无线搜索事业部-产品经理(移动端产
  4. 深度探索Android应用程序的基本原理
  5. Android(安卓)手机十大必备软件
  6. android运行C程序以及C程序在android下的
  7. 深入探索Android卡顿优化(下)
  8. 如何检索Android设备的唯一ID
  9. Android(安卓)开发者从0到1发布一个微信
  10. 搭建自己的android 开发环境 (eclipse +