| | |
| | | package cn.com.basic.face.widget;
|
| | |
|
| | | import android.content.Context;
|
| | | import android.net.Uri;
|
| | | import android.util.AttributeSet;
|
| | | import android.view.LayoutInflater;
|
| | | import android.view.View;
|
| | | import android.widget.ImageView;
|
| | | import android.widget.LinearLayout;
|
| | | import android.widget.TextView;
|
| | |
|
| | | import com.bsk.zhangbo.demoforbsk.R;
|
| | | import com.lidroid.xutils.ViewUtils;
|
| | | import com.lidroid.xutils.view.annotation.ViewInject;
|
| | |
|
| | | import cn.com.basic.face.discern.query.item.VisitorQueryItem;
|
| | | import cn.com.basic.face.discern.query.item.CheckInQueryItem;
|
| | | import cn.com.basic.face.util.AppApi;
|
| | |
|
| | | /**
|
| | | * Created by Sinoe on 2017/2/22.
|
| | | */
|
| | |
|
| | | public class CheckInRightVisitorCell extends LinearLayout{
|
| | | private Context mContext;
|
| | | private TextView mTvTitle,mTvPhone,mTvCompany,mTvCardId,mTvDepartment,mTvWork,mBtnLandline,mBtnMobile;
|
| | | private LinearLayout mLayoutTo,mLayoutFrom;
|
| | | private CheckInQueryItem item;
|
| | |
|
| | | public CheckInRightVisitorCell(Context context) {
|
| | | super(context);
|
| | | }
|
| | |
|
| | | public CheckInRightVisitorCell(Context context, AttributeSet attrs) {
|
| | | super(context, attrs);
|
| | | this.mContext = context;
|
| | | LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
| | | View view = inflater.inflate(R.layout.fragment_check_in_right_visitor,this);
|
| | |
|
| | | mTvTitle = (TextView) findViewById(R.id.fragment_check_in_right_interviewee_cell_name);
|
| | | ViewUtils.inject(this, view);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 设置类型
|
| | | * @param type
|
| | | */
|
| | | public void setType(int type){
|
| | | @ViewInject(R.id.fragment_check_in_right_visitor_cell_name)
|
| | | private TextView fragment_check_in_right_visitor_cell_name;
|
| | | @ViewInject(R.id.fragment_check_in_right_visitor_cell_company_name)
|
| | | private TextView fragment_check_in_right_visitor_cell_company_name;
|
| | | @ViewInject(R.id.fragment_check_in_right_visitor_cell_identity_number)
|
| | | private TextView fragment_check_in_right_visitor_cell_identity_number;
|
| | | @ViewInject(R.id.fragment_check_in_right_visitor_cell_photo)
|
| | | private ImageView fragment_check_in_right_visitor_cell_photo;
|
| | | @ViewInject(R.id.fragment_check_in_right_visitor_cell_mobile_phone)
|
| | | private TextView fragment_check_in_right_visitor_cell_mobile_phone;
|
| | |
|
| | | public void setVisitorInfo(CheckInQueryItem item) {
|
| | | this.item = item;
|
| | | fragment_check_in_right_visitor_cell_name.setText(item.getName());
|
| | | fragment_check_in_right_visitor_cell_company_name.setText(item.getCompanyName());
|
| | | fragment_check_in_right_visitor_cell_identity_number.setText(item.getIdentify());
|
| | | fragment_check_in_right_visitor_cell_mobile_phone.setText(item.getPhone());
|
| | | fragment_check_in_right_visitor_cell_photo.setImageURI(Uri.parse(AppApi.IMAGEURL_BASE + item.getImagePath()));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 设置标题
|
| | | * @param title
|
| | | */
|
| | | public void setTitle(String title){
|
| | | mTvTitle.setText(title);
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | public void setVisitorInfo(VisitorQueryItem item) {
|
| | | // fragment_check_in_right_visitor_cell.setTitle(item.getName());
|
| | | // leftCompanyName.setText(item.getCompanyName());
|
| | | // leftIdentityNumber.setText(item.getIdentify());
|
| | | // leftMobilePhone.setText(item.getPhone());
|
| | | // leftPhoto.setImageURI(Uri.parse(AppApi.CHENXINGGROUND_IMAGEURL_BASE + item.getImagePath()));
|
| | | public CheckInQueryItem getVisitor() {
|
| | | return item;
|
| | | }
|
| | | }
|