aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java/mx/trackermap/TrackerMap
diff options
context:
space:
mode:
Diffstat (limited to 'androidApp/src/main/java/mx/trackermap/TrackerMap')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt24
1 files changed, 21 insertions, 3 deletions
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 6bc7aab..9598077 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
@@ -2,6 +2,8 @@ package mx.trackermap.TrackerMap.android.units
import android.os.Bundle
import android.util.Log
+import android.view.Gravity
+import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.core.widget.doAfterTextChanged
import androidx.fragment.app.commit
@@ -36,11 +38,27 @@ class UnitsActivity : AppCompatActivity() {
}
private fun setupEvents() {
- binding.profileButton.setOnClickListener {
- Log.d("UnitsActivity", "Profile tapped")
+ binding.drawerButton.setOnClickListener {
+ binding.drawerLayout.openDrawer(Gravity.LEFT)
+ }
+ binding.navigationView.setNavigationItemSelectedListener {
+ when (it.itemId) {
+ R.id.nav_account -> {
+ Toast.makeText(this, "Account button tapped!", Toast.LENGTH_SHORT).show()
+ true
+ }
+ R.id.nav_about -> {
+ Toast.makeText(this, "About button tapped!", Toast.LENGTH_SHORT).show()
+ true
+ }
+ R.id.nav_logout -> {
+ Toast.makeText(this, "Logout button tapped!", Toast.LENGTH_SHORT).show()
+ true
+ }
+ else -> false
+ }
}
binding.displayModeToggle.setOnClickListener {
- Log.d("UnitsActivity", "Units display toggle tapped")
unitsViewModel.toggleDisplayMode()
}
binding.searchInput.doAfterTextChanged {