android, shape用法和讲解
来源:互联网 发布:c语言删除文件的函数 编辑:程序博客网 时间:2024/05/16 07:16
1 ndroid仿Iphone通知角标的实现、比如QQ是显示数量的角标、以及显示未读信息数量、信息等、Android允许通过xml定义资源也可以定义一些图片资源、比如用来做几何的矢量图就非常好用、其中有许多的细节问题,一般shape有以下几种类型 :android:shape=["rectangle" | "oval" | "line" | "ring"]shape的形状,默认为矩形,可以设置为矩形(rectangle)、椭圆形(oval)、线性形状(line)、环形(ring)
2关于圆角的属性常见如下面所示
<corners
android:radius=""
android:topLeftRadius=""
android:topRightRadius=""
android:bottomLeftRadius=""
android:bottomRightRadius=""
/>
3如果想画一个圆的话,具体代码如下<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval" >
<!--圆的内部 填充颜色 -->
<solid android:color="#e40e37" ></solid>
<!--圆的最外面线的宽度,以及最外面线的颜色-->
<stroke android:width="1dp"
android:color="#777777"></stroke>
<!-- 圆的的圆角半径 -->
<corners android:radius="10dp" />
</shape>
4 具体效果如下
5下面重点讲一下环形的画法
- android, shape用法和讲解
- Android shape drawable 讲解
- Android shape 的属性 和 用法
- Android中Shape 和 Selector的用法
- android shape用法
- android shape 用法整理
- android中的shape用法
- Android Shape 简单用法
- Android shape 用法详解
- android shape的用法
- Android shape的用法
- Android shape和selector和layer-list用法
- 关于android中shape的用法和注意点
- android 中selector 和 shape 的用法介绍
- android 整理shape和selector选择器基本用法
- android shape讲解小全及例子
- Android Selector与Shape用法
- android shape的用法总结
- [LintCode] 螺旋矩阵II Spiral Matrix II
- 电磁干扰滤波器的设计
- cent os7 firefox插件崩溃(flash插件)
- 每天一种算法-希尔排序
- [Linux]使用yum提示Error: rpmdb open failed
- android, shape用法和讲解
- mysql 索引介绍
- Node.Js 环境配置
- 基于优先级队列java线程池
- ArrayList和LinkedList的区别
- ZigBee3.0
- Js返回星期方法
- 创建安卓app的30个经验教训______android studio debug技巧
- 使用 vector保存mat