From 507d6d03561b809ab8507c70443aeba63e3a29e6 Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Fri, 14 Jan 2022 03:05:35 -0600 Subject: Loading indicator for commands fragment --- .../android/details/commands/UnitCommandsFragment.kt | 1 + androidApp/src/main/res/layout/unit_details_commands.xml | 11 +++++++++++ 2 files changed, 12 insertions(+) (limited to 'androidApp/src') diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/commands/UnitCommandsFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/commands/UnitCommandsFragment.kt index 90968e2..fa6a37a 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/commands/UnitCommandsFragment.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/commands/UnitCommandsFragment.kt @@ -47,6 +47,7 @@ class UnitCommandsFragment: Fragment() { private fun setupObservers() { unitCommandsViewModel.commands.observe(viewLifecycleOwner) { commands -> Log.d("UnitCommandsFragment", "Device commands - $commands") + binding.reportLoading.visibility = View.GONE val context = activity!!.applicationContext val adapter = ArrayAdapter(context, R.layout.simple_list_item_checked) adapter.addAll(commands.map { it.description }) diff --git a/androidApp/src/main/res/layout/unit_details_commands.xml b/androidApp/src/main/res/layout/unit_details_commands.xml index 6b554cc..3616f75 100644 --- a/androidApp/src/main/res/layout/unit_details_commands.xml +++ b/androidApp/src/main/res/layout/unit_details_commands.xml @@ -6,6 +6,17 @@ android:layout_width="match_parent" android:layout_height="match_parent"> + +