I am using ActionBarSherlock in my application and I want to implement popup menu like the below image, having a logo and respective text.
Please help me to achieve this, any help would be appreciable.
Thanks
Here it is.This is actually done in the app which you posted screenshot for.I think you are familiar with ActionbarSherlok.The button for this dropdown menu will be on actionbar.
public boolean onCreateOptionsMenu(Menu menu) {
// Used to put dark icons on light action bar
SubMenu subMenu1 = menu.addSubMenu("");
subMenu1.add("Item1").setIcon(R.drawable.icon).setOnMenuItemClickListener(
new OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
return false;
}
});
MenuItem subMenu1Item = subMenu1.getItem();
subMenu1Item.setIcon(R.drawable.abs__ic_menu_moreoverflow_holo_dark);
subMenu1Item.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS
| MenuItem.SHOW_AS_ACTION_WITH_TEXT);
return true;
}
Added PopupMenu
in ActionBarSherlock.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With