mirror of
				https://github.com/SimpleMobileTools/Simple-App-Launcher.git
				synced 2025-06-05 21:49:21 +02:00 
			
		
		
		
	renaming more items, no real change
This commit is contained in:
		| @@ -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() | ||||
|                 } | ||||
|             } | ||||
|   | ||||
| @@ -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) | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -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] | ||||
|   | ||||
| @@ -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() | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
| @@ -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" | ||||
| @@ -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" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user