From 40b9a03ecb0d0f191934fb2e6102c6e7e05aef5e Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Thu, 13 Jan 2022 18:46:43 -0600 Subject: Full screen map/devices fragment on UnitsActivity --- .../trackermap/TrackerMap/android/devices/DevicesAdapter.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'androidApp/src/main/java/mx') 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 { + this.topMargin = + context.resources.getDimensionPixelSize(R.dimen.nav_height) + } + } UnitRenderData.render( UnitRenderData.UnitRenderViewHolder( unitName = unitName, -- cgit v1.2.3