mirror of
https://github.com/SimpleMobileTools/Simple-App-Launcher.git
synced 2025-06-05 21:49:21 +02:00
updating commons with the bottom actionmenu
This commit is contained in:
@ -56,7 +56,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:ccc1f8b958'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:514081ee76'
|
||||
implementation 'androidx.multidex:multidex:2.0.1'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.simplemobiletools.applauncher.adapters
|
||||
|
||||
import android.view.Menu
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
@ -25,6 +24,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 com.simplemobiletools.commons.views.bottomactionmenu.BottomActionMenuView
|
||||
import kotlinx.android.synthetic.main.item_app_launcher.view.*
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
@ -52,10 +52,8 @@ class LaunchersAdapter(
|
||||
|
||||
override fun getActionMenuId() = R.menu.cab
|
||||
|
||||
override fun prepareActionMode(menu: Menu) {
|
||||
menu.apply {
|
||||
findItem(R.id.cab_edit).isVisible = isOneItemSelected()
|
||||
}
|
||||
override fun onBottomActionMenuCreated(view: BottomActionMenuView) {
|
||||
view.toggleItemVisibility(R.id.cab_edit, isOneItemSelected())
|
||||
}
|
||||
|
||||
override fun actionItemPressed(id: Int) {
|
||||
@ -92,8 +90,6 @@ class LaunchersAdapter(
|
||||
|
||||
override fun getItemKeyPosition(key: Int) = launchers.indexOfFirst { it.packageName.hashCode() == key }
|
||||
|
||||
override fun onActionModeCreated() {}
|
||||
|
||||
override fun onActionModeDestroyed() {
|
||||
if (isChangingOrder) {
|
||||
notifyDataSetChanged()
|
||||
|
Reference in New Issue
Block a user