shape的一些总结,总是记不住,写在这里方便随时查看。

代码:

<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android"android:shape="rectangle"><solid android:color="#FFFFFF"/> <!-- 实心 -->    <stroke        android:width="2dp"        android:color="#63B8FF" /> <!-- 描边 --><padding android:left="5dp" android:top="5dp" android:right="5dp"android:bottom="5dp" /><corners android:radius="5dp" /> <!-- 圆角 --></shape>


<gradient          android:startColor="#666666"          android:endColor="#121212"          android:angle="270" /> <!-- 渐变,angle角度必须为45的整数倍 -->

<corners            android:topRightRadius="20dp"    <!-- 右上角 -->          android:bottomLeftRadius="20dp"   <!-- 右下角  -->        android:topLeftRadius="0dp"   <!-- 左上角  -->        android:bottomRightRadius="0dp"   <!-- 左下角 --> />  



更多相关文章

  1. Android(安卓)Selector 与 Shape 基本用法
  2. Android(安卓)自定义shape圆形按钮
  3. android:shape
  4. Selector与Shape的基本用法
  5. android中Drawable方法详解
  6. Android绘图之LinearGradient线性渐变(9)
  7. Android(安卓)动态修改渐变 GradientDrawable
  8. 2019-05-23
  9. Android(安卓)Shape属性

随机推荐

  1. Android 多线程之Handler
  2. Android热修复框架AndFix核心代码分析并
  3. Android用AlarmManager实现后台任务-andr
  4. 深入浅出Android的多线程
  5. dos窗口下输入adb无效的问题及解决办法
  6. Android安全框架:Verfied boot -- Secure
  7. Android Studio安装ButterKnife插件
  8. android 联系人快速搜索
  9. android 扩展屏幕 多屏显示
  10. Android实现滑动菜单—SlidingMenu