mirror of
https://github.com/SimpleMobileTools/Simple-App-Launcher.git
synced 2025-02-08 07:48:39 +01:00
updating commons
This commit is contained in:
parent
f7e6b64a52
commit
0b61b08525
@ -62,7 +62,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:f5664f6db4'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:faa6a972c2'
|
||||
implementation 'androidx.multidex:multidex:2.0.1'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||
}
|
||||
|
@ -54,19 +54,19 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
if (mStoredTextColor != config.textColor) {
|
||||
getGridAdapter()?.updateTextColor(config.textColor)
|
||||
if (mStoredTextColor != getProperTextColor()) {
|
||||
getGridAdapter()?.updateTextColor(getProperTextColor())
|
||||
}
|
||||
|
||||
if (mStoredPrimaryColor != config.primaryColor) {
|
||||
if (mStoredPrimaryColor != getProperPrimaryColor()) {
|
||||
getGridAdapter()?.apply {
|
||||
updatePrimaryColor(config.primaryColor)
|
||||
updatePrimaryColor()
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
|
||||
updateTextColors(coordinator_layout)
|
||||
launchers_fastscroller.updateColors(getAdjustedPrimaryColor())
|
||||
launchers_fastscroller.updateColors(getProperPrimaryColor())
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
@ -242,10 +242,8 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
||||
}
|
||||
|
||||
private fun storeStateVariables() {
|
||||
config.apply {
|
||||
mStoredPrimaryColor = primaryColor
|
||||
mStoredTextColor = textColor
|
||||
}
|
||||
mStoredPrimaryColor = getProperPrimaryColor()
|
||||
mStoredTextColor = getProperTextColor()
|
||||
}
|
||||
|
||||
override fun refreshItems() {
|
||||
|
@ -25,11 +25,11 @@ class SettingsActivity : SimpleActivity() {
|
||||
updateTextColors(settings_holder)
|
||||
|
||||
arrayOf(settings_color_customization_label, settings_general_settings_label).forEach {
|
||||
it.setTextColor(getAdjustedPrimaryColor())
|
||||
it.setTextColor(getProperPrimaryColor())
|
||||
}
|
||||
|
||||
arrayOf(settings_color_customization_holder, settings_general_settings_holder).forEach {
|
||||
it.background.applyColorFilter(baseConfig.backgroundColor.getContrastColor())
|
||||
it.background.applyColorFilter(getProperBackgroundColor().getContrastColor())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,17 +6,15 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.simplemobiletools.applauncher.R
|
||||
import com.simplemobiletools.applauncher.extensions.config
|
||||
import com.simplemobiletools.applauncher.models.AppLauncher
|
||||
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
|
||||
import com.simplemobiletools.commons.extensions.getProperPrimaryColor
|
||||
import com.simplemobiletools.commons.extensions.getProperTextColor
|
||||
import kotlinx.android.synthetic.main.item_add_launcher.view.*
|
||||
import java.util.*
|
||||
|
||||
class AddLaunchersAdapter(activity: Activity, val allLaunchers: ArrayList<AppLauncher>, val shownLaunchers: ArrayList<AppLauncher>) :
|
||||
RecyclerView.Adapter<AddLaunchersAdapter.ViewHolder>() {
|
||||
private val config = activity.config
|
||||
private var textColor = config.textColor
|
||||
private var adjustedPrimaryColor = activity.getAdjustedPrimaryColor()
|
||||
private var textColor = activity.getProperTextColor()
|
||||
private var adjustedPrimaryColor = activity.getProperPrimaryColor()
|
||||
private var selectedKeys = HashSet<Int>()
|
||||
|
||||
init {
|
||||
|
@ -191,7 +191,7 @@ class LaunchersAdapter(
|
||||
}
|
||||
|
||||
if (isSelected) {
|
||||
launcher_check?.background?.applyColorFilter(adjustedPrimaryColor)
|
||||
launcher_check?.background?.applyColorFilter(properPrimaryColor)
|
||||
}
|
||||
|
||||
launcher_label.isVisible = activity.config.showAppName
|
||||
|
Loading…
x
Reference in New Issue
Block a user