Merge pull request #1678 from osodebailar/feature/add-group-to-optionmenu
add group to option menu for static entries
This commit is contained in:
commit
3f1df34469
|
@ -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)
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue