xuxiuxi
2017-05-03 1cbe3da23535a1111510a6fce6fe24fd2983bfd1
VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/widget/checkin/CheckInRightIntervieweeCell.java
@@ -3,6 +3,7 @@
import android.content.Context;
import android.net.Uri;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
@@ -11,12 +12,22 @@
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;
import org.xutils.http.RequestParams;
import java.text.SimpleDateFormat;
import java.util.Date;
import cn.com.basic.face.base.BaseApplication;
import cn.com.basic.face.base.MainActivity;
import cn.com.basic.face.discern.entity.PhoneCall;
import cn.com.basic.face.discern.query.item.CheckInQueryItem;
import cn.com.basic.face.fragment.CheckInFragment;
import cn.com.basic.face.service.PhoneCallMng;
import cn.com.basic.face.util.AppApi;
public class CheckInRightIntervieweeCell extends LinearLayout{
@@ -29,6 +40,8 @@
    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;
@@ -41,6 +54,11 @@
        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);
        float x = fragment_check_in_right_interviewee_cell_name.getTextSize();
        //fragment_check_in_right_interviewee_cell_name.setTextSize(TypedValue.COMPLEX_UNIT_PX, 50f);
        //float y = fragment_check_in_right_interviewee_cell_name.getTextSize();
        //System.out.println("h");
    }
    public void setIntervieweeInfo(final CheckInQueryItem item) {
@@ -49,7 +67,14 @@
        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()));
        fragment_check_in_right_interviewee_cell_photo.setImageURI(Uri.parse(AppApi.IMAGE_URL_BASE + item.getSurveillancePhoto()));
        if (item.getSurveillancePhoto() != null && !item.getSurveillancePhoto().equals("")) {
            fragment_check_in_right_interviewee_cell_photo_placeholder.setVisibility(INVISIBLE);
        } else {
            fragment_check_in_right_interviewee_cell_photo.setImageURI(Uri.parse(AppApi.IMAGE_URL_BASE + "u45.png"));
            fragment_check_in_right_interviewee_cell_photo_placeholder.setVisibility(INVISIBLE);
        }
    }
    public CheckInQueryItem getInterviewee() {
@@ -58,19 +83,22 @@
    @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();
        PhoneCallMng.getInstance().addPhoneCall(CheckInFragment.getInstance().getFragment_check_in_right_visitor_cell().getVisitor(), item);
    }
    @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();
        PhoneCallMng.getInstance().addPhoneCall(CheckInFragment.getInstance().getFragment_check_in_right_visitor_cell().getVisitor(), item);
    }
    public void resetForm() {
        fragment_check_in_right_interviewee_cell_name.setText("");
        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_placeholder.setText("添加\n被访人员");
        fragment_check_in_right_interviewee_cell_photo_placeholder.setVisibility(VISIBLE);
        fragment_check_in_right_interviewee_cell_photo.setImageURI(null);
        item = null;
    }
}