android-shape-imageview icon indicating copy to clipboard operation
android-shape-imageview copied to clipboard

use glide,RoundedImageView no effect

Open Cangol opened this issue 7 years ago • 5 comments

use glide,RoundedImageView no effect

Cangol avatar Mar 02 '17 07:03 Cangol

same problem here.

mitakaniad avatar Mar 13 '17 07:03 mitakaniad

try to add asBitmap() chain, like below

    .load(src)
    .asBitmap()
    .into(imageView) ```

troy379 avatar Mar 28 '17 07:03 troy379

yes,resolved

clunyes avatar Jun 08 '17 03:06 clunyes

Doesn't work here, even I use .asBitmap() chain. below is the code snippet for loading an image that should be rounded and using crossfade animation:

Note: i'm using Glide 4

Glide.with(mContext)
                .asBitmap()
                .load(/* some image url */)
                .apply(new RequestOptions()
                        .bitmapTransform(new CenterCrop())
                        .placeholder(R.drawable.img_book_placeholder)
                        .error(R.drawable.img_book_placeholder)
                )
                .transition(BitmapTransitionOptions.withCrossFade())
                .into(holder.imgBook);

KhalidElSayed avatar Oct 13 '17 05:10 KhalidElSayed

I was able to do that by wrapping out the image with some layout and setting a padding (something like 1dp) into layout, then setting the following shape as a background:

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">

    <corners android:radius="@dimen/inbox_item_background_radius" />

    <stroke android:width="@dimen/inbox_item_background_stroke_width" android:color="@color/back_shadow_color"/>

</shape>

Rhtyme avatar Aug 12 '19 08:08 Rhtyme