4
我正在使用畢加索和RoundedTransformation class,將圓角應用於我用畢加索加載的圖像。相關代碼如下:使用畢加索進行方向更改後不應用圖像轉換
Transformation transformation = new RoundedTransformationBuilder()
.cornerRadiusDp(4)
.oval(false)
.build();
ImageView cardViewTop1Image = (ImageView) cardViewTop1.findViewById(R.id.cv_top1_image);
Picasso.with(cardViewTop1.getContext()).load("http:/some_image_url.com")
.fit().centerCrop()
.transform(transformation).into(cardViewTop1Image);
這一切的偉大工程,直到我經歷兩個方向的變化 - 先水平方向,再回到垂直方向。當我切換回垂直方向時,舍入的變換不再適用。
我相信畢加索緩存未轉換的圖像,然後用它填充ImageView。有沒有一種方法可以緩存轉換後的圖像或從緩存中加載未轉換的圖像,然後應用轉換?謝謝您的幫助!
我也看到類似的問題。有沒有找到解決這個問題的方法? – welshk91