EpointSideMenu.java /** * 作者: 李林 * 时间: 2017/9/22 14:34 * 版本: [1.0, 2017/9/22] * 版权: 江苏国泰新点软件有限公司 * 描述: 下拉菜单:竖方向 */public class SMPPullMenuFragment extends SMPBaseFrag
/** * 作者: 李林 * 时间: 2017/9/22 14:34 * 版本: [1.0, 2017/9/22] * 版权: 江苏国泰新点软件有限公司 * 描述: 下拉菜单:竖方向 */ public class SMPPullMenuFragment extends SMPBaseFragment { EpointSideMenu popupWindow; @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); getNbBar().nbRight.setVisibility(View.VISIBLE); getNbBar().nbRight.setImageResource(R.drawable.frm_nav_bulb); getNbBar().nbRight.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (popupWindow == null) { final String[] titles = new String[]{"写邮件", "发公告", "建日程"}; int[] images = new int[]{R.drawable.moa_email_add_btn, R.drawable.moa_announce_btn, R.drawable.moa_add_schedule_btn, R.drawable.moa_email_add_btn, R.drawable.moa_announce_btn, R.drawable.moa_add_schedule_btn}; View locationView = getNbBar().nbRight; // 显示位置 popupWindow = new EpointSideMenu(getActivity(), locationView, titles, images, new IconClickListener() { @Override public void iconClick(int index) { Toast.makeText(getContext(), titles[index], Toast.LENGTH_SHORT).show(); } }); } // popupWindow.setIconFilterColor(getResources().getColor(R.color.green)); // 修改图标颜色 popupWindow.showOrDismiss(); } }); } }