From ae8733682d89098348bd3d880f85028cb1bc2b6b Mon Sep 17 00:00:00 2001 From: Isidro Henoch Date: Wed, 15 Dec 2021 00:42:08 -0600 Subject: Adds the profile button It doesn't do anything atm... --- .../TrackerMap/android/units/UnitsActivity.kt | 7 +++++ androidApp/src/main/res/layout/activity_main.xml | 19 ------------- androidApp/src/main/res/layout/units_activity.xml | 31 +++++++++++++++------- androidApp/src/main/res/values/dimen.xml | 8 ++++++ androidApp/src/main/res/values/strings.xml | 1 + 5 files changed, 38 insertions(+), 28 deletions(-) delete mode 100644 androidApp/src/main/res/layout/activity_main.xml (limited to 'androidApp/src/main') diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt index c895f31..2be6da3 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt @@ -1,6 +1,7 @@ package mx.trackermap.TrackerMap.android.units import android.os.Bundle +import android.util.Log import androidx.appcompat.app.AppCompatActivity import androidx.core.widget.doAfterTextChanged import androidx.fragment.app.commit @@ -33,13 +34,19 @@ class UnitsActivity : AppCompatActivity() { } private fun setupEvents() { + binding.profileButton.setOnClickListener { + Log.d("UnitsActivity", "Profile tapped") + } binding.displayModeToggle.setOnClickListener { + Log.d("UnitsActivity", "Units display toggle tapped") unitsViewModel.toggleDisplayMode() } binding.searchInput.doAfterTextChanged { + Log.d("UnitsActivity", "Search changed to ${it.toString()}") unitsViewModel.searchQuery.value = it.toString() } binding.searchInput.setOnEditorActionListener { _, _, _ -> + Log.d("UnitsActivity", "Search key tapped") unitsViewModel.search() true } diff --git a/androidApp/src/main/res/layout/activity_main.xml b/androidApp/src/main/res/layout/activity_main.xml deleted file mode 100644 index 73626a6..0000000 --- a/androidApp/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/androidApp/src/main/res/layout/units_activity.xml b/androidApp/src/main/res/layout/units_activity.xml index 5bfb228..4f4ee77 100644 --- a/androidApp/src/main/res/layout/units_activity.xml +++ b/androidApp/src/main/res/layout/units_activity.xml @@ -9,30 +9,42 @@ android:id="@+id/displayContainer" android:layout_width="0dp" android:layout_height="0dp" - android:layout_marginTop="16dp" + android:layout_marginTop="@dimen/fab_margin" app:layout_constraintTop_toBottomOf="@id/displayModeToggle" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintBottom_toBottomOf="parent"/> + + + app:cardElevation="@dimen/card_elevation"> + android:layout_marginEnd="@dimen/fab_margin" + android:layout_marginTop="@dimen/fab_margin" + app:elevation="@dimen/fab_elevation"/> \ No newline at end of file diff --git a/androidApp/src/main/res/values/dimen.xml b/androidApp/src/main/res/values/dimen.xml index c39d301..cd4d970 100644 --- a/androidApp/src/main/res/values/dimen.xml +++ b/androidApp/src/main/res/values/dimen.xml @@ -6,4 +6,12 @@ 32dp 16dp 16dp + + + 8dp + 4dp + + + 16dp + 8dp \ No newline at end of file diff --git a/androidApp/src/main/res/values/strings.xml b/androidApp/src/main/res/values/strings.xml index 3919343..0a42223 100644 --- a/androidApp/src/main/res/values/strings.xml +++ b/androidApp/src/main/res/values/strings.xml @@ -11,4 +11,5 @@ Details Reports Commands + Type to search \ No newline at end of file -- cgit v1.2.3