Guest User

Untitled

a guest
Nov 23rd, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2. xmlns:app="http://schemas.android.com/apk/res-auto"
  3. android:layout_width="match_parent"
  4. android:layout_height="wrap_content">
  5. <com.facebook.drawee.view.SimpleDraweeView
  6. android:id="@+id/image"
  7. android:layout_width="match_parent"
  8. android:layout_height="170dp"
  9. app:actualImageScaleType="fitXY"/>
  10. </android.support.constraint.ConstraintLayout>
  11.  
  12. @Override
  13. public void onBindViewHolder(GallaryAdapter.ViewHolder holder, int position) {
  14. final CharacterData data = characterData.get(position);
  15. if(data.getType() == CharacterData.TYPE_GIF){
  16. holder.imageView.setController(Fresco.newDraweeControllerBuilder()
  17. .setUri(data.getUri())
  18. .setAutoPlayAnimations(true)
  19. .build());
  20. }else{
  21. holder.imageView.setImageURI(data.getUri());
  22. }
  23. }
Add Comment
Please, Sign In to add comment