xuxiuxi
2017-04-19 4101a19a8f119fd4d5408efcfd9db6e90c82ac0c
VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/widget/checkin/CheckInRightIntervieweeCell.java
@@ -11,6 +11,7 @@
import android.widget.Toast;
import com.bsk.zhangbo.demoforbsk.R;
import com.facebook.drawee.view.SimpleDraweeView;
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;
import com.lidroid.xutils.view.annotation.event.OnClick;
@@ -21,7 +22,18 @@
public class CheckInRightIntervieweeCell extends LinearLayout{
    private CheckInQueryItem item = new CheckInQueryItem();
    @ViewInject(R.id.fragment_check_in_right_interviewee_cell_name)
    private TextView fragment_check_in_right_interviewee_cell_name;
    @ViewInject(R.id.fragment_check_in_right_interviewee_cell_dept)
    private TextView fragment_check_in_right_interviewee_cell_dept;
    @ViewInject(R.id.fragment_check_in_right_interviewee_cell_post)
    private TextView fragment_check_in_right_interviewee_cell_post;
    @ViewInject(R.id.fragment_check_in_right_interviewee_cell_photo)
    private ImageView fragment_check_in_right_interviewee_cell_photo;
    @ViewInject(R.id.fragment_check_in_right_interviewee_cell_photo_placeholder)
    private TextView fragment_check_in_right_interviewee_cell_photo_placeholder;
    private CheckInQueryItem item;
    public CheckInRightIntervieweeCell(Context context) {
        super(context);
@@ -34,22 +46,18 @@
        ViewUtils.inject(this, view);
    }
    @ViewInject(R.id.fragment_check_in_right_interviewee_cell_name)
    private TextView fragment_check_in_right_interviewee_cell_name;
    @ViewInject(R.id.fragment_check_in_right_interviewee_cell_dept)
    private TextView fragment_check_in_right_interviewee_cell_dept;
    @ViewInject(R.id.fragment_check_in_right_interviewee_cell_post)
    private TextView fragment_check_in_right_interviewee_cell_post;
    @ViewInject(R.id.fragment_check_in_right_interviewee_cell_photo)
    private ImageView fragment_check_in_right_interviewee_cell_photo;
    public void setIntervieweeInfo(final CheckInQueryItem item) {
        if (item == null) return;
        this.item = item;
        fragment_check_in_right_interviewee_cell_name.setText(item.getName());
        fragment_check_in_right_interviewee_cell_name.setText(item.getUsername());
        fragment_check_in_right_interviewee_cell_dept.setText(item.getDeptName());
        fragment_check_in_right_interviewee_cell_post.setText(item.getPostName());
        fragment_check_in_right_interviewee_cell_photo.setImageURI(Uri.parse(AppApi.IMAGE_URL_BASE + item.getImagePath()));
        if (item.getImagePath() != null && !item.getImagePath().equals("")) {
            fragment_check_in_right_interviewee_cell_photo_placeholder.setVisibility(INVISIBLE);
        } else {
            fragment_check_in_right_interviewee_cell_photo_placeholder.setVisibility(VISIBLE);
        }
    }
    public CheckInQueryItem getInterviewee() {
@@ -58,12 +66,19 @@
    @OnClick(R.id.fragment_check_in_right_interviewee_cell_call_tel)
    public void fragment_check_in_right_interviewee_cell_call_tel_click(View view) {
        Toast.makeText(MainActivity.getInstance(), "正在呼叫座机"+item.getPhone(), Toast.LENGTH_SHORT).show();
        Toast.makeText(MainActivity.getInstance(), "正在呼叫座机"+item.getMobilePhone(), Toast.LENGTH_SHORT).show();
    }
    @OnClick(R.id.fragment_check_in_right_interviewee_cell_call_mobile)
    public void fragment_check_in_right_interviewee_cell_call_mobile_click(View view) {
        Toast.makeText(MainActivity.getInstance(), "正在呼叫手机"+item.getPhone(), Toast.LENGTH_SHORT).show();
        Toast.makeText(MainActivity.getInstance(), "正在呼叫手机"+item.getMobilePhone(), Toast.LENGTH_SHORT).show();
    }
    public void resetForm() {
        fragment_check_in_right_interviewee_cell_name.setText("");
        fragment_check_in_right_interviewee_cell_dept.setText("");
        fragment_check_in_right_interviewee_cell_post.setText("");
        fragment_check_in_right_interviewee_cell_photo.setImageURI(null);
    }
}