| | |
| | |
|
| | | import com.bsk.zhangbo.demoforbsk.R;
|
| | |
|
| | | import cn.com.basic.face.adapter.CheckInRightCellAdapter;
|
| | | import cn.com.basic.face.base.MainUIBaseFragment;
|
| | | import cn.com.basic.face.adapter.CheckInLeftListViewAdapter;
|
| | | import cn.com.basic.face.base.LeftRightBaseFragment;
|
| | | import cn.com.basic.face.base.MainActivity;
|
| | | import cn.com.basic.face.util.Constant;
|
| | | import cn.com.basic.face.widget.CheckInIntervieweeCell;
|
| | |
| | | * Created by Sinoe on 2017/2/23.
|
| | | */
|
| | |
|
| | | public class PhoneCallFragment extends MainUIBaseFragment {
|
| | | public class PhoneCallFragment extends LeftRightBaseFragment {
|
| | |
|
| | |
|
| | | private View mViewLeft,mViewRight;
|
| | | private RadioGroup mRGTop,mRGClass;
|
| | | private LinearLayout mLlRadioGroupClass;
|
| | | private CheckInIntervieweeCell mVisitorTo;
|
| | | private CheckInRightCellAdapter mAdapter;
|
| | | private CheckInLeftListViewAdapter mAdapter;
|
| | | private EasyRecyclerView mRecyclerView;
|
| | | private List mList;
|
| | |
|
| | | public static PhoneCallFragment newInstance() {
|
| | | return new PhoneCallFragment();
|
| | | }
|
| | | @Override
|
| | |
|
| | | public View addLeftLayout() {
|
| | |
|
| | | mViewLeft = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_phone_call_left,null);
|
| | |
| | | mRecyclerView = (EasyRecyclerView) mViewLeft.findViewById(R.id.fragment_check_in_left_list_view);
|
| | | LinearLayoutManager manager = new LinearLayoutManager(getActivity(),LinearLayoutManager.VERTICAL,false);
|
| | | mRecyclerView.setLayoutManager(manager);
|
| | | mAdapter = new CheckInRightCellAdapter(getActivity(),Constant.VISITOR_ROW);
|
| | | mAdapter = new CheckInLeftListViewAdapter(getActivity(),Constant.CheckIn.VISITOR_ROW);
|
| | | ViewUtils.inject(this, mViewLeft);
|
| | |
|
| | | mLlRadioGroupClass.setVisibility(View.VISIBLE);
|
| | | mAdapter = new CheckInRightCellAdapter(getActivity(), Constant.INTERVIEWEE_ROW);
|
| | | mAdapter.set_fragment_check_in_left_sort_radio_group_type(CheckInRightCellAdapter.TYPE_NAME);
|
| | | mAdapter = new CheckInLeftListViewAdapter(getActivity(), Constant.CheckIn.INTERVIEWEE_ROW);
|
| | | mAdapter.set_fragment_check_in_left_sort_radio_group_type(CheckInLeftListViewAdapter.TYPE_NAME);
|
| | | mAdapter.setList(mList);
|
| | | mRecyclerView.setAdapter(mAdapter);
|
| | |
|
| | | return mViewLeft;
|
| | | }
|
| | |
|
| | | @Override
|
| | |
|
| | | public View addRightLayout() {
|
| | | mViewRight = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_phone_call_right,null);
|
| | | mVisitorTo = (CheckInIntervieweeCell) mViewRight.findViewById(R.id.tel_phone_to);
|
| | |
| | | switch (radioGroup.getCheckedRadioButtonId()){
|
| | | case R.id.fragment_check_in_left_visitor_radio:
|
| | | mLlRadioGroupClass.setVisibility(View.GONE);
|
| | | mAdapter = new CheckInRightCellAdapter(getActivity(), Constant.VISITOR_ROW);
|
| | | mAdapter = new CheckInLeftListViewAdapter(getActivity(), Constant.CheckIn.VISITOR_ROW);
|
| | | mAdapter.setList(mList);
|
| | | mRecyclerView.setAdapter(mAdapter);
|
| | | break;
|
| | | case R.id.fragment_check_in_left_interviewee_radio:
|
| | | mLlRadioGroupClass.setVisibility(View.VISIBLE);
|
| | | mAdapter = new CheckInRightCellAdapter(getActivity(), Constant.INTERVIEWEE_ROW);
|
| | | mAdapter.set_fragment_check_in_left_sort_radio_group_type(CheckInRightCellAdapter.TYPE_NAME);
|
| | | mAdapter = new CheckInLeftListViewAdapter(getActivity(), Constant.CheckIn.INTERVIEWEE_ROW);
|
| | | mAdapter.set_fragment_check_in_left_sort_radio_group_type(CheckInLeftListViewAdapter.TYPE_NAME);
|
| | | mAdapter.setList(mList);
|
| | | mRecyclerView.setAdapter(mAdapter);
|
| | | break;
|
| | |
| | | public void onCheckedChanged(RadioGroup radioGroup, int i) {
|
| | | switch (radioGroup.getCheckedRadioButtonId()){
|
| | | case R.id.fragment_check_in_left_sort_by_name_radio_button:
|
| | | // mAdapter.setVisitorToTextColor(CheckInRightCellAdapter.TYPE_NAME);
|
| | | mAdapter.set_fragment_check_in_left_sort_radio_group_type(CheckInRightCellAdapter.TYPE_NAME);
|
| | | mAdapter.set_fragment_check_in_left_sort_radio_group_type(CheckInLeftListViewAdapter.TYPE_NAME);
|
| | | mAdapter.setList(mList);
|
| | | mRecyclerView.setAdapter(mAdapter);
|
| | | break;
|
| | | case R.id.fragment_check_in_left_sort_by_dept_radio_button:
|
| | | // mAdapter.setVisitorToTextColor(CheckInRightCellAdapter.TYPE_DEPARTMENT);
|
| | | mAdapter.set_fragment_check_in_left_sort_radio_group_type(CheckInRightCellAdapter.TYPE_DEPARTMENT);
|
| | | mAdapter.set_fragment_check_in_left_sort_radio_group_type(CheckInLeftListViewAdapter.TYPE_DEPARTMENT);
|
| | | mAdapter.setList(mList);
|
| | | mRecyclerView.setAdapter(mAdapter);
|
| | | break;
|