Merge pull request #1678 from osodebailar/feature/add-group-to-optionmenu

add group to option menu for static entries
This commit is contained in:
Milos Kozak 2022-04-25 18:37:58 +02:00 committed by GitHub
commit 3f1df34469
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -296,6 +296,7 @@ class MainActivity : NoSplashAppCompatActivity() {
} }
override fun onCreateOptionsMenu(menu: Menu): Boolean { override fun onCreateOptionsMenu(menu: Menu): Boolean {
menu.setGroupDividerEnabled(true)
this.menu = menu this.menu = menu
menuInflater.inflate(R.menu.menu_main, menu) menuInflater.inflate(R.menu.menu_main, menu)
pluginPreferencesMenuItem = menu.findItem(R.id.nav_plugin_preferences) pluginPreferencesMenuItem = menu.findItem(R.id.nav_plugin_preferences)

View file

@ -44,6 +44,7 @@
android:orderInCategory="1" android:orderInCategory="1"
app:showAsAction="never" app:showAsAction="never"
android:title="@string/nav_profilehelper" /> android:title="@string/nav_profilehelper" />
<group android:id="@+id/about_exit">
<item <item
android:id="@+id/nav_about" android:id="@+id/nav_about"
android:orderInCategory="1" android:orderInCategory="1"
@ -54,5 +55,5 @@
android:orderInCategory="1" android:orderInCategory="1"
app:showAsAction="never" app:showAsAction="never"
android:title="@string/nav_exit" /> android:title="@string/nav_exit" />
</group>
</menu> </menu>