Drawable子类——InsetDrawable
来源:互联网 发布:ubuntu流量监控悬浮窗 编辑:程序博客网 时间:2024/05/25 23:57
InsetDrawable对应标签inset , 它可以将drawable内嵌到自己当中。如何一个view希望自己的背景区域比自己实际区域的时候可以使用InsetDrawable 来实现
inset_darwable.xml
<?xml version="1.0" encoding="utf-8"?><inset xmlns:android="http://schemas.android.com/apk/res/android" android:drawable="@mipmap/picture" android:insetBottom="0dp" android:insetLeft="50dp" android:insetRight="50dp" android:insetTop="200dp"> <!-- <shape android:shape="rectangle"> <solid android:color="#8bbf52"/> </shape>--></inset>
activity_main
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView android:id="@+id/mIv" android:layout_width="300dp" android:layout_height="300dp" android:layout_centerInParent="true" android:background="@mipmap/picture" android:src="@drawable/inset_darwable" /></RelativeLayout>
0 0
- Drawable子类——InsetDrawable
- Android中的Drawable资源—— InsetDrawable
- Drawable解析2——GradientDrawable、ShapeDrawable、InsetDrawable和RotateDrawable
- Drawable子类——ScaleDrawable
- Drawable子类——ClipDrawable
- android drawable InsetDrawable
- Android-drawable资源-InsetDrawable
- Android Drawable之InsetDrawable
- Android Drawable之InsetDrawable
- Drawable学习之-----InsetDrawable
- InsetDrawable 内嵌式Drawable使用详解
- Android Drawable Resource学习(八)、InsetDrawable
- Android Drawable Resource学习(八)、InsetDrawable
- Android Drawable Resource学习(八)、InsetDrawable
- Android Drawable Resource学习(八)、InsetDrawable
- insetDrawable
- InsetDrawable
- Drawable 的 子类
- 怎么在文件对比工具中插入表格数据
- MySql避免重复插入记录方法(ignore,Replace,ON DUPLICATE KEY UPDATE)
- iOS swift - 通过xib 自定义View
- html 中textarea完整用法
- Arcgis学习之旅---基本概念
- Drawable子类——InsetDrawable
- 栈(裸题)
- 程序媛谈Java集合系列——总体框架
- C++读取注册表
- Android apk反编译
- JSP透过session判断用户是否登录
- Android.mk中的调试方法
- Vlan 中 Tag / Untag 报文处理
- 用lua扩展你的Nginx(写的非常好)