diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-01-13 19:17:11 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-01-13 19:17:11 -0600 |
commit | 3e23bbc6b6fd51359a7af678246238fdd2da5aca (patch) | |
tree | c7caf01c44ed2ffa492bc21d4d30e79981ab75d6 /androidApp/src/main/java | |
parent | 7789f475200134a6f1c0c7a855b52ccc2abe2555 (diff) | |
download | etbsa-trackermap-mobile-3e23bbc6b6fd51359a7af678246238fdd2da5aca.tar.gz etbsa-trackermap-mobile-3e23bbc6b6fd51359a7af678246238fdd2da5aca.tar.bz2 etbsa-trackermap-mobile-3e23bbc6b6fd51359a7af678246238fdd2da5aca.zip |
Fixed top margin on DevicesAdapter
Diffstat (limited to 'androidApp/src/main/java')
-rw-r--r-- | androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt | 10 |
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, |