fix showing selected items on Android 5

This commit is contained in:
Tibor Kaputa 2016-11-22 10:49:42 +01:00
parent bf038f5b2e
commit f7f211cddf
2 changed files with 2 additions and 2 deletions

View file

@ -39,7 +39,7 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList<Direc
val markedItems = HashSet<Int>()
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
else
itemView.dir_thumbnail.isSelected = select

View file

@ -39,7 +39,7 @@ class MediaAdapter(val activity: SimpleActivity, val media: MutableList<Medium>,
val markedItems = HashSet<Int>()
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
else
itemView.medium_thumbnail.isSelected = select