简体   繁体   English

android裁剪绘制

[英]android cropping drawable

I have a small project in which i download images from internet in the form of drawable and use them in Imageview for which i have provided functionality similar to an Imagebutton but without the gray edges. 我有一个小项目,我以可绘制的形式从互联网下载图像,并在Imageview中使用它们,为此我提供了类似于Imagebutton的功能,但没有灰色边缘。

The question is that is there any functionality in Android(similar to iphone) by which we can crop the drawable from edges to make them rounded edged drawable... 问题是Android中是否有任何功能(类似于iphone),我们可以通过这些功能从边缘裁剪可绘制对象,使它们成为圆角可绘制边缘...

Even if its a "not-tested-neither-recommended" method, do let me know... i would like to work on this a bit... thanx in advance folks... 即使它是“未经测试,也不推荐”的方法,也请让我知道...我想对此进行一点工作...事前感谢thanx。

I believe this is probably the link you're looking for: How should I give images rounded corners in Android? 我相信这可能是您正在寻找的链接: 我应该如何在Android中给图像加上圆角?

I tried doing it with a drawable and nested and elements, but wasn't able to get the image drawable to show properly. 我尝试使用可绘制的,嵌套的和元素进行此操作,但是无法使可绘制的图像正确显示。 Not sure if there's a way to get this working or not. 不知道是否有办法使它工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM