SHARE
TWEET

Untitled

a guest Jan 24th, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CustomPowerMenu customPowerMenu = new CustomPowerMenu.Builder<>(context, new IconMenuAdapter())
  2.           .addItem(new IconPowerMenuItem(context.getResources().getDrawable(R.drawable.ic_wechat), "WeChat"))
  3.           .addItem(new IconPowerMenuItem(context.getResources().getDrawable(R.drawable.ic_facebook), "Facebook"))
  4.           .addItem(new IconPowerMenuItem(context.getResources().getDrawable(R.drawable.ic_twitter), "Twitter"))
  5.           .addItem(new IconPowerMenuItem(context.getResources().getDrawable(R.drawable.ic_line), "Line"))
  6.           .setOnMenuItemClickListener(onIconMenuItemClickListener)
  7.           .setAnimation(MenuAnimation.SHOWUP_TOP_RIGHT)
  8.           .setMenuRadius(10f)
  9.           .setMenuShadow(10f)
  10.           .build();
  11.  
  12. private OnMenuItemClickListener<IconPowerMenuItem> onIconMenuItemClickListener = new OnMenuItemClickListener<IconPowerMenuItem>() {
  13.     @Override
  14.     public void onItemClick(int position, IconPowerMenuItem item) {
  15.         Toast.makeText(getBaseContext(), item.getTitle(), Toast.LENGTH_SHORT).show();
  16.         iconMenu.dismiss();
  17.     }
  18. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top