图像 Draw9Patched 在错误的区域拉伸
在对我的可绘制文件夹中的一些图像进行 Draw9Patching 后,我想让它具有一定的高度。
一开始我有这张图片:
然后,当我将 ScaleType 应用于“fitXY”以“拉伸”我的图像时,以及当我定义我的高度时,这是不正确的:
我的 imageview 底部的箭头被拉伸,但是我在 draw9patch 上提到不要这样做拉伸这个区域。
你对这个问题有什么解释吗?
提前致谢!
After Draw9Patching some image I had in my drawable folder, I want to make it have a certain height.
At start I have this picture :
Then, when I apply ScaleType to "fitXY" in order to "strech" my image, and when I define my height, it's incorrect :
The arrow on the bottom of my imageview get stretched, however I mentioned on my draw9patch not to stretch this area.
Do you have any explanation of this problem ?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我很确定 9patches 应该用作 View 的背景,而不是 ImageView 的源。如果将 TextView 的背景设置为这个 9patch,一切都会正常工作。
I'm pretty sure 9patches are meant to be used as backgrounds of Views, not as the source of an ImageView. If you set the background of a TextView to this 9patch, everything will work fine.