Skip to content

Commit

Permalink
Showcase: Remove SimpleDraweeView reference for Vito RecyclerView exa…
Browse files Browse the repository at this point in the history
…mple

Reviewed By: defHLT

Differential Revision: D63709401

fbshipit-source-id: 06f44de0bffe559a917d47018d3a4707cc3267ec
  • Loading branch information
oprisnik authored and facebook-github-bot committed Oct 8, 2024
1 parent 1ec0855 commit 6ee7085
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import androidx.recyclerview.widget.RecyclerView;
import com.facebook.fresco.samples.showcase.BaseShowcaseFragment;
import com.facebook.fresco.samples.showcase.R;
import com.facebook.fresco.samples.showcase.common.ImageViewWithAspectRatio;
import com.facebook.fresco.samples.showcase.misc.ImageSourceSpinner;
import com.facebook.fresco.vito.options.ImageOptions;
import com.facebook.fresco.vito.view.VitoView;
Expand Down Expand Up @@ -132,11 +133,12 @@ public void setData(List<Uri> uris) {

static class SimpleViewHolder extends RecyclerView.ViewHolder {

private final View mView;
private final ImageViewWithAspectRatio mView;

SimpleViewHolder(View itemView) {
super(itemView);
mView = itemView.findViewById(R.id.view);
mView.setAspectRatio(1f);
}
}
}
4 changes: 1 addition & 3 deletions samples/showcase/src/main/res/layout/vito_recycler_item.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fresco="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/recycler_view_grid_item_half_padding"
>
<com.facebook.drawee.view.SimpleDraweeView
<com.facebook.fresco.samples.showcase.common.ImageViewWithAspectRatio
android:id="@+id/view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
fresco:viewAspectRatio="1"
/>
</androidx.cardview.widget.CardView>

0 comments on commit 6ee7085

Please sign in to comment.