diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-01-15 20:08:37 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-01-15 20:08:37 -0600 |
commit | 2980a4496edf94259e1244e18c000f477aa3db43 (patch) | |
tree | 2bfcaff8312058e4c16cc238ded881f59727983e /androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices | |
parent | 1f3a6112793c6097fa0863887b5b8b9e984b87a0 (diff) | |
download | etbsa-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.kt | 1 | ||||
-rw-r--r-- | androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesFragment.kt | 4 |
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 |