[英]Layer List Drawable - clip bitmap by nine-patch?
I would like to create Drawable
that contains nine-patch
and a Bitmap
. 我想创建Drawable
包含nine-patch
和Bitmap
。
I put them together in Layer List Drawable, but it turns out that Bitmap
is extending nine-patch
beyond the edge. 我将它们放到Drawable的Layer List中,但事实证明Bitmap
正在将nine-patch
扩展到边缘之外。
Is there any way to "cut" Bitmap
so it won't be overlapping nine-patch
? 有什么办法可以“剪切” Bitmap
,使其不会重叠nine-patch
?
EDIT: Actually it seems that I would like to shrink background to wrap content and ingore big bitmap in background. 编辑:实际上,我似乎想缩小背景以包装内容并在背景中插入大位图。
a nine patch by definition doesn't have a size. 根据定义,九个补丁没有大小。
From the sounds of things you haven't configured your nine patch correctly. 从事情的声音来看,您没有正确配置九个补丁。
Please attach an image of what you're seeing and your source files. 请附上您所看到的内容和源文件的图像。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.