package com.basic.security.widget;
|
|
import android.content.Context;
|
import android.util.AttributeSet;
|
import android.view.View;
|
import android.widget.CheckBox;
|
import android.widget.CompoundButton;
|
import android.widget.FrameLayout;
|
import android.widget.ImageView;
|
|
import com.basic.security.R;
|
|
import org.androidannotations.annotations.EViewGroup;
|
|
public class FaceView extends FrameLayout {
|
|
Object bean;
|
|
public FaceView(Context context, Object bean) {
|
super(context);
|
this.bean = bean;
|
initView();
|
|
}
|
|
public FaceView(Context context) {
|
super(context);
|
initView();
|
}
|
|
public FaceView(Context context, AttributeSet attrs) {
|
super(context, attrs);
|
initView();
|
}
|
|
public FaceView(Context context, AttributeSet attrs, int defStyleAttr) {
|
super(context, attrs, defStyleAttr);
|
initView();
|
}
|
|
private void initView() {
|
View view = inflate(getContext(), R.layout.face_view, null);
|
ImageView face = view.findViewById(R.id.face);
|
// cb.setText(bean+"");
|
// cb.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
// @Override
|
// public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
// System.out.println("bean=="+bean+","+isChecked);
|
// }
|
// });
|
addView(view);
|
}
|
|
}
|