diff options
Diffstat (limited to 'androidApp/src/main/java/mx')
-rw-r--r-- | androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt | 11 |
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, |