Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use glide,RoundedImageView no effect #67

Open
Cangol opened this issue Mar 2, 2017 · 5 comments
Open

use glide,RoundedImageView no effect #67

Cangol opened this issue Mar 2, 2017 · 5 comments

Comments

@Cangol
Copy link

Cangol commented Mar 2, 2017

use glide,RoundedImageView no effect

@mitakaniad
Copy link

same problem here.

@troy379
Copy link

troy379 commented Mar 28, 2017

try to add asBitmap() chain, like below

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

@clunyes
Copy link

clunyes commented Jun 8, 2017

yes,resolved

@KhalidElSayed
Copy link

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);

@Rhtyme
Copy link

Rhtyme commented Aug 12, 2019

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants