WIP
This commit is contained in:
parent
51d1844ba0
commit
a9d278696d
|
@ -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")
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -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"
|
||||||
|
|
|
@ -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>
|
Reference in a new issue