读书笔记:Android开发艺术探索之第6章 android的Drawable

来源:互联网 发布:php数组最大长度限制 编辑:程序博客网 时间:2024/06/12 21:35

1,BitmapDrawable

2,ShapeDrawable

属性:

<shape    xmlns:android="http://schemas.android.com/apk/res/android"    android:shape=["rectangle" | "oval" | "line" | "ring"] >    <corners        android:radius="integer"        android:topLeftRadius="integer"        android:topRightRadius="integer"        android:bottomLeftRadius="integer"        android:bottomRightRadius="integer" />    <gradient        android:angle="integer"        android:centerX="integer"        android:centerY="integer"        android:centerColor="integer"        android:endColor="color"        android:gradientRadius="integer"        android:startColor="color"        android:type=["linear" | "radial" | "sweep"]        android:useLevel=["true" | "false"] />    <padding        android:left="integer"        android:top="integer"        android:right="integer"        android:bottom="integer" />    <size        android:width="integer"        android:height="integer" />    <solid        android:color="color" />    <stroke        android:width="integer"        android:color="color"        android:dashWidth="integer"        android:dashGap="integer" /></shape>

博客连接:http://blog.csdn.net/czd3355/article/details/52691067

3,LayerDrawbale



4,StateListDrawbale

所有属性

Android中StateListDrawable支持的状态
android:state_active 代表是否处于激活状态
android:state_checked 代表是否处于已勾选状态
android:state_checkable 代表是否处于可勾选状态
android:state_enabled 代表是否处于可用状态
android:state_first 代表是否处于开始状态
android:state_focused 代表是否已得到焦点状态
android:state_last 代表是否处于结束状态
android:state_middle 代表是否处于中间状态
android:state_pressed 代表是否处于被按下状态
android:state_selected 代表是否处于被选中状态
android:state_window_focused 代表是否窗口已得到焦点状态


Android Drawable知识学习

http://www.jianshu.com/p/0d85e4d90e3c

阅读全文
0 0
原创粉丝点击