mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
use isActivated for selecting items
This commit is contained in:
@ -33,9 +33,9 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList<Direc
|
||||
|
||||
fun toggleItemSelection(itemView: View, select: Boolean) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
|
||||
itemView.dir_frame.isSelected = select
|
||||
itemView.dir_frame.isActivated = select
|
||||
else
|
||||
itemView.dir_thumbnail.isSelected = select
|
||||
itemView.dir_thumbnail.isActivated = select
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
<selector>
|
||||
<item
|
||||
android:drawable="@color/activated_item_foreground"
|
||||
android:state_selected="true"/>
|
||||
android:state_activated="true"/>
|
||||
</selector>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/selected_pressed_mask" android:state_pressed="true"/>
|
||||
<item android:drawable="@drawable/selected_mask" android:state_selected="true"/>
|
||||
<item android:drawable="@drawable/selected_mask" android:state_activated="true"/>
|
||||
</selector>
|
||||
|
Reference in New Issue
Block a user