aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-15 20:08:37 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-15 20:08:37 -0600
commit2980a4496edf94259e1244e18c000f477aa3db43 (patch)
tree2bfcaff8312058e4c16cc238ded881f59727983e /androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices
parent1f3a6112793c6097fa0863887b5b8b9e984b87a0 (diff)
downloadetbsa-trackermap-mobile-2980a4496edf94259e1244e18c000f477aa3db43.tar.gz
etbsa-trackermap-mobile-2980a4496edf94259e1244e18c000f477aa3db43.tar.bz2
etbsa-trackermap-mobile-2980a4496edf94259e1244e18c000f477aa3db43.zip
Improved loading indicators, improved layout semantics, added translations and changed default view to MAP
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.kt1
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesFragment.kt4
2 files changed, 5 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 53e726e..344907c 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
@@ -44,6 +44,7 @@ class DevicesAdapter(
engineStopIcon = engineStopIcon,
gridLayout = gridLayout,
detailsButton = detailsButton,
+ reportsButton = reportsButton,
commandsButton = commandsButton,
unitCard = unitCard,
swipeLayout = swipeLayout
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesFragment.kt
index 3b44477..96d4696 100644
--- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesFragment.kt
+++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesFragment.kt
@@ -6,6 +6,8 @@ import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
+import android.view.ViewTreeObserver
+import android.widget.Toast
import androidx.recyclerview.widget.LinearLayoutManager
import kotlinx.coroutines.DelicateCoroutinesApi
import mx.trackermap.TrackerMap.android.databinding.DevicesFragmentBinding
@@ -59,6 +61,7 @@ class DevicesFragment(private val unitsViewModel: UnitsViewModel) : UnitFragment
false
)
binding.devicesList.adapter = DevicesAdapter(emptyList(), null)
+ binding.infoLoading.root.visibility = View.VISIBLE
}
@DelicateCoroutinesApi
@@ -66,6 +69,7 @@ class DevicesFragment(private val unitsViewModel: UnitsViewModel) : UnitFragment
Log.d("DevicesFragment", "setupObservers()")
unitsViewModel.units.observe(viewLifecycleOwner) { units ->
Log.d("DevicesFragment", "Success $units")
+ binding.infoLoading.root.visibility = View.GONE
binding.devicesList.swapAdapter(
DevicesAdapter(units, this::itemAction),
false