| | |
| | | import android.view.View;
|
| | | import android.widget.CheckBox;
|
| | | import android.widget.CompoundButton;
|
| | | import android.widget.RadioButton;
|
| | | import android.widget.TextView;
|
| | |
|
| | | import com.bsk.zhangbo.demoforbsk.R;
|
| | |
| | |
|
| | | public static class VisitLeftAdapter extends EasyRecyclerViewAdapter {
|
| | |
|
| | | private RadioButton lastRadioButton;
|
| | |
|
| | | @Override
|
| | | public int[] getItemLayouts() {
|
| | | return new int[]{R.layout.fragment_visit_left_date_row,R.layout.fragment_visit_left_person_row};
|
| | |
| | | @Override
|
| | | public void onBindRecycleViewHolder(EasyRecyclerViewHolder viewHolder, int position) {
|
| | | if(!(getItem(position) instanceof String)) {
|
| | | final CheckBox fragment_visit_left_person_row_check_box = viewHolder.findViewById(R.id.fragment_visit_left_person_row_check_box);
|
| | | final RadioButton fragment_visit_left_person_row_check_box = viewHolder.findViewById(R.id.fragment_visit_left_person_row_check_box);
|
| | | TextView fragment_visit_left_person_row_name = viewHolder.findViewById(R.id.fragment_visit_left_person_row_name);
|
| | | SimpleDraweeView fragment_visit_left_person_row_photo = viewHolder.findViewById(R.id.fragment_visit_left_person_row_photo);
|
| | | TextView fragment_visit_left_person_row_status = viewHolder.findViewById(R.id.fragment_visit_left_person_row_status);
|
| | |
| | | @Override
|
| | | public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
| | | //fragment_visit_left_person_row_check_box.setChecked(true);
|
| | | if (lastRadioButton != null && lastRadioButton != fragment_visit_left_person_row_check_box) {
|
| | | lastRadioButton.setChecked(false);
|
| | | }
|
| | | lastRadioButton = fragment_visit_left_person_row_check_box;
|
| | | cn.com.basic.face.fragment.VisitFragment.getInstance().setVisitInfo(item);
|
| | | }
|
| | | });
|
| | |
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | }
|
| | | }
|