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

ActionSheet.java

来源:互联网 收集:自由互联 发布时间:2021-06-30
ActionSheet.java package com.epoint.showcase.actys;import android.os.Bundle;import android.view.View;import com.epoint.custom.ActionSheet;import com.epoint.frame.R;import com.epoint.frame.core.controls.EpointToast;import com.epoint.mobileoa
ActionSheet.java
package com.epoint.showcase.actys;

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

import com.epoint.custom.ActionSheet;
import com.epoint.frame.R;
import com.epoint.frame.core.controls.EpointToast;
import com.epoint.mobileoa.actys.other.MOABaseActivity;

public class ShowCaseActivity extends MOABaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setLayout(R.layout.show_case_activity);

        getActivity().setTheme(R.style.ActionSheetStyleIOS7); // 首先添加主题
        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) {
                ActionSheet menuView = new ActionSheet(getActivity());
                menuView.setCancelButtonTitle("取消");// before add items
                menuView.addItems("回复", "转发");
                menuView.setItemClickListener(new ActionSheet.MenuItemClickListener() {
                    @Override
                    public void onItemClick(int index) {
                        EpointToast.showShort(getContext(), "select " + index + "");
                    }
                });
                menuView.setCancelableOnTouchMenuOutside(true);
                menuView.showMenu();
            }
        });

    }

}
上一篇:CRC16Utils
下一篇:EpointGridPopView.java
网友评论