fix showing selected items on Android 5
This commit is contained in:
parent
bf038f5b2e
commit
f7f211cddf
|
@ -39,7 +39,7 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList<Direc
|
||||||
val markedItems = HashSet<Int>()
|
val markedItems = HashSet<Int>()
|
||||||
|
|
||||||
fun toggleItemSelection(itemView: View, select: Boolean, pos: Int = -1) {
|
fun toggleItemSelection(itemView: View, select: Boolean, pos: Int = -1) {
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M)
|
||||||
itemView.dir_frame.isSelected = select
|
itemView.dir_frame.isSelected = select
|
||||||
else
|
else
|
||||||
itemView.dir_thumbnail.isSelected = select
|
itemView.dir_thumbnail.isSelected = select
|
||||||
|
|
|
@ -39,7 +39,7 @@ class MediaAdapter(val activity: SimpleActivity, val media: MutableList<Medium>,
|
||||||
val markedItems = HashSet<Int>()
|
val markedItems = HashSet<Int>()
|
||||||
|
|
||||||
fun toggleItemSelection(itemView: View, select: Boolean, pos: Int = -1) {
|
fun toggleItemSelection(itemView: View, select: Boolean, pos: Int = -1) {
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M)
|
||||||
itemView.medium_thumbnail_holder.isSelected = select
|
itemView.medium_thumbnail_holder.isSelected = select
|
||||||
else
|
else
|
||||||
itemView.medium_thumbnail.isSelected = select
|
itemView.medium_thumbnail.isSelected = select
|
||||||
|
|
Loading…
Reference in New Issue