xuxiuxi
2017-03-30 8081d0d398ce1b2987f810e7e89e7c6fe473b4bc
VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/adapter/CheckInRightCellAdapter.java
@@ -38,6 +38,10 @@
        this.type = type;
    }
    public CheckInRightCellAdapter(Context mContext) {
        this.mContext = mContext;
    }
    @Override
    public int[] getItemLayouts() {
        return new int[]{R.layout.fragment_check_in_left_visitor_row, R.layout.fragment_check_in_left_interviewee_row};
@@ -46,10 +50,10 @@
    @Override
    public void onBindRecycleViewHolder(EasyRecyclerViewHolder viewHolder, int position) {
        switch (type) {
            case Constant.VISITOR_CELL:
            case Constant.VISITOR_ROW:
                visitorCellHolder(viewHolder, position);
                break;
            case Constant.INTERVIEWEE_CELL:
            case Constant.INTERVIEWEE_ROW:
                intervieweeCellHolder(viewHolder, position);
                break;
        }
@@ -58,9 +62,9 @@
    @Override
    public int getRecycleViewItemType(int position) {
        switch (type) {
            case Constant.VISITOR_CELL:
            case Constant.VISITOR_ROW:
                return 0;
            case Constant.INTERVIEWEE_CELL:
            case Constant.INTERVIEWEE_ROW:
                return 1;
            default:
                return 1;
@@ -147,4 +151,16 @@
        this.mTypeColor = type;
    }
    public void setVisitorRow() {
        this.type = Constant.VISITOR_ROW;
    }
    public void setIntervieweeRow() {
        this.type = Constant.INTERVIEWEE_ROW;
    }
    public void setRowType(int type) {
        this.type = type;
    }
}