diff options
Diffstat (limited to 'androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices')
-rw-r--r-- | androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt index c54e8bf..4852757 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt @@ -32,8 +32,6 @@ class DevicesAdapter( } override fun onBindViewHolder(holder: ViewHolder, position: Int) { - holder.toggleOptions(false) - val unit = units[position] val context = holder.itemView.context holder.binding.apply { @@ -86,25 +84,5 @@ class DevicesAdapter( override fun getItemCount(): Int = units.size - inner class ViewHolder(val binding: UnitItemBinding) : RecyclerView.ViewHolder(binding.root) { - init { - binding.unitCard.setOnLongClickListener { - toggleOptions(binding.itemOptions.visibility == View.GONE) - true - } - } - - fun toggleOptions(shouldExpand: Boolean) { - val context = binding.root.context - binding.unitCard.setCardBackgroundColor( - ResourcesCompat.getColor( - context.resources, - if (shouldExpand) R.color.background else R.color.darkBackground, - context.theme - ) - ) - binding.itemOptions.visibility = if (shouldExpand) View.VISIBLE else View.GONE - binding.unitCard.cardElevation = if (shouldExpand) 5.0F else 0.0F - } - } + inner class ViewHolder(val binding: UnitItemBinding) : RecyclerView.ViewHolder(binding.root) }
\ No newline at end of file |