Compare commits

...

1 commit

Author SHA1 Message Date
dece 732a2db166 WIP 2022-01-16 14:25:28 +01:00
3 changed files with 19 additions and 0 deletions

View file

@ -1,6 +1,8 @@
package dev.lowrespalmtree.comet package dev.lowrespalmtree.comet
import android.os.Bundle import android.os.Bundle
import android.util.Log
import android.view.View
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import androidx.navigation.fragment.NavHostFragment import androidx.navigation.fragment.NavHostFragment
import androidx.navigation.ui.setupWithNavController import androidx.navigation.ui.setupWithNavController
@ -17,7 +19,18 @@ class MainActivity : AppCompatActivity() {
supportFragmentManager.findFragmentById(R.id.nav_host_fragment)?.also { navHost -> supportFragmentManager.findFragmentById(R.id.nav_host_fragment)?.also { navHost ->
findViewById<NavigationView>(R.id.drawer_navigation)?.apply { findViewById<NavigationView>(R.id.drawer_navigation)?.apply {
setupWithNavController((navHost as NavHostFragment).navController) 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")
}
} }

View file

@ -1,5 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <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 <item
android:id="@+id/history" android:id="@+id/history"
android:icon="@android:drawable/ic_menu_recent_history" android:icon="@android:drawable/ic_menu_recent_history"

View file

@ -27,6 +27,7 @@
<string name="attachment_summary_on">Automatically download attachments for incoming emails <string name="attachment_summary_on">Automatically download attachments for incoming emails
</string> </string>
<string name="attachment_summary_off">Only download attachments when manually requested</string> <string name="attachment_summary_off">Only download attachments when manually requested</string>
<string name="home">Home</string>
</resources> </resources>