diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-01-13 18:46:43 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-01-13 18:46:43 -0600 |
commit | c23de8adfa5492960fd26f113a3a377c7db134fa (patch) | |
tree | 5dcffe06f3b38ba8d16acf1d6d231e12b2d948bb /androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices | |
parent | 584cefdb1df921dc8395d6f390421de7f9ba7ef5 (diff) | |
download | etbsa-trackermap-mobile-c23de8adfa5492960fd26f113a3a377c7db134fa.tar.gz etbsa-trackermap-mobile-c23de8adfa5492960fd26f113a3a377c7db134fa.tar.bz2 etbsa-trackermap-mobile-c23de8adfa5492960fd26f113a3a377c7db134fa.zip |
Full screen map/devices fragment on UnitsActivity
Diffstat (limited to 'androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices')
-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, |