make sure the launcher check icon is just invisible, not gone

This commit is contained in:
tibbi 2018-04-04 21:20:13 +02:00
parent 4d1d8447b4
commit 0d4b93bfc2
3 changed files with 5 additions and 5 deletions

View File

@ -12,7 +12,7 @@ import com.simplemobiletools.applauncher.models.AppLauncher
import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter
import com.simplemobiletools.commons.dialogs.ConfirmationDialog import com.simplemobiletools.commons.dialogs.ConfirmationDialog
import com.simplemobiletools.commons.extensions.applyColorFilter import com.simplemobiletools.commons.extensions.applyColorFilter
import com.simplemobiletools.commons.extensions.beVisibleIf import com.simplemobiletools.commons.extensions.beInvisibleIf
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
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_app_launcher.view.*
@ -32,7 +32,7 @@ class LaunchersAdapter(activity: SimpleActivity, val launchers: MutableList<AppL
} }
override fun markItemSelection(select: Boolean, view: View?) { override fun markItemSelection(select: Boolean, view: View?) {
view?.launcher_check?.beVisibleIf(select) view?.launcher_check?.beInvisibleIf(!select)
} }
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_app_launcher, parent)

View File

@ -10,7 +10,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.applyColorFilter import com.simplemobiletools.commons.extensions.applyColorFilter
import com.simplemobiletools.commons.extensions.beVisibleIf import com.simplemobiletools.commons.extensions.beInvisibleIf
import com.simplemobiletools.commons.interfaces.MyAdapterListener import com.simplemobiletools.commons.interfaces.MyAdapterListener
import kotlinx.android.synthetic.main.item_app_launcher.view.* import kotlinx.android.synthetic.main.item_app_launcher.view.*
import java.util.* import java.util.*
@ -32,7 +32,7 @@ class LaunchersDialogAdapter(activity: Activity, val launchers: ArrayList<AppLau
selectedPositions.remove(pos) selectedPositions.remove(pos)
} }
itemViews[pos]?.launcher_check?.beVisibleIf(select) itemViews[pos]?.launcher_check?.beInvisibleIf(!select)
} }
fun getSelectedLaunchers(): ArrayList<AppLauncher> { fun getSelectedLaunchers(): ArrayList<AppLauncher> {

View File

@ -38,6 +38,6 @@
android:background="@drawable/circle_background" android:background="@drawable/circle_background"
android:padding="@dimen/tiny_margin" android:padding="@dimen/tiny_margin"
android:src="@drawable/ic_check" android:src="@drawable/ic_check"
android:visibility="gone"/> android:visibility="invisible"/>
</RelativeLayout> </RelativeLayout>