Compare commits
1 commit
473b1e012c
...
732a2db166
Author | SHA1 | Date | |
---|---|---|---|
dece | 732a2db166 |
|
@ -1,6 +1,8 @@
|
|||
package dev.lowrespalmtree.comet
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.navigation.fragment.NavHostFragment
|
||||
import androidx.navigation.ui.setupWithNavController
|
||||
|
@ -17,7 +19,18 @@ class MainActivity : AppCompatActivity() {
|
|||
supportFragmentManager.findFragmentById(R.id.nav_host_fragment)?.also { navHost ->
|
||||
findViewById<NavigationView>(R.id.drawer_navigation)?.apply {
|
||||
setupWithNavController((navHost as NavHostFragment).navController)
|
||||
// setNavigationItemSelectedListener { menuItem ->
|
||||
// when (menuItem.itemId) {
|
||||
// R.id.home -> Log.w("AJAJ", "clickkkkk")
|
||||
// else ->
|
||||
// }
|
||||
// true
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun prout(item: android.view.MenuItem) {
|
||||
Log.w("AJAJ", "koiluuut")
|
||||
}
|
||||
}
|
|
@ -1,5 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/home"
|
||||
android:icon="@android:drawable/ic_menu_myplaces"
|
||||
android:title="@string/home"
|
||||
android:onClick="prout" />
|
||||
<item
|
||||
android:id="@+id/history"
|
||||
android:icon="@android:drawable/ic_menu_recent_history"
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
<string name="attachment_summary_on">Automatically download attachments for incoming emails
|
||||
</string>
|
||||
<string name="attachment_summary_off">Only download attachments when manually requested</string>
|
||||
<string name="home">Home</string>
|
||||
|
||||
|
||||
</resources>
|
Reference in a new issue