没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
试读
34页
Android Drawable 概述 Bitmap & .9.png Shape XML StateListDrawable Android图形编程 类简介 Canvas Paint Typeface
资源推荐
资源详情
资源评论
Android UI进阶:
Drawable和2D绘制
本章目标
• Android Drawable
概述
• Bitmap&.9.png
• Shape XML
• StateListDrawable
• Android图形编程
• 类简介
• Canvas
• Paint
• Typeface
3
Drawable能支持的格式
• Png
• Gif
• Bitmap
• jpg
• 矢量图图形图表示形状拉伸是不会失真
• 位图像素点拉伸会失真
Drawable
• 是一个比较抽象的概念
• 图形的操作对象抽象,可根据需要延伸出
相应的图形操作对象
– AnimationDrawable针对动画操作对象
– BitmapDrawable针对位图的操作对象
– RotateDrawable用来进行旋转的图形操作对象
– …
– TransitionDrawable用来进行转换的图形操作
对象
5
Shape xml和控件
<shapexmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<gradient
android:angle="90"
android:endColor="#feb301"
android:startColor="#f5981f"
android:centerColor="#f69b16"
android:centerY="20%"
android:type="linear" />
<strokeandroid:width="1dp"
android:color="@android:color/white"
/>
<corners
android:bottomLeftRadius="5dip"
android:bottomRightRadius="5dip"
android:topLeftRadius="5dip"
android:topRightRadius="5dip" />
</shape>
剩余33页未读,继续阅读
资源评论
passionSnail
- 粉丝: 408
- 资源: 5624
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功