QQ右上角气泡菜单

 //QQ右上角气泡
    compile 'com.zaaach:toprightmenu:1.0'
TopRightMenu topRightMenu = new TopRightMenu(getActivity());
                topRightMenu
                        .setHeight(300)     //默认高度480
                        .setWidth(300)      //默认宽度wrap_content
                        .showIcon(true)     //显示菜单图标,默认为true
                        .dimBackground(true)        //背景变暗,默认为true
                        .needAnimationStyle(true)   //显示动画,默认为true
                        .setAnimationStyle(R.style.TRM_ANIM_STYLE)
                        .addMenuItem(new MenuItem(R.mipmap.wanba_icon, "扫一扫"))
                        .addMenuItem(new MenuItem(R.mipmap.roo_icon, "红包"))
//                        .addMenuItem(new MenuItem(R.mipmap.coach_icon, "面对面建群"))
                        .setOnMenuItemClickListener(new TopRightMenu.OnMenuItemClickListener() {
                            @Override
                            public void onMenuItemClick(int position) {
                                Toast.makeText(getActivity(), "点击菜单:" + position, Toast.LENGTH_SHORT).show();
                            }
                        })
                        .showAsDropDown(mHomeOption, -225, 0);    //带偏移量

猜你喜欢

转载自blog.csdn.net/jing_80/article/details/84752782