Commit 49236c7b5f9a58c97bf8cbefcd376ad86c9407cc
1 parent
0471108b6a
Exists in
master
去掉绑定老师功能
Showing
2 changed files
with
1 additions
and
53 deletions
Show diff stats
app/src/main/java/com/hjx/parent/EditStudentActivity.java
... | ... | @@ -70,8 +70,6 @@ public class EditStudentActivity extends BaseActivity { |
70 | 70 | ImageView iv_teacher; |
71 | 71 | @BindView(R.id.rl_teacher) |
72 | 72 | RelativeLayout rl_teacher; |
73 | - @BindView(R.id.tv_bind) | |
74 | - TextView tv_bind; | |
75 | 73 | @BindView(R.id.view_6) |
76 | 74 | LinearLayout view_6; |
77 | 75 | private static int CAMERA_REQUEST_CODE = 343; |
... | ... | @@ -152,7 +150,6 @@ public class EditStudentActivity extends BaseActivity { |
152 | 150 | } |
153 | 151 | if (studentBean.getIsIntention() == 1) { |
154 | 152 | rl_teacher.setVisibility(View.VISIBLE); |
155 | - tv_bind.setText("重新绑定"); | |
156 | 153 | tv_teacher.setText(studentBean.getTeacherName()); |
157 | 154 | if (!TextUtils.isEmpty(studentBean.getTeacherAvatar())) { |
158 | 155 | RoundedCorners roundedCorners = new RoundedCorners(ScreenUtils.dpToPx(this, 25)); |
... | ... | @@ -164,8 +161,6 @@ public class EditStudentActivity extends BaseActivity { |
164 | 161 | } else { |
165 | 162 | rl_teacher.setVisibility(View.GONE); |
166 | 163 | if ((studentBean.getState() != null && studentBean.getState() == 0)) { |
167 | - tv_bind.setText("待通过"); | |
168 | - tv_bind.setTextColor(Color.parseColor("#FF3737")); | |
169 | 164 | view_6.setEnabled(false); |
170 | 165 | } |
171 | 166 | } |
... | ... | @@ -180,37 +175,10 @@ public class EditStudentActivity extends BaseActivity { |
180 | 175 | view_5.setOnClickListener(view -> startActivity(ShenActivity.class)); |
181 | 176 | findViewById(R.id.tv_cancel).setOnClickListener(view -> onBackPressed()); |
182 | 177 | btn_next.setOnClickListener(view -> { |
183 | - if (teacher != null || studentBean.getIsIntention() == 1 || (studentBean.getState() != null && studentBean.getState() == 0)) { | |
184 | - editStudent(); | |
185 | - } else { | |
186 | - showDialog("温馨提示", "您还未绑定老师,是否绑定?", "去绑定", "暂不绑定", new DialogInterface.OnClickListener() { | |
187 | - @Override | |
188 | - public void onClick(DialogInterface dialogInterface, int i) { | |
189 | - dialogInterface.dismiss(); | |
190 | - showDialog("温馨提示", "您暂未绑定老师,如需绑定老师\n" + "请联系400-800-3813", "确定", "", null, new DialogInterface.OnClickListener() { | |
191 | - @Override | |
192 | - public void onClick(DialogInterface dialogInterface, int i) { | |
193 | - editStudent(); | |
194 | - } | |
195 | - }); | |
196 | - } | |
197 | - }, new DialogInterface.OnClickListener() { | |
198 | - @Override | |
199 | - public void onClick(DialogInterface dialogInterface, int i) { | |
200 | - Intent intent = new Intent(EditStudentActivity.this, AddTeacherActivity.class); | |
201 | - startActivityForResult(intent, BIND_TEACHER_CODE); | |
202 | - } | |
203 | - }); | |
204 | - } | |
178 | + editStudent(); | |
205 | 179 | }); |
206 | 180 | } |
207 | 181 | |
208 | - @OnClick(R.id.view_6) | |
209 | - public void toAddTeacher(View view) { | |
210 | - Intent intent = new Intent(EditStudentActivity.this, AddTeacherActivity.class); | |
211 | - startActivityForResult(intent, BIND_TEACHER_CODE); | |
212 | - } | |
213 | - | |
214 | 182 | public void editStudent() { |
215 | 183 | Map<String, Object> map = new HashMap<>(); |
216 | 184 | map.put("nickName", studentBean.getNickName()); |
... | ... | @@ -323,7 +291,6 @@ public class EditStudentActivity extends BaseActivity { |
323 | 291 | String t = intent.getStringExtra("teacher"); |
324 | 292 | teacher = new Gson().fromJson(t, Teacher.class); |
325 | 293 | rl_teacher.setVisibility(View.VISIBLE); |
326 | - tv_bind.setText("重新绑定"); | |
327 | 294 | tv_teacher.setText(teacher.getUserName()); |
328 | 295 | if (!TextUtils.isEmpty(teacher.getPhoto())) { |
329 | 296 | RoundedCorners roundedCorners = new RoundedCorners(ScreenUtils.dpToPx(EditStudentActivity.this, 20)); | ... | ... |
app/src/main/res/layout/activity_edit_stu.xml
... | ... | @@ -258,25 +258,6 @@ |
258 | 258 | android:layout_width="match_parent" |
259 | 259 | android:layout_height="50dp"> |
260 | 260 | |
261 | - <ImageView | |
262 | - android:layout_width="15dp" | |
263 | - android:layout_height="15dp" | |
264 | - android:layout_centerVertical="true" | |
265 | - android:layout_marginRight="5dp" | |
266 | - android:layout_toLeftOf="@+id/tv_bind" | |
267 | - android:src="@mipmap/ic_bind_teacher" /> | |
268 | - | |
269 | - <TextView | |
270 | - android:id="@+id/tv_bind" | |
271 | - android:layout_width="wrap_content" | |
272 | - android:layout_height="wrap_content" | |
273 | - android:layout_alignParentRight="true" | |
274 | - android:layout_centerVertical="true" | |
275 | - android:layout_marginRight="15dp" | |
276 | - android:text="去绑定" | |
277 | - android:textColor="#333333" | |
278 | - android:textSize="16dp" /> | |
279 | - | |
280 | 261 | <TextView |
281 | 262 | android:layout_width="wrap_content" |
282 | 263 | android:layout_height="wrap_content" | ... | ... |