mirror of
https://github.com/SimpleMobileTools/Simple-App-Launcher.git
synced 2025-02-08 15:58:41 +01:00
use the adjusted color at item selection checks
This commit is contained in:
parent
ab9cf5e83a
commit
05f0028d3c
@ -179,7 +179,7 @@ class LaunchersAdapter(activity: SimpleActivity, val launchers: ArrayList<AppLau
|
||||
}
|
||||
|
||||
if (isSelected) {
|
||||
launcher_check?.background?.applyColorFilter(primaryColor)
|
||||
launcher_check?.background?.applyColorFilter(adjustedPrimaryColor)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,13 +10,14 @@ import com.simplemobiletools.applauncher.extensions.config
|
||||
import com.simplemobiletools.applauncher.models.AppLauncher
|
||||
import com.simplemobiletools.commons.extensions.applyColorFilter
|
||||
import com.simplemobiletools.commons.extensions.beInvisibleIf
|
||||
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
|
||||
import kotlinx.android.synthetic.main.item_app_launcher.view.*
|
||||
import java.util.*
|
||||
|
||||
class LaunchersDialogAdapter(activity: Activity, val launchers: ArrayList<AppLauncher>) : RecyclerView.Adapter<LaunchersDialogAdapter.ViewHolder>() {
|
||||
private val config = activity.config
|
||||
private var primaryColor = config.primaryColor
|
||||
private var textColor = config.textColor
|
||||
private var adjustedPrimaryColor = activity.getAdjustedPrimaryColor()
|
||||
private var selectedKeys = HashSet<Int>()
|
||||
|
||||
fun toggleItemSelection(select: Boolean, pos: Int) {
|
||||
@ -56,7 +57,7 @@ class LaunchersDialogAdapter(activity: Activity, val launchers: ArrayList<AppLau
|
||||
launcher_icon.setImageDrawable(launcher.drawable!!)
|
||||
|
||||
if (isSelected) {
|
||||
launcher_check?.background?.applyColorFilter(primaryColor)
|
||||
launcher_check?.background?.applyColorFilter(adjustedPrimaryColor)
|
||||
}
|
||||
|
||||
setOnClickListener { viewClicked(launcher) }
|
||||
|
Loading…
x
Reference in New Issue
Block a user