aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java/mx
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-13 19:17:11 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-13 19:17:11 -0600
commit2ffc7cfef0ac9d40f3b97efd38a201cf43341dd7 (patch)
treec7caf01c44ed2ffa492bc21d4d30e79981ab75d6 /androidApp/src/main/java/mx
parent1d85d8b5909b168186cfc800c0105356a521eed4 (diff)
downloadetbsa-trackermap-mobile-2ffc7cfef0ac9d40f3b97efd38a201cf43341dd7.tar.gz
etbsa-trackermap-mobile-2ffc7cfef0ac9d40f3b97efd38a201cf43341dd7.tar.bz2
etbsa-trackermap-mobile-2ffc7cfef0ac9d40f3b97efd38a201cf43341dd7.zip
Fixed top margin on DevicesAdapter
Diffstat (limited to 'androidApp/src/main/java/mx')
-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,