aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-13 18:46:43 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-13 18:46:43 -0600
commit40b9a03ecb0d0f191934fb2e6102c6e7e05aef5e (patch)
tree5dcffe06f3b38ba8d16acf1d6d231e12b2d948bb /androidApp/src/main/java
parent2f23203099cd152c36571a39c42ff3056c13484c (diff)
downloadetbsa-trackermap-mobile-40b9a03ecb0d0f191934fb2e6102c6e7e05aef5e.tar.gz
etbsa-trackermap-mobile-40b9a03ecb0d0f191934fb2e6102c6e7e05aef5e.tar.bz2
etbsa-trackermap-mobile-40b9a03ecb0d0f191934fb2e6102c6e7e05aef5e.zip
Full screen map/devices fragment on UnitsActivity
Diffstat (limited to 'androidApp/src/main/java')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt11
1 files changed, 11 insertions, 0 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 175e908..42e30d9 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
@@ -1,8 +1,12 @@
package mx.trackermap.TrackerMap.android.devices
+import android.util.TypedValue
import android.view.LayoutInflater
import android.view.ViewGroup
+import android.widget.FrameLayout
+import androidx.core.view.updateLayoutParams
import androidx.recyclerview.widget.RecyclerView
+import mx.trackermap.TrackerMap.android.R
import mx.trackermap.TrackerMap.android.databinding.UnitItemBinding
import mx.trackermap.TrackerMap.client.models.UnitInformation
@@ -24,7 +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 =
+ context.resources.getDimensionPixelSize(R.dimen.nav_height)
+ }
+ }
UnitRenderData.render(
UnitRenderData.UnitRenderViewHolder(
unitName = unitName,