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()
|
initZoomListener()
|
||||||
val fastscroller = if (config.scrollHorizontally) media_horizontal_fastscroller else media_vertical_fastscroller
|
val fastscroller = if (config.scrollHorizontally) media_horizontal_fastscroller else media_vertical_fastscroller
|
||||||
MediaAdapter(this, mMedia, this, mIsGetImageIntent || mIsGetVideoIntent || mIsGetAnyIntent, mAllowPickingMultiple, media_grid, 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 {
|
}.apply {
|
||||||
setupZoomListener(mZoomListener)
|
setupZoomListener(mZoomListener)
|
||||||
media_grid.adapter = this
|
media_grid.adapter = this
|
||||||
|
|
|
@ -81,7 +81,8 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
|
||||||
visibleItemPaths.add(tmbItem.path)
|
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) {
|
if (tmbItem is Medium) {
|
||||||
setupThumbnail(itemView, tmbItem)
|
setupThumbnail(itemView, tmbItem)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -64,9 +64,11 @@ class PickMediumDialog(val activity: BaseSimpleActivity, val path: String, val c
|
||||||
|
|
||||||
shownMedia = media
|
shownMedia = media
|
||||||
val adapter = MediaAdapter(activity, shownMedia, null, true, false, view.media_grid, null) {
|
val adapter = MediaAdapter(activity, shownMedia, null, true, false, view.media_grid, null) {
|
||||||
callback((it as Medium).path)
|
if (it is Medium) {
|
||||||
|
callback(it.path)
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val scrollHorizontally = activity.config.scrollHorizontally && isGridViewType
|
val scrollHorizontally = activity.config.scrollHorizontally && isGridViewType
|
||||||
val sorting = activity.config.getFileSorting(path)
|
val sorting = activity.config.getFileSorting(path)
|
||||||
|
|
Loading…
Reference in a new issue