xuxiuxi
2017-04-07 9710ad282ec977387a635e19b53433948f72539d
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
package cn.com.basic.face.widget.phonecall;
 
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.PhoneCallQueryItem;
import cn.com.basic.face.service.vo.PhoneCallFragment;
import cn.com.basic.face.util.AppApi;
 
public class PhoneCallRightIntervieweeCell extends LinearLayout {
 
    @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;
 
    private PhoneCallQueryItem item = new PhoneCallQueryItem();
 
    public PhoneCallRightIntervieweeCell(Context context) {
        super(context);
    }
 
    public PhoneCallRightIntervieweeCell(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);
    }
 
    public void setIntervieweeInfo(final PhoneCallQueryItem item) {
        if (item == null) return;
        this.item = item;
        fragment_check_in_right_interviewee_cell_name.setText(item.getName());
        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.IMAGEURL_BASE + item.getImagePath()));
    }
 
    @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.getTel(), 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();
    }
 
}