aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt10
1 files changed, 5 insertions, 5 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 42e30d9..53e726e 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
@@ -28,14 +28,14 @@ class DevicesAdapter(
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
val unit = units[position]
val context = holder.itemView.context
- val metrics = context.resources.displayMetrics
holder.binding.apply {
- if (position == 0) {
- swipeLayout.updateLayoutParams<RecyclerView.LayoutParams> {
- this.topMargin =
+
+ swipeLayout.updateLayoutParams<RecyclerView.LayoutParams> {
+ this.topMargin = if (position == 0)
context.resources.getDimensionPixelSize(R.dimen.nav_height)
- }
+ else 0
}
+
UnitRenderData.render(
UnitRenderData.UnitRenderViewHolder(
unitName = unitName,