Created
January 29, 2014 13:08
-
-
Save luboganev/8687562 to your computer and use it in GitHub Desktop.
Android Search compat action item collapse/expand
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MenuItemCompat.setOnActionExpandListener(search, new MenuItemCompat.OnActionExpandListener() { | |
@Override | |
public boolean onMenuItemActionExpand(MenuItem menuItem) { | |
Toast.makeText(getApplicationContext(), "Expand", Toast.LENGTH_SHORT).show(); | |
return true; | |
} | |
@Override | |
public boolean onMenuItemActionCollapse(MenuItem menuItem) { | |
Toast.makeText(getApplicationContext(), "Collapse", Toast.LENGTH_SHORT).show(); | |
return true; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment