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

Loading a gif overwrites rounded corners #43

Closed
powerworr opened this issue May 11, 2020 · 3 comments
Closed

Loading a gif overwrites rounded corners #43

powerworr opened this issue May 11, 2020 · 3 comments

Comments

@powerworr
Copy link

powerworr commented May 11, 2020

Loading a gif with
itemView.attachmentGifView.setMediaWithId(giphyMediaId)
shows the rounded corners specified in the xml, but overwrites them with a rectangular image when it is loaded. Adding a cardView and clipping doesn't fix the issue.

<androidx.cardview.widget.CardView
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:layout_gravity="end"
   app:cardCornerRadius="20dp"
   app:cardPreventCornerOverlap="false"
   app:cardUseCompatPadding="false" 
   app:elevation="0dp">

   <com.giphy.sdk.ui.views.GPHMediaView
       android:id="@+id/attachmentGifView"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:maxWidth="200dp" />

</androidx.cardview.widget.CardView>

I didn't find a way to specify rounded corners in code or make them stay after specifying them in xml. Any help would be appreciated!

@powerworr
Copy link
Author

I see you are extending facebook views and therefore some attributes for rounded corners are part of the GPHMediaView, but the are ignored. Do you provide a way to round them?

@powerworr powerworr reopened this May 11, 2020
@rushabh1191
Copy link

rushabh1191 commented Dec 29, 2020

@powerworr were you able to round the corners? I also have similar requirement.

@ALexanderLonsky
Copy link
Collaborator

@rushabh1191 please try v2.0.7
GifView has now cornerRadius property.

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

3 participants