当前位置 : 主页 > 编程语言 > c++ >

EpointGridPopView.java

来源:互联网 收集:自由互联 发布时间:2021-06-30
EpointGridPopView.java package com.epoint.showcase.frgs;import android.os.Bundle;import android.view.View;import android.widget.Toast;import com.epoint.frame.R;import com.epoint.frame.actys.SMPBaseFragment;import com.epoint.frame.core.contr
EpointGridPopView.java
package com.epoint.showcase.frgs;

import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import com.epoint.frame.R;
import com.epoint.frame.actys.SMPBaseFragment;
import com.epoint.frame.core.controls.EpointGridPopView;
import com.epoint.frame.core.controls.IconClickListener;

/**
 * 作者: 李林
 * 时间: 2017/9/22 14:35
 * 版本: [1.0, 2017/9/22]
 * 版权: 江苏国泰新点软件有限公司
 * 描述: 下拉菜单:横方向
 */
public class SMPPullMenu2Fragment extends SMPBaseFragment {

    EpointGridPopView 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};
                    //菜单显示位置(在该控件下方弹出)
                    View locationView = getNbBar().nbRight;
                    popupWindow = new EpointGridPopView(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();
            }
        });
    }
}
上一篇:ActionSheet.java
下一篇:EpointSideMenu.java
网友评论