使用Glide在PolygonImageView中未正确加载图像

时间:2018-04-04 14:44:34

标签: android android-studio imageview android-glide

我正在尝试使用滑动库在多边形ImageView中加载图像,这里是代码

GlideApp.with(Activity.this)
 .load(path)
 .placeholder(R.drawable.user_avatar)
 .into(polygonImageView);

当我使用此代码时,结果位于下方图像中(图像从右下方切割)
Result

但我希望这是结果 Expected[2]

对于使用第三方库Click Here to Check Library

的Polygon ImageView

您的任何帮助将不胜感激。谢谢

1 个答案:

答案 0 :(得分:0)

我的意思是PolyGon Imageview Library但问题不在那里。

使用此代码它将像魅力一样工作

RequestOptions options = new RequestOptions();
options.centerCrop();
Glide.with(this)
            .load("your URL")
            .apply(options)
            .into((ImageView) findViewById(R.id.imageview));
相关问题