diff options
author | Allan Wang <allanwang@google.com> | 2019-07-27 19:45:00 -0700 |
---|---|---|
committer | Allan Wang <allanwang@google.com> | 2019-07-27 19:45:00 -0700 |
commit | df1f578cdffb5314bde26c7ffbedc6b1a1d96692 (patch) | |
tree | 1c909c04400e4d09d5fc74d34a32d2f5415f266b /mediapicker/src/main/kotlin | |
parent | 6a599e553a467f15be7ed60c554f43aeac5936ca (diff) | |
download | kau-df1f578cdffb5314bde26c7ffbedc6b1a1d96692.tar.gz kau-df1f578cdffb5314bde26c7ffbedc6b1a1d96692.tar.bz2 kau-df1f578cdffb5314bde26c7ffbedc6b1a1d96692.zip |
Us genericitem where applicable
Diffstat (limited to 'mediapicker/src/main/kotlin')
-rw-r--r-- | mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt index 116f511..47933eb 100644 --- a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt +++ b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt @@ -44,6 +44,7 @@ import ca.allanwang.kau.utils.dimenPixelSize import ca.allanwang.kau.utils.toast import com.bumptech.glide.Glide import com.bumptech.glide.RequestManager +import com.mikepenz.fastadapter.GenericItem import com.mikepenz.fastadapter.IItem import com.mikepenz.fastadapter.adapters.ItemAdapter import com.mikepenz.iconics.dsl.ExperimentalIconicsDSL @@ -58,7 +59,7 @@ import java.io.File * * Container for the main logic behind the both pickers */ -abstract class MediaPickerCore<T : IItem<*>>( +abstract class MediaPickerCore<T : GenericItem>( val mediaType: MediaType, val mediaActions: List<MediaAction> ) : KauBaseActivity(), LoaderManager.LoaderCallbacks<Cursor> { @@ -142,7 +143,7 @@ abstract class MediaPickerCore<T : IItem<*>>( fun initializeRecycler(recycler: RecyclerView) { val adapterHeader = ItemAdapter<MediaActionItem>() - val fulladapter = fastAdapter<IItem<*>>(adapterHeader, adapter) + val fulladapter = fastAdapter<GenericItem>(adapterHeader, adapter) adapterHeader.add(mediaActions.map { MediaActionItem(it, mediaType) }) recycler.apply { val manager = object : GridLayoutManager(context, computeColumnCount(context)) { |