mirror of
https://github.com/SimpleMobileTools/Simple-App-Launcher.git
synced 2025-04-22 05:47:31 +02:00
renaming more items, no real change
This commit is contained in:
parent
2516b27746
commit
91a98468f9
@ -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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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]
|
||||||
|
@ -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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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"
|
@ -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"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user