diff --git a/android/src/main/java/com/wix/RNCameraKit/gallery/GalleryAdapter.java b/android/src/main/java/com/wix/RNCameraKit/gallery/GalleryAdapter.java index 50dffd4..c113653 100644 --- a/android/src/main/java/com/wix/RNCameraKit/gallery/GalleryAdapter.java +++ b/android/src/main/java/com/wix/RNCameraKit/gallery/GalleryAdapter.java @@ -3,9 +3,7 @@ package com.wix.RNCameraKit.gallery; import android.database.Cursor; import android.graphics.Color; import android.graphics.drawable.Drawable; -import android.os.AsyncTask; import android.provider.MediaStore; -import android.support.v4.util.Pair; import android.support.v7.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; @@ -20,7 +18,7 @@ import java.util.concurrent.TimeUnit; /** * Created by yedidyak on 30/06/2016. */ -public class GalleryAdapter extends RecyclerView.Adapter { +public class GalleryAdapter extends RecyclerView.Adapter { private String overlayColor; private Drawable unsupportedFinalImage; @@ -45,8 +43,6 @@ public class GalleryAdapter extends RecyclerView.Adapter uris = new ArrayList<>(); -// private ArrayList ids = new ArrayList<>(); private ArrayList images = new ArrayList<>(); private ArrayList selectedUris = new ArrayList<>(); @@ -67,23 +63,18 @@ public class GalleryAdapter extends RecyclerView.Adapter supportedFileTypes) { this.supportedFileTypes = supportedFileTypes; + notifyView(); } - public class StupidHolder extends RecyclerView.ViewHolder { - public StupidHolder(View itemView) { + public class ImageHolder extends RecyclerView.ViewHolder { + public ImageHolder(View itemView) { super(itemView); } - - // int id; -// String uri; Image image; } @@ -92,6 +83,7 @@ public class GalleryAdapter extends RecyclerView.Adapter()); setAlbum(albumName); @@ -114,8 +106,6 @@ public class GalleryAdapter extends RecyclerView.Adapter 0; final boolean supported = isSupported(holder.image); @@ -204,13 +192,19 @@ public class GalleryAdapter extends RecyclerView.Adapter