xuxiuxi
2017-06-27 c7d60f1695f7fd2c8b1ff7a1e4965d4697aca7ac
VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/dialog/AddDialog.java
@@ -18,8 +18,8 @@
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;
import com.lidroid.xutils.view.annotation.event.OnClick;
import com.wx.wheelview.adapter.BaseWheelAdapter;
import com.wx.wheelview.widget.WheelView;
import cn.com.basic.face.dialog.wheelview.adapter.BaseWheelAdapter;
import cn.com.basic.face.dialog.wheelview.widget.WheelView;
import java.util.ArrayList;
import java.util.List;
@@ -42,6 +42,7 @@
    public static List genderList = new ArrayList();
    public static List idTypeList = new ArrayList();
    public static List visitReasonList = new ArrayList();
    public int type;
    public static void setVisitorTypeList(List visitorTypeList) {
        AddDialog.visitorTypeList = visitorTypeList;
@@ -56,6 +57,7 @@
    }
    public AddDialog(View parentView, int type, OkClickedListener okButtonClickedListener) {
        this.type = type;
        this.parentView = parentView;
        View view = LayoutInflater.from(MainActivity.getInstance()).inflate(R.layout.dialog_add,null);
        ViewUtils.inject(this, view);
@@ -66,6 +68,7 @@
        style.selectedTextSize = 22;
        style.textSize = 16;
        style.holoBorderColor = Color.parseColor("#11c3e3");
        view.setOnTouchListener(new View.OnTouchListener() {
            @Override
@@ -123,9 +126,18 @@
    private void setTitleAndList(int type) {
        String tile = "";
        switch (type) {
            case Constant.DialogSelectType.VISIT_REASON_ADD:
            case Constant.DialogSelectType.VISIT_REASON:
                tile = "添加访问事由";
                break;
            case Constant.DialogSelectType.PROTOCOL:
                tile = "添加通讯";
                break;
            case Constant.DialogSelectType.RESOLUTION:
                tile = "添加分辨率";
                break;
            case Constant.DialogSelectType.CAMERA_BRAND:
                tile = "添加摄像机品牌";
                break;
        }
        dialog_add_title.setText(tile);
    }