Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
- <com.facebook.drawee.view.SimpleDraweeView
- android:id="@+id/image"
- android:layout_width="match_parent"
- android:layout_height="170dp"
- app:actualImageScaleType="fitXY"/>
- </android.support.constraint.ConstraintLayout>
- @Override
- public void onBindViewHolder(GallaryAdapter.ViewHolder holder, int position) {
- final CharacterData data = characterData.get(position);
- if(data.getType() == CharacterData.TYPE_GIF){
- holder.imageView.setController(Fresco.newDraweeControllerBuilder()
- .setUri(data.getUri())
- .setAutoPlayAnimations(true)
- .build());
- }else{
- holder.imageView.setImageURI(data.getUri());
- }
- }
Add Comment
Please, Sign In to add comment