From a914e5f34595d319ab1ce0f267ae1550cb625710 Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Sun, 16 Jan 2022 17:18:22 -0600 Subject: Added close button to DetailsActivity, updated strings and layouts --- .../java/mx/trackermap/TrackerMap/android/details/DetailsActivity.kt | 3 +++ .../TrackerMap/android/details/commands/UnitCommandsFragment.kt | 2 +- .../trackermap/TrackerMap/android/session/UserInformationActivity.kt | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'androidApp/src/main/java') diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/DetailsActivity.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/DetailsActivity.kt index aaf7ecb..c6d260b 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/DetailsActivity.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/DetailsActivity.kt @@ -84,6 +84,9 @@ class DetailsActivity : AppCompatActivity() { override fun onTabUnselected(tab: TabLayout.Tab?) {} override fun onTabReselected(tab: TabLayout.Tab?) {} }) + binding.closeButton.setOnClickListener { + finish() + } requestPermission {} } 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 b56a403..822d351 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 @@ -75,7 +75,7 @@ class UnitCommandsFragment: Fragment() { setPositiveButton(R.string.shared_cancel) { dialogInterface, _ -> dialogInterface.dismiss() } - setNegativeButton(R.string.send_command) { dialogInterface, _ -> + setNegativeButton(R.string.shared_send) { dialogInterface, _ -> unitCommandsViewModel.sendCommand() dialogInterface.dismiss() } diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationActivity.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationActivity.kt index b0a4482..13deed0 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationActivity.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationActivity.kt @@ -69,7 +69,7 @@ class UserInformationActivity : AppCompatActivity() { } private fun setupEvents() { - binding.backButton.setOnClickListener { onBackPressed() } + binding.closeButton.setOnClickListener { onBackPressed() } binding.signoutButton.setOnClickListener { userInformationViewModel.signOut(PreferenceManager .getDefaultSharedPreferences(this) -- cgit v1.2.3