xuxiuxi
2017-04-11 a4559fbb7221023f2798d38bc9634906876259a5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package cn.com.basic.face.widget.checkin;
 
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 android.widget.Toast;
 
import com.bsk.zhangbo.demoforbsk.R;
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;
import com.lidroid.xutils.view.annotation.event.OnClick;
 
import cn.com.basic.face.base.MainActivity;
import cn.com.basic.face.discern.query.item.CheckInQueryItem;
import cn.com.basic.face.util.AppApi;
 
public class CheckInRightIntervieweeCell extends LinearLayout{
 
    private CheckInQueryItem item;
 
    public CheckInRightIntervieweeCell(Context context) {
        super(context);
    }
 
    public CheckInRightIntervieweeCell(Context context, AttributeSet attrs) {
        super(context, attrs);
        LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        View view = inflater.inflate(R.layout.fragment_check_in_right_interviewee,this);
        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.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()));
    }
 
    public CheckInQueryItem getInterviewee() {
        return item;
    }
 
    @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.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.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);
    }
 
}