-
-
Notifications
You must be signed in to change notification settings - Fork 0
Action Menu
Federico Navarrete edited this page Jul 1, 2019
·
2 revisions
Create main.xml
file in Resources
folder
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:title="Item 1"/>
<item android:title="Item 2"/>
<item android:title="Item 3"/>
</menu>
searchBar = FindViewById<MaterialSearchBar>(Resource.Id.searchBar);
searchBar.InflateMenu(Resource.Menu.main);
searchBar.PopupMenu.SetOnMenuItemClickListener(new PopupMenuListener());
public class PopupMenuListener : PopupMenu.IOnMenuItemClickListener
{
public bool OnMenuItemClick(IMenuItem item) {
switch (item.Id)
{
case Resource.Id.action_settings:
break;
}
return false;
}
}
YouTube | Amazon | Goodreads | Cyber Prophets | Sharing Your Stories | TikTok | ||
---|---|---|---|---|---|---|---|
© Federico Navarrete and Supernova IC, 2017-2024. Based on: MaterialSearchBar by Mansur Nashaev.