renaming more items, no real change

This commit is contained in:
tibbi 2022-03-18 19:10:19 +01:00
parent 2516b27746
commit 91a98468f9
8 changed files with 14 additions and 15 deletions

View File

@ -7,7 +7,7 @@ import android.view.MenuItem
import com.simplemobiletools.applauncher.BuildConfig import com.simplemobiletools.applauncher.BuildConfig
import com.simplemobiletools.applauncher.R import com.simplemobiletools.applauncher.R
import com.simplemobiletools.applauncher.adapters.LaunchersAdapter import com.simplemobiletools.applauncher.adapters.LaunchersAdapter
import com.simplemobiletools.applauncher.dialogs.AddAppLauncherDialog import com.simplemobiletools.applauncher.dialogs.AddLaunchersDialog
import com.simplemobiletools.applauncher.dialogs.ChangeSortingDialog import com.simplemobiletools.applauncher.dialogs.ChangeSortingDialog
import com.simplemobiletools.applauncher.extensions.config import com.simplemobiletools.applauncher.extensions.config
import com.simplemobiletools.applauncher.extensions.dbHelper import com.simplemobiletools.applauncher.extensions.dbHelper
@ -46,7 +46,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
fab.setOnClickListener { fab.setOnClickListener {
if (allLaunchers != null) { if (allLaunchers != null) {
val shownLaunchers = (launchers_grid.adapter as LaunchersAdapter).launchers val shownLaunchers = (launchers_grid.adapter as LaunchersAdapter).launchers
AddAppLauncherDialog(this, allLaunchers!!, shownLaunchers) { AddLaunchersDialog(this, allLaunchers!!, shownLaunchers) {
setupLaunchers() setupLaunchers()
} }
} }

View File

@ -9,7 +9,7 @@ import com.simplemobiletools.applauncher.R
import com.simplemobiletools.applauncher.extensions.config import com.simplemobiletools.applauncher.extensions.config
import com.simplemobiletools.applauncher.models.AppLauncher import com.simplemobiletools.applauncher.models.AppLauncher
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
import kotlinx.android.synthetic.main.item_add_app_launcher.view.* import kotlinx.android.synthetic.main.item_add_launcher.view.*
import java.util.* import java.util.*
class AddLaunchersAdapter(activity: Activity, val allLaunchers: ArrayList<AppLauncher>, val shownLaunchers: ArrayList<AppLauncher>) : class AddLaunchersAdapter(activity: Activity, val allLaunchers: ArrayList<AppLauncher>, val shownLaunchers: ArrayList<AppLauncher>) :
@ -44,7 +44,7 @@ class AddLaunchersAdapter(activity: Activity, val allLaunchers: ArrayList<AppLau
} }
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_add_app_launcher, parent, false) val view = LayoutInflater.from(parent.context).inflate(R.layout.item_add_launcher, parent, false)
return ViewHolder(view) return ViewHolder(view)
} }

View File

@ -23,7 +23,7 @@ import com.simplemobiletools.commons.interfaces.ItemTouchHelperContract
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
import com.simplemobiletools.commons.interfaces.StartReorderDragListener import com.simplemobiletools.commons.interfaces.StartReorderDragListener
import com.simplemobiletools.commons.views.MyRecyclerView import com.simplemobiletools.commons.views.MyRecyclerView
import kotlinx.android.synthetic.main.item_app_launcher.view.* import kotlinx.android.synthetic.main.item_launcher.view.*
import java.util.* import java.util.*
import kotlin.collections.ArrayList import kotlin.collections.ArrayList
@ -69,7 +69,7 @@ class LaunchersAdapter(
} }
} }
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.item_app_launcher, parent) override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.item_launcher, parent)
override fun onBindViewHolder(holder: ViewHolder, position: Int) { override fun onBindViewHolder(holder: ViewHolder, position: Int) {
val launcher = launchers[position] val launcher = launchers[position]

View File

@ -9,15 +9,15 @@ import com.simplemobiletools.applauncher.extensions.dbHelper
import com.simplemobiletools.applauncher.models.AppLauncher import com.simplemobiletools.applauncher.models.AppLauncher
import com.simplemobiletools.commons.extensions.areSystemAnimationsEnabled import com.simplemobiletools.commons.extensions.areSystemAnimationsEnabled
import com.simplemobiletools.commons.extensions.setupDialogStuff import com.simplemobiletools.commons.extensions.setupDialogStuff
import kotlinx.android.synthetic.main.dialog_pick_launchers.view.* import kotlinx.android.synthetic.main.dialog_add_launchers.view.*
class AddAppLauncherDialog( class AddLaunchersDialog(
val activity: Activity, val activity: Activity,
val allLaunchers: ArrayList<AppLauncher>, val allLaunchers: ArrayList<AppLauncher>,
val shownLaunchers: ArrayList<AppLauncher>, val shownLaunchers: ArrayList<AppLauncher>,
val callback: () -> Unit val callback: () -> Unit
) { ) {
private var view = (activity.layoutInflater.inflate(R.layout.dialog_pick_launchers, null) as ViewGroup) private var view = (activity.layoutInflater.inflate(R.layout.dialog_add_launchers, null) as ViewGroup)
private var adapter: AddLaunchersAdapter? = null private var adapter: AddLaunchersAdapter? = null
init { init {
@ -27,10 +27,10 @@ class AddAppLauncherDialog(
.create().apply { .create().apply {
activity.setupDialogStuff(view, this) { activity.setupDialogStuff(view, this) {
adapter = AddLaunchersAdapter(activity, allLaunchers, shownLaunchers) adapter = AddLaunchersAdapter(activity, allLaunchers, shownLaunchers)
view.pick_launchers_holder.adapter = adapter view.add_launchers_holder.adapter = adapter
if (activity.areSystemAnimationsEnabled) { if (activity.areSystemAnimationsEnabled) {
view.pick_launchers_holder.scheduleLayoutAnimation() view.add_launchers_holder.scheduleLayoutAnimation()
} }
} }
} }

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<com.simplemobiletools.commons.views.MyRecyclerView xmlns:android="http://schemas.android.com/apk/res/android" <com.simplemobiletools.commons.views.MyRecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/pick_launchers_holder" android:id="@+id/add_launchers_holder"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layoutAnimation="@anim/layout_animation" android:layoutAnimation="@anim/layout_animation"

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/edit_launcher_holder" android:id="@+id/edit_launcher_holder"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"