Ich habe Probleme damit, diesen Java-Code in Xamarin zu implementieren. Ich habe versucht searchView.Close += delegate { };
, aber es funktioniert nicht.Xamarin searchview OnActionExpandListener
searchMI.setOnActionExpandListener(new MenuItem.OnActionExpandListener() {
@Override
public boolean onMenuItemActionExpand(MenuItem item) {
Toast.makeText(getApplicationContext(), "MenuItem#onMenuItemActionExpand", Toast.LENGTH_SHORT).show();
return true;
}
@Override
public boolean onMenuItemActionCollapse(MenuItem item) {
Toast.makeText(getApplicationContext(), "MenuItem#onMenuItemActionExpand", Toast.LENGTH_SHORT).show();
return true;
}
});