mirror of
https://github.com/SimpleMobileTools/Simple-App-Launcher.git
synced 2025-03-04 19:37:57 +01:00
renaming one adapter to make it clearer
This commit is contained in:
parent
ec33024589
commit
2516b27746
@ -12,8 +12,8 @@ import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
|
||||
import kotlinx.android.synthetic.main.item_add_app_launcher.view.*
|
||||
import java.util.*
|
||||
|
||||
class LaunchersDialogAdapter(activity: Activity, val allLaunchers: ArrayList<AppLauncher>, val shownLaunchers: ArrayList<AppLauncher>) :
|
||||
RecyclerView.Adapter<LaunchersDialogAdapter.ViewHolder>() {
|
||||
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()
|
@ -4,7 +4,7 @@ import android.app.Activity
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import com.simplemobiletools.applauncher.R
|
||||
import com.simplemobiletools.applauncher.adapters.LaunchersDialogAdapter
|
||||
import com.simplemobiletools.applauncher.adapters.AddLaunchersAdapter
|
||||
import com.simplemobiletools.applauncher.extensions.dbHelper
|
||||
import com.simplemobiletools.applauncher.models.AppLauncher
|
||||
import com.simplemobiletools.commons.extensions.areSystemAnimationsEnabled
|
||||
@ -18,7 +18,7 @@ class AddAppLauncherDialog(
|
||||
val callback: () -> Unit
|
||||
) {
|
||||
private var view = (activity.layoutInflater.inflate(R.layout.dialog_pick_launchers, null) as ViewGroup)
|
||||
private var adapter: LaunchersDialogAdapter? = null
|
||||
private var adapter: AddLaunchersAdapter? = null
|
||||
|
||||
init {
|
||||
AlertDialog.Builder(activity)
|
||||
@ -26,7 +26,7 @@ class AddAppLauncherDialog(
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.create().apply {
|
||||
activity.setupDialogStuff(view, this) {
|
||||
adapter = LaunchersDialogAdapter(activity, allLaunchers, shownLaunchers)
|
||||
adapter = AddLaunchersAdapter(activity, allLaunchers, shownLaunchers)
|
||||
view.pick_launchers_holder.adapter = adapter
|
||||
|
||||
if (activity.areSystemAnimationsEnabled) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user