VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/base/MainActivity.java
@@ -1,6 +1,5 @@ package cn.com.basic.face.base; import android.content.Context; import android.support.design.widget.TabLayout; import android.support.v4.view.ViewPager; import android.os.Bundle; @@ -51,7 +50,7 @@ myFragmentPagerAdapter.addFragment(SupervisoryFragment.getInstance(), tabNamesList.get(0),tabIcons[0]); myFragmentPagerAdapter.addFragment(RegisterFragment.getInstance(), tabNamesList.get(1),tabIcons[1]); myFragmentPagerAdapter.addFragment(CheckInFragment.getInstance(), tabNamesList.get(2),tabIcons[2]); myFragmentPagerAdapter.addFragment(PhoneCallFragment.newInstance(), tabNamesList.get(3),tabIcons[3]); myFragmentPagerAdapter.addFragment(PhoneCallFragment.getInstance(), tabNamesList.get(3),tabIcons[3]); myFragmentPagerAdapter.addFragment(VisitFragment.newInstance(), tabNamesList.get(4),tabIcons[4]); myFragmentPagerAdapter.addFragment(AttendanceFragment.newInstance(), tabNamesList.get(5),tabIcons[5]); myFragmentPagerAdapter.addFragment(DeviceFragment.newInstance(), tabNamesList.get(6),tabIcons[6]); VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/PhoneCallFragment.java
@@ -20,12 +20,12 @@ import java.util.ArrayList; import java.util.List; /** * Created by Sinoe on 2017/2/23. */ public class PhoneCallFragment extends LeftRightBaseFragment { private static PhoneCallFragment instance = new PhoneCallFragment(); public static PhoneCallFragment getInstance() { return instance; } private View mViewLeft,mViewRight; private RadioGroup mRGTop,mRGClass; @@ -35,17 +35,14 @@ private EasyRecyclerView mRecyclerView; private List mList; public static PhoneCallFragment newInstance() { return new PhoneCallFragment(); } public View addLeftLayout() { mViewLeft = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_phone_call_left,null); mRGTop = (RadioGroup) mViewLeft.findViewById(R.id.fragment_check_in_left_radio_group); mRGClass = (RadioGroup) mViewLeft.findViewById(R.id.fragment_check_in_left_sort_radio_group); mLlRadioGroupClass = (LinearLayout) mViewLeft.findViewById(R.id.fragment_check_in_left_sort_type_linear_layout); mRecyclerView = (EasyRecyclerView) mViewLeft.findViewById(R.id.fragment_check_in_left_list_view); mRGTop = (RadioGroup) mViewLeft.findViewById(R.id.fragment_phone_call_left_radio_group); mRGClass = (RadioGroup) mViewLeft.findViewById(R.id.fragment_phone_call_left_sort_radio_group); mLlRadioGroupClass = (LinearLayout) mViewLeft.findViewById(R.id.fragment_phone_call_left_sort_type_linear_layout); mRecyclerView = (EasyRecyclerView) mViewLeft.findViewById(R.id.fragment_phone_call_left_list_view); LinearLayoutManager manager = new LinearLayoutManager(getActivity(),LinearLayoutManager.VERTICAL,false); mRecyclerView.setLayoutManager(manager); mAdapter = new CheckInLeftListViewAdapter(getActivity(),Constant.CheckIn.VISITOR_ROW); @@ -74,13 +71,13 @@ @Override public void onCheckedChanged(RadioGroup radioGroup, int i) { switch (radioGroup.getCheckedRadioButtonId()){ case R.id.fragment_check_in_left_visitor_radio: case R.id.fragment_phone_call_left_visitor_radio: mLlRadioGroupClass.setVisibility(View.GONE); mAdapter = new CheckInLeftListViewAdapter(getActivity(), Constant.CheckIn.VISITOR_ROW); mAdapter.setList(mList); mRecyclerView.setAdapter(mAdapter); break; case R.id.fragment_check_in_left_interviewee_radio: case R.id.fragment_phone_call_left_interviewee_radio: mLlRadioGroupClass.setVisibility(View.VISIBLE); mAdapter = new CheckInLeftListViewAdapter(getActivity(), Constant.CheckIn.INTERVIEWEE_ROW); mAdapter.set_fragment_check_in_left_sort_radio_group_type(CheckInLeftListViewAdapter.TYPE_NAME); @@ -94,12 +91,12 @@ @Override public void onCheckedChanged(RadioGroup radioGroup, int i) { switch (radioGroup.getCheckedRadioButtonId()){ case R.id.fragment_check_in_left_sort_by_name_radio_button: case R.id.fragment_phone_call_left_sort_by_name_radio_button: 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: case R.id.fragment_phone_call_left_sort_by_dept_radio_button: mAdapter.set_fragment_check_in_left_sort_radio_group_type(CheckInLeftListViewAdapter.TYPE_DEPARTMENT); mAdapter.setList(mList); mRecyclerView.setAdapter(mAdapter); @@ -121,7 +118,7 @@ mRecyclerView.setAdapter(mAdapter); } @OnClick(R.id.tel_phone_back) @OnClick(R.id.fragment_phone_call_left_back) public void back(View view) { MainActivity.selectPage(0); } VisitFace/DemoForBsk/app/src/main/res/layout/fragment_phone_call_left.xml
@@ -4,7 +4,7 @@ android:layout_height="match_parent"> <TextView android:id="@+id/tel_phone_back" android:id="@+id/fragment_phone_call_left_back" android:layout_width="wrap_content" android:layout_height="30dp" android:text="< 电话呼叫" @@ -19,13 +19,13 @@ android:visibility="gone"> <RadioGroup android:id="@+id/fragment_check_in_left_radio_group" android:id="@+id/fragment_phone_call_left_radio_group" android:layout_width="match_parent" android:layout_height="51dp" android:gravity="center" android:orientation="horizontal"> <RadioButton android:id="@+id/fragment_check_in_left_visitor_radio" android:id="@+id/fragment_phone_call_left_visitor_radio" android:button="@null" android:text="来访人员" android:textColor="@color/tab_visitor_register" @@ -33,7 +33,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" /> <RadioButton android:id="@+id/fragment_check_in_left_interviewee_radio" android:id="@+id/fragment_phone_call_left_interviewee_radio" android:button="@null" android:text="被访人员" android:checked="true" @@ -49,7 +49,7 @@ android:background="@color/colorSearch" android:orientation="vertical"> <EditText android:id="@+id/fragment_check_in_left_search_edit_text" android:id="@+id/fragment_phone_call_left_search" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="5.5dp" @@ -66,7 +66,7 @@ android:background="@android:color/white" android:orientation="vertical"> <LinearLayout android:id="@+id/fragment_check_in_left_sort_type_linear_layout" android:id="@+id/fragment_phone_call_left_sort_type_linear_layout" android:orientation="horizontal" android:gravity="center" android:visibility="gone" @@ -80,13 +80,13 @@ android:text="@string/check_class"/> <RadioGroup android:id="@+id/fragment_check_in_left_sort_radio_group" android:id="@+id/fragment_phone_call_left_sort_radio_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:orientation="horizontal"> <RadioButton android:id="@+id/fragment_check_in_left_sort_by_name_radio_button" android:id="@+id/fragment_phone_call_left_sort_by_name_radio_button" android:text="按姓名" android:textColor="@color/colorText_b" android:checked="true" @@ -94,7 +94,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" /> <RadioButton android:id="@+id/fragment_check_in_left_sort_by_dept_radio_button" android:id="@+id/fragment_phone_call_left_sort_by_dept_radio_button" android:text="按部门" android:textSize="@dimen/text_size_big" android:textColor="@color/colorText_b" @@ -103,9 +103,9 @@ </RadioGroup> </LinearLayout> <com.camnter.easyrecyclerview.widget.EasyRecyclerView android:id="@+id/fragment_check_in_left_list_view" android:id="@+id/fragment_phone_call_left_list_view" android:layout_width="match_parent" android:layout_height="match_parent"></com.camnter.easyrecyclerview.widget.EasyRecyclerView> android:layout_height="match_parent"/> </LinearLayout> </LinearLayout> </LinearLayout>