读书笔记:Android开发艺术探索之第6章 android的Drawable
2017-07-20 16:37
267 查看
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 代表是否窗口已得到焦点状态
http://www.jianshu.com/p/0d85e4d90e3c
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
相关文章推荐
- 【读书笔记】【Android 开发艺术探索】第 6 章 Android 的 Drawable
- Android 开发艺术探索 读书笔记8
- <<Android开发艺术探索>>读书笔记--IntentFilter
- 【读书笔记】【Android 开发艺术探索】第11章Android 的线程和线程池
- Android 开发艺术探索 读书笔记5
- Android-开发艺术探索读书笔记之一
- Android 开发艺术探索笔记 第六章 Android的Drawable
- 读书笔记-Android开发艺术探索-第11章-Android的线程和线程池
- Android 开发艺术探索读书笔记
- 【读书笔记】【Android 开发艺术探索】第 7 章 Android 动画深入分析
- 读书笔记-Android开发艺术探索-第8章-理解Window和WindowManager
- 【Android开发艺术探索读书笔记】 第一章 Activity的生命周期与启动模式
- Android开发艺术-第六章Drawable读书笔记
- Android开发艺术探索 读书笔记 第三章 View事件体系
- 读书笔记-Android开发艺术探索-第15章-Android性能优化
- Andorid开发艺术探索读书笔记--Android四大组件
- Android 开发艺术探索 读书笔记7
- 【读书笔记】【Android 开发艺术探索】第4章 View 的工作原理
- 【Android开发艺术探索读书笔记】第二章 Android中的多进程模式
- Android读书笔记-开发艺术探索1