Commit d246c3a50a586c006cd259ef1e5cee53204e6223
Exists in
yxb_dev
and in
1 other branch
Merge branch 'wwx' into yxb_dev
Showing
8 changed files
with
108 additions
and
77 deletions
Show diff stats
app/libs/processor.jar
No preview for this file type
app/src/main/AndroidManifest.xml
| ... | ... | @@ -119,13 +119,13 @@ |
| 119 | 119 | |
| 120 | 120 | |
| 121 | 121 | <provider |
| 122 | - android:authorities="com.shunzhi.parent.fileprovider" | |
| 123 | 122 | android:name="android.support.v4.content.FileProvider" |
| 124 | - android:grantUriPermissions="true" | |
| 125 | - android:exported="false"> | |
| 123 | + android:authorities="com.shunzhi.parent.fileprovider" | |
| 124 | + android:exported="false" | |
| 125 | + android:grantUriPermissions="true"> | |
| 126 | 126 | <meta-data |
| 127 | 127 | android:name="android.support.FILE_PROVIDER_PATHS" |
| 128 | - android:resource="@xml/filepaths"/> | |
| 128 | + android:resource="@xml/filepaths" /> | |
| 129 | 129 | </provider> |
| 130 | 130 | |
| 131 | 131 | <activity |
| ... | ... | @@ -206,17 +206,16 @@ |
| 206 | 206 | <activity |
| 207 | 207 | android:name=".ui.activity.ActivationActivity" |
| 208 | 208 | android:launchMode="singleInstance" |
| 209 | - android:windowSoftInputMode="adjustPan|stateAlwaysHidden"/> | |
| 209 | + android:windowSoftInputMode="adjustPan|stateAlwaysHidden" /> | |
| 210 | 210 | <activity |
| 211 | 211 | android:name=".ui.activity.BankActivity" |
| 212 | 212 | android:launchMode="singleInstance" |
| 213 | - android:windowSoftInputMode="adjustPan|stateAlwaysHidden"/> | |
| 213 | + android:windowSoftInputMode="adjustPan|stateAlwaysHidden" /> | |
| 214 | 214 | |
| 215 | 215 | <activity |
| 216 | 216 | android:name=".ui.activity.apply.ApplyReplaceCardActivity" |
| 217 | 217 | android:launchMode="singleInstance" |
| 218 | - android:windowSoftInputMode="adjustPan|stateAlwaysHidden" | |
| 219 | - /> | |
| 218 | + android:windowSoftInputMode="adjustPan|stateAlwaysHidden" /> | |
| 220 | 219 | |
| 221 | 220 | <activity |
| 222 | 221 | android:name=".ui.activity.apply.ApplySigninActivity" | ... | ... |
app/src/main/java/com/shunzhi/parent/adapter/AttendanceAdapter.java
| ... | ... | @@ -26,10 +26,12 @@ import com.shunzhi.parent.ui.fragment.apply.ApplySigninFragment; |
| 26 | 26 | */ |
| 27 | 27 | |
| 28 | 28 | public class AttendanceAdapter extends BaseRecyclerViewAdapter<AttendanceBean> { |
| 29 | + private final String mStudentName; | |
| 29 | 30 | private Context mContext = null; |
| 30 | 31 | |
| 31 | - public AttendanceAdapter(Context context) { | |
| 32 | + public AttendanceAdapter(Context context,String studentName) { | |
| 32 | 33 | mContext = context; |
| 34 | + mStudentName = studentName; | |
| 33 | 35 | } |
| 34 | 36 | |
| 35 | 37 | @Override |
| ... | ... | @@ -39,13 +41,13 @@ public class AttendanceAdapter extends BaseRecyclerViewAdapter<AttendanceBean> { |
| 39 | 41 | } |
| 40 | 42 | |
| 41 | 43 | public class AttendanceViewHolder extends BaseRecyclerViewHolder<AttendanceBean> { |
| 42 | - TextView tv_parent_name,tv_attendance; | |
| 44 | + TextView tv_student_name,tv_attendance; | |
| 43 | 45 | ImageView iv_photo; |
| 44 | 46 | |
| 45 | 47 | public AttendanceViewHolder(View itemView) { |
| 46 | 48 | super(itemView); |
| 47 | 49 | |
| 48 | - tv_parent_name = itemView.findViewById(R.id.tv_parent_name); | |
| 50 | + tv_student_name = itemView.findViewById(R.id.tv_student_name); | |
| 49 | 51 | tv_attendance = itemView.findViewById(R.id.tv_attendance); |
| 50 | 52 | iv_photo = itemView.findViewById(R.id.iv_photo); |
| 51 | 53 | } |
| ... | ... | @@ -54,6 +56,7 @@ public class AttendanceAdapter extends BaseRecyclerViewAdapter<AttendanceBean> { |
| 54 | 56 | public void onBindViewHolder(AttendanceBean object, int position) { |
| 55 | 57 | Log.i("AttendanceAdapter:",object.getSituation()); |
| 56 | 58 | tv_attendance.setText(object.getSituation()); |
| 59 | + tv_student_name.setText(mStudentName); | |
| 57 | 60 | if (TextUtils.isEmpty(object.getHead_image())){ |
| 58 | 61 | iv_photo.setImageResource(R.drawable.photo); |
| 59 | 62 | }else { | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/apply/ApplyReplaceCardFragment.java
| ... | ... | @@ -9,6 +9,7 @@ import android.util.Log; |
| 9 | 9 | import android.view.View; |
| 10 | 10 | import android.widget.Button; |
| 11 | 11 | import android.widget.EditText; |
| 12 | +import android.widget.TextView; | |
| 12 | 13 | import android.widget.Toast; |
| 13 | 14 | |
| 14 | 15 | import com.google.gson.Gson; |
| ... | ... | @@ -33,6 +34,7 @@ public class ApplyReplaceCardFragment extends BaseMVPCompatFragment<ApplyReplace |
| 33 | 34 | private EditText et_cardnum; |
| 34 | 35 | private String cardnum = ""; |
| 35 | 36 | private ChildBean currChildBean = new ChildBean(); |
| 37 | + private TextView et_carduser; | |
| 36 | 38 | |
| 37 | 39 | @NonNull |
| 38 | 40 | @Override |
| ... | ... | @@ -51,12 +53,14 @@ public class ApplyReplaceCardFragment extends BaseMVPCompatFragment<ApplyReplace |
| 51 | 53 | bt_sure = view.findViewById(R.id.bt_sure); |
| 52 | 54 | bt_cancel = view.findViewById(R.id.bt_cancle); |
| 53 | 55 | et_cardnum = view.findViewById(R.id.et_cardnum); |
| 56 | + et_carduser =view.findViewById(R.id.et_carduser); | |
| 54 | 57 | bt_sure.setOnClickListener(this); |
| 55 | 58 | Gson g = new Gson(); |
| 56 | 59 | String jsonStr = getArguments().getString("childJson"); |
| 57 | 60 | if (!TextUtils.isEmpty(jsonStr)) { |
| 58 | 61 | currChildBean = g.fromJson(jsonStr, ChildBean.class); |
| 59 | 62 | et_cardnum.setText(currChildBean.getCardNumber()); |
| 63 | + et_carduser.setText(currChildBean.getStudentName()); | |
| 60 | 64 | } |
| 61 | 65 | |
| 62 | 66 | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/apply/ApplySigninFragment.java
| ... | ... | @@ -49,6 +49,7 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra |
| 49 | 49 | private String currdate = ""; |
| 50 | 50 | List<AttendanceBean> signinlist = new ArrayList<>(); |
| 51 | 51 | private ChildBean currChildBean = new ChildBean(); |
| 52 | + private TextView tv_student_name; | |
| 52 | 53 | |
| 53 | 54 | |
| 54 | 55 | public BasePresenter initPresenter() { |
| ... | ... | @@ -68,10 +69,23 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra |
| 68 | 69 | tv_kaoqin_date = view.findViewById(R.id.tv_kaoqin_date); |
| 69 | 70 | tv_kaoqin_num = view.findViewById(R.id.tv_kaoqin_num); |
| 70 | 71 | iv_calendar = view.findViewById(R.id.iv_calendar); |
| 72 | + tv_student_name = view.findViewById(R.id.tv_student_name); | |
| 73 | + recycle_attendance = view.findViewById(R.id.recycle_attendance); | |
| 74 | + currdate = getNowTime(); | |
| 75 | + tv_kaoqin_date.setText(getNowTime()); | |
| 76 | + initLunarPicker(); | |
| 77 | + iv_calendar.setOnClickListener(this); | |
| 71 | 78 | Gson g = new Gson(); |
| 72 | 79 | String jsonStr = getArguments().getString("childStr"); |
| 73 | - if (!TextUtils.isEmpty(jsonStr)) | |
| 80 | + if (!TextUtils.isEmpty(jsonStr)) { | |
| 74 | 81 | currChildBean = g.fromJson(jsonStr, ChildBean.class); |
| 82 | + tv_kaoqin_user.setText(currChildBean.getStudentName()); | |
| 83 | + tv_student_name.setText(currChildBean.getStudentName()); | |
| 84 | + recycle_attendance.setLayoutManager(new LinearLayoutManager(getActivity())); | |
| 85 | + attendanceAdapter = new AttendanceAdapter(getActivity(),currChildBean.getStudentName()); | |
| 86 | + recycle_attendance.setAdapter(attendanceAdapter); | |
| 87 | + } | |
| 88 | + | |
| 75 | 89 | initLunarPicker(); |
| 76 | 90 | iv_calendar.setOnClickListener(this); |
| 77 | 91 | tv_kaoqin_user.setText(currChildBean.getStudentName()); |
| ... | ... | @@ -81,14 +95,15 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra |
| 81 | 95 | recycle_attendance = view.findViewById(R.id.recycle_attendance); |
| 82 | 96 | |
| 83 | 97 | recycle_attendance.setLayoutManager(new LinearLayoutManager(getActivity())); |
| 84 | - attendanceAdapter = new AttendanceAdapter(getActivity()); | |
| 98 | + attendanceAdapter = new AttendanceAdapter(getActivity(),currChildBean.getStudentName()); | |
| 85 | 99 | recycle_attendance.setAdapter(attendanceAdapter); |
| 86 | 100 | getData(); |
| 87 | - | |
| 88 | 101 | } |
| 89 | 102 | |
| 90 | 103 | private void getData() { |
| 91 | - mPresenter.SigninDetail(currChildBean.getStudentId(), currChildBean.getSchoolId(), currdate); | |
| 104 | +// mPresenter.SigninDetail(currChildBean.getStudentId(), currChildBean.getSchoolId(), currdate); | |
| 105 | + mPresenter.SigninDetail(185, 1, currdate); | |
| 106 | + | |
| 92 | 107 | } |
| 93 | 108 | |
| 94 | 109 | /** |
| ... | ... | @@ -109,15 +124,17 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra |
| 109 | 124 | case R.id.iv_calendar: |
| 110 | 125 | pvCustomLunar.show(); |
| 111 | 126 | break; |
| 127 | + default: | |
| 128 | + break; | |
| 112 | 129 | } |
| 113 | 130 | } |
| 114 | 131 | |
| 115 | 132 | private void initLunarPicker() { |
| 116 | 133 | Calendar selectedDate = Calendar.getInstance();//系统当前时间 |
| 117 | 134 | Calendar startDate = Calendar.getInstance(); |
| 118 | - startDate.set(1900, 1, 1); | |
| 135 | + startDate.set(1900, 0, 1); | |
| 119 | 136 | Calendar endDate = Calendar.getInstance(); |
| 120 | - endDate.set(2099, 12, 31); | |
| 137 | + endDate.set(2099, 11, 31); | |
| 121 | 138 | //AppContext.getInstance().startLocation(); |
| 122 | 139 | //时间选择器 |
| 123 | 140 | pvCustomLunar = new TimePickerBuilder(getActivity(), new OnTimeSelectListener() { |
| ... | ... | @@ -137,7 +154,7 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra |
| 137 | 154 | Log.i("pvTime", date.toString()); |
| 138 | 155 | } |
| 139 | 156 | }).build(); |
| 140 | -// .setDate(selectedDate) | |
| 157 | +// }).setDate(selectedDate) | |
| 141 | 158 | // .setRangDate(startDate, endDate) |
| 142 | 159 | // .setLayoutRes(R.layout.pickerview_custom_lunar, new CustomListener() { |
| 143 | 160 | // @Override |
| ... | ... | @@ -171,11 +188,12 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra |
| 171 | 188 | |
| 172 | 189 | @Override |
| 173 | 190 | public void showDetialList(List<AttendanceBean> list) { |
| 174 | - | |
| 191 | + Log.i("showDetialList", String.valueOf(list.size())); | |
| 175 | 192 | if (list.size() == 0) { |
| 176 | 193 | layout_tv.setVisibility(View.VISIBLE); |
| 177 | 194 | recycle_attendance.setVisibility(View.GONE); |
| 178 | 195 | } else { |
| 196 | + layout_tv.setVisibility(View.GONE); | |
| 179 | 197 | recycle_attendance.setVisibility(View.VISIBLE); |
| 180 | 198 | layout_tv.setVisibility(View.GONE); |
| 181 | 199 | signinlist.clear(); |
| ... | ... | @@ -188,6 +206,6 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra |
| 188 | 206 | @Override |
| 189 | 207 | public void showDetialInfo(List<AttendanceBean> list) { |
| 190 | 208 | String num = String.valueOf(list.size()); |
| 191 | - tv_kaoqin_num.setText(num); | |
| 209 | + tv_kaoqin_num.setText(num+"次"); | |
| 192 | 210 | } |
| 193 | 211 | } | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/report/ChengZhangFragment.java
| ... | ... | @@ -170,43 +170,43 @@ public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.Rep |
| 170 | 170 | |
| 171 | 171 | @Override |
| 172 | 172 | public void onClick(View view) { |
| 173 | - if (childBean.getCount() == 0) { | |
| 174 | - final PopupWindow popupWindow = new PopupWindow(); | |
| 175 | - popupWindow.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT); | |
| 176 | - popupWindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT); | |
| 177 | - backgroundAlpha(0.5f); | |
| 178 | - View view1 = LayoutInflater.from(getActivity()).inflate(R.layout.dialog_view, null); | |
| 179 | - TextView dialog_info = view1.findViewById(R.id.dialog_info); | |
| 180 | - dialog_info.setText("请前往订购中心\n订购“智能校卫”\n才能够使用相关应用功能"); | |
| 181 | - dialog_info.setGravity(Gravity.CENTER); | |
| 182 | - TextView right_btn = view1.findViewById(R.id.right_btn); | |
| 183 | - right_btn.setText("前往订购"); | |
| 184 | - right_btn.setOnClickListener(new View.OnClickListener() { | |
| 185 | - @Override | |
| 186 | - public void onClick(View v) { | |
| 187 | - popupWindow.dismiss(); | |
| 188 | - backgroundAlpha(1f); | |
| 189 | - Bundle bundle = new Bundle(); | |
| 190 | - bundle.putString("url", AppConfig.BASE_URL_ORDER + "ParentOrderCenter.aspx?userid=" + | |
| 191 | - AppConfig.getAppConfig(getContext()).get(AppConfig.USER_ID)); | |
| 192 | - bundle.putInt("type", AppConfig.ORDER_CENTER); | |
| 193 | - startNewActivity(WebViewActivity.class, bundle); | |
| 194 | - | |
| 195 | - } | |
| 196 | - }); | |
| 197 | - TextView cancel_btn = view1.findViewById(R.id.cancel_btn); | |
| 198 | - cancel_btn.setOnClickListener(new View.OnClickListener() { | |
| 199 | - @Override | |
| 200 | - public void onClick(View v) { | |
| 201 | - popupWindow.dismiss(); | |
| 202 | - backgroundAlpha(1f); | |
| 203 | - } | |
| 204 | - }); | |
| 205 | - | |
| 206 | - popupWindow.setContentView(view1); | |
| 207 | - popupWindow.showAtLocation(recyclerView, Gravity.CENTER, 0, 0); | |
| 208 | - return; | |
| 209 | - } | |
| 173 | +// if (childBean.getCount() == 0) { | |
| 174 | +// final PopupWindow popupWindow = new PopupWindow(); | |
| 175 | +// popupWindow.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT); | |
| 176 | +// popupWindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT); | |
| 177 | +// backgroundAlpha(0.5f); | |
| 178 | +// View view1 = LayoutInflater.from(getActivity()).inflate(R.layout.dialog_view, null); | |
| 179 | +// TextView dialog_info = view1.findViewById(R.id.dialog_info); | |
| 180 | +// dialog_info.setText("请前往订购中心\n订购“智能校卫”\n才能够使用相关应用功能"); | |
| 181 | +// dialog_info.setGravity(Gravity.CENTER); | |
| 182 | +// TextView right_btn = view1.findViewById(R.id.right_btn); | |
| 183 | +// right_btn.setText("前往订购"); | |
| 184 | +// right_btn.setOnClickListener(new View.OnClickListener() { | |
| 185 | +// @Override | |
| 186 | +// public void onClick(View v) { | |
| 187 | +// popupWindow.dismiss(); | |
| 188 | +// backgroundAlpha(1f); | |
| 189 | +// Bundle bundle = new Bundle(); | |
| 190 | +// bundle.putString("url", AppConfig.BASE_URL_ORDER + "ParentOrderCenter.aspx?userid=" + | |
| 191 | +// AppConfig.getAppConfig(getContext()).get(AppConfig.USER_ID)); | |
| 192 | +// bundle.putInt("type", AppConfig.ORDER_CENTER); | |
| 193 | +// startNewActivity(WebViewActivity.class, bundle); | |
| 194 | +// | |
| 195 | +// } | |
| 196 | +// }); | |
| 197 | +// TextView cancel_btn = view1.findViewById(R.id.cancel_btn); | |
| 198 | +// cancel_btn.setOnClickListener(new View.OnClickListener() { | |
| 199 | +// @Override | |
| 200 | +// public void onClick(View v) { | |
| 201 | +// popupWindow.dismiss(); | |
| 202 | +// backgroundAlpha(1f); | |
| 203 | +// } | |
| 204 | +// }); | |
| 205 | +// | |
| 206 | +// popupWindow.setContentView(view1); | |
| 207 | +// popupWindow.showAtLocation(recyclerView, Gravity.CENTER, 0, 0); | |
| 208 | +// return; | |
| 209 | +// } | |
| 210 | 210 | |
| 211 | 211 | if (TextUtils.isEmpty(childBean.getCardNumber())) { |
| 212 | 212 | ... | ... |
app/src/main/res/layout/fragment_apply_signin.xml
| ... | ... | @@ -62,7 +62,6 @@ |
| 62 | 62 | android:textSize="@dimen/textSize16" /> |
| 63 | 63 | </LinearLayout> |
| 64 | 64 | |
| 65 | - | |
| 66 | 65 | <LinearLayout |
| 67 | 66 | android:layout_width="match_parent" |
| 68 | 67 | android:layout_height="0dp" |
| ... | ... | @@ -123,29 +122,37 @@ |
| 123 | 122 | android:layout_height="wrap_content" |
| 124 | 123 | android:layout_weight="2.8" |
| 125 | 124 | android:gravity="center" |
| 126 | - android:text="5" | |
| 125 | + android:text="0次" | |
| 127 | 126 | android:textColor="@color/hintTextColor" |
| 128 | 127 | android:textSize="@dimen/textSize16" /> |
| 129 | 128 | </LinearLayout> |
| 129 | + </LinearLayout> | |
| 130 | 130 | |
| 131 | - <LinearLayout | |
| 132 | - android:id="@+id/layout_tv" | |
| 133 | - android:layout_width="match_parent" | |
| 134 | - android:layout_height="0dp" | |
| 135 | - android:layout_weight="2" | |
| 136 | - android:gravity="center" | |
| 137 | - android:orientation="horizontal" | |
| 138 | - android:visibility="gone"> | |
| 131 | + <LinearLayout | |
| 132 | + android:id="@+id/layout_tv" | |
| 133 | + android:layout_width="match_parent" | |
| 134 | + android:layout_height="0dp" | |
| 135 | + android:layout_weight="1" | |
| 136 | + android:gravity="center" | |
| 137 | + android:orientation="horizontal" | |
| 138 | + android:visibility="visible"> | |
| 139 | + | |
| 140 | + <TextView | |
| 141 | + android:id="@+id/tv_student_name" | |
| 142 | + android:layout_width="wrap_content" | |
| 143 | + android:layout_height="wrap_content" | |
| 144 | + android:text="张三" | |
| 145 | + android:textColor="@color/textRed" | |
| 146 | + android:textSize="@dimen/textSize20" /> | |
| 139 | 147 | |
| 140 | - <TextView | |
| 141 | - android:id="@+id/tv_tips" | |
| 142 | - android:layout_width="wrap_content" | |
| 143 | - android:layout_height="wrap_content" | |
| 144 | - android:text="张三今日无刷卡记录!" | |
| 145 | - android:textColor="@color/textRed" | |
| 146 | - android:textSize="@dimen/textSize20" /> | |
| 147 | - </LinearLayout> | |
| 148 | 148 | |
| 149 | + <TextView | |
| 150 | + android:id="@+id/tv_tips" | |
| 151 | + android:layout_width="wrap_content" | |
| 152 | + android:layout_height="wrap_content" | |
| 153 | + android:text="今日无刷卡记录!" | |
| 154 | + android:textColor="@color/textRed" | |
| 155 | + android:textSize="@dimen/textSize20" /> | |
| 149 | 156 | </LinearLayout> |
| 150 | 157 | |
| 151 | 158 | <android.support.v7.widget.RecyclerView |
| ... | ... | @@ -153,7 +160,7 @@ |
| 153 | 160 | android:layout_width="match_parent" |
| 154 | 161 | android:layout_height="wrap_content" |
| 155 | 162 | android:background="@color/bgColor" |
| 156 | - android:visibility="visible"> | |
| 163 | + android:visibility="gone"> | |
| 157 | 164 | |
| 158 | 165 | </android.support.v7.widget.RecyclerView> |
| 159 | 166 | </LinearLayout> |
| 160 | 167 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/item_apply_signin.xml