do not allow clicking or long pressing thumbnail sections
This commit is contained in:
parent
12ed9a66c1
commit
9520a25f62
3 changed files with 9 additions and 4 deletions
|
@ -320,7 +320,9 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
initZoomListener()
|
||||
val fastscroller = if (config.scrollHorizontally) media_horizontal_fastscroller else media_vertical_fastscroller
|
||||
MediaAdapter(this, mMedia, this, mIsGetImageIntent || mIsGetVideoIntent || mIsGetAnyIntent, mAllowPickingMultiple, media_grid, fastscroller) {
|
||||
itemClicked((it as Medium).path)
|
||||
if (it is Medium) {
|
||||
itemClicked(it.path)
|
||||
}
|
||||
}.apply {
|
||||
setupZoomListener(mZoomListener)
|
||||
media_grid.adapter = this
|
||||
|
|
|
@ -81,7 +81,8 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
|
|||
visibleItemPaths.add(tmbItem.path)
|
||||
}
|
||||
|
||||
val view = holder.bindView(tmbItem, !allowMultiplePicks) { itemView, adapterPosition ->
|
||||
val allowLongPress = !allowMultiplePicks && tmbItem is Medium
|
||||
val view = holder.bindView(tmbItem, allowLongPress) { itemView, adapterPosition ->
|
||||
if (tmbItem is Medium) {
|
||||
setupThumbnail(itemView, tmbItem)
|
||||
} else {
|
||||
|
|
|
@ -64,8 +64,10 @@ class PickMediumDialog(val activity: BaseSimpleActivity, val path: String, val c
|
|||
|
||||
shownMedia = media
|
||||
val adapter = MediaAdapter(activity, shownMedia, null, true, false, view.media_grid, null) {
|
||||
callback((it as Medium).path)
|
||||
dialog.dismiss()
|
||||
if (it is Medium) {
|
||||
callback(it.path)
|
||||
dialog.dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
val scrollHorizontally = activity.config.scrollHorizontally && isGridViewType
|
||||
|
|
Loading…
Reference in a new issue