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.R
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.extensions.config
import com.simplemobiletools.applauncher.extensions.dbHelper
@ -46,7 +46,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
fab.setOnClickListener {
if (allLaunchers != null) {
val shownLaunchers = (launchers_grid.adapter as LaunchersAdapter).launchers
AddAppLauncherDialog(this, allLaunchers!!, shownLaunchers) {
AddLaunchersDialog(this, allLaunchers!!, shownLaunchers) {
setupLaunchers()
}
}

View File

@ -9,7 +9,7 @@ import com.simplemobiletools.applauncher.R
import com.simplemobiletools.applauncher.extensions.config
import com.simplemobiletools.applauncher.models.AppLauncher
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.*
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 {
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)
}

View File

@ -23,7 +23,7 @@ import com.simplemobiletools.commons.interfaces.ItemTouchHelperContract
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
import com.simplemobiletools.commons.interfaces.StartReorderDragListener
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 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) {
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.commons.extensions.areSystemAnimationsEnabled
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 allLaunchers: ArrayList<AppLauncher>,
val shownLaunchers: ArrayList<AppLauncher>,
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
init {
@ -27,10 +27,10 @@ class AddAppLauncherDialog(
.create().apply {
activity.setupDialogStuff(view, this) {
adapter = AddLaunchersAdapter(activity, allLaunchers, shownLaunchers)
view.pick_launchers_holder.adapter = adapter
view.add_launchers_holder.adapter = adapter
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"?>
<com.simplemobiletools.commons.views.MyRecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
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_height="wrap_content"
android:layoutAnimation="@anim/layout_animation"

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/edit_launcher_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -12,6 +11,6 @@
android:layout_height="match_parent"
android:inputType="textCapWords"
android:textCursorDrawable="@null"
android:textSize="@dimen/normal_text_size"/>
android:textSize="@dimen/normal_text_size" />
</FrameLayout>