Reputation: 602
I want to implement Dialog where I will be able to set values.
I also would want to Dialog will Popup when I click on three dots (Menu) on Toolbar.
So far I've got menu
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
>
<item
android:id="@+id/menu_allclients_min_date"
android:orderInCategory="200"
android:title="@string/menu_min_date"
app:showAsAction="never" />
<item
android:id="@+id/menu_allclients_max_date"
android:orderInCategory="201"
android:title="@string/menu_max_date"
app:showAsAction="never" />
<item
android:id="@+id/menu_allclients_min_amount"
android:orderInCategory="202"
android:title="@string/menu_min_amount"
app:showAsAction="never" />
<item
android:id="@+id/menu_allclients_max_amount"
android:orderInCategory="203"
android:title="@string/menu_max_amount"
app:showAsAction="never" />
Now, when Menu is clicked it show as list of four items. But It isn't a way I want to implement it.
I would also know is there any listener when Menu icon( three dots ) is clicked. It would solve my problem.
Upvotes: 0
Views: 428
Reputation: 1571
For help i sugest, if you dont have more than 2 menu itens, make a menu item set the 3 dots as icon and always as showasaction. After that in on menu item selected in your activity make a switch to check item selected and if is the 3 dots item make the dialog.
Upvotes: 1