|
@@ -23,6 +23,7 @@ import com.bigkoo.pickerview.listener.CustomListener;
|
|
import com.bigkoo.pickerview.view.TimePickerView;
|
|
import com.bigkoo.pickerview.view.TimePickerView;
|
|
import com.cooleshow.base.bean.TeachableInstrumentBean;
|
|
import com.cooleshow.base.bean.TeachableInstrumentBean;
|
|
import com.cooleshow.base.router.RouterPath;
|
|
import com.cooleshow.base.router.RouterPath;
|
|
|
|
+import com.cooleshow.base.utils.DateUtil;
|
|
import com.cooleshow.base.utils.MyFileUtils;
|
|
import com.cooleshow.base.utils.MyFileUtils;
|
|
import com.cooleshow.usercenter.bean.StudentUserInfo;
|
|
import com.cooleshow.usercenter.bean.StudentUserInfo;
|
|
import com.cooleshow.usercenter.helper.UserHelper;
|
|
import com.cooleshow.usercenter.helper.UserHelper;
|
|
@@ -78,6 +79,8 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
|
|
private final int REQUEST_CODE_CAMERA = 0x44;
|
|
private final int REQUEST_CODE_CAMERA = 0x44;
|
|
public final int REQUEST_CODE_LOCAL = 0x19;
|
|
public final int REQUEST_CODE_LOCAL = 0x19;
|
|
|
|
|
|
|
|
+ private Date cBirthdate;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
super.onCreate(savedInstanceState);
|
|
@@ -193,6 +196,11 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
|
|
.isDialog(false)//是否显示为对话框样式
|
|
.isDialog(false)//是否显示为对话框样式
|
|
.setLabel("年", "月", "日", "", "", "")
|
|
.setLabel("年", "月", "日", "", "", "")
|
|
.build();
|
|
.build();
|
|
|
|
+ if(cBirthdate!=null){
|
|
|
|
+ Calendar calendar = Calendar.getInstance();
|
|
|
|
+ calendar.setTime(cBirthdate);
|
|
|
|
+ pvTime.setDate(calendar);
|
|
|
|
+ }
|
|
pvTime.show();
|
|
pvTime.show();
|
|
|
|
|
|
}
|
|
}
|
|
@@ -414,12 +422,9 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
|
|
}
|
|
}
|
|
viewBinding.tvPhone.setText(UserHelper.getUserPhone());
|
|
viewBinding.tvPhone.setText(UserHelper.getUserPhone());
|
|
if (!TextUtils.isEmpty(data.birthdate)) {
|
|
if (!TextUtils.isEmpty(data.birthdate)) {
|
|
- if (data.birthdate.contains(" ")) {
|
|
|
|
- String[] s = data.birthdate.split(" ");
|
|
|
|
- viewBinding.tvBirthday.setText(s[0]);
|
|
|
|
- } else {
|
|
|
|
- viewBinding.tvBirthday.setText(data.birthdate);
|
|
|
|
- }
|
|
|
|
|
|
+ cBirthdate = DateUtil.str2Date(data.birthdate);
|
|
|
|
+ String s1 = DateUtil.dateFormat(cBirthdate, "yyyy-MM-dd");
|
|
|
|
+ viewBinding.tvBirthday.setText(s1);
|
|
} else {
|
|
} else {
|
|
viewBinding.tvBirthday.setText("");
|
|
viewBinding.tvBirthday.setText("");
|
|
}
|
|
}
|
|
@@ -453,13 +458,9 @@ public class PersonalSettingActivity extends BaseMVPActivity<ActivityPersonalSet
|
|
}
|
|
}
|
|
//15510601008
|
|
//15510601008
|
|
if (!TextUtils.isEmpty(setDetailBean.birthdate)) {
|
|
if (!TextUtils.isEmpty(setDetailBean.birthdate)) {
|
|
- if (setDetailBean.birthdate.contains(" ")) {
|
|
|
|
- String[] s = setDetailBean.birthdate.split(" ");
|
|
|
|
- viewBinding.tvBirthday.setText(s[0]);
|
|
|
|
- } else {
|
|
|
|
- viewBinding.tvBirthday.setText(setDetailBean.birthdate);
|
|
|
|
- }
|
|
|
|
- mySetDetailBean.birthdate = setDetailBean.birthdate;
|
|
|
|
|
|
+ cBirthdate = DateUtil.str2Date(setDetailBean.birthdate);
|
|
|
|
+ String s1 = DateUtil.dateFormat(cBirthdate, "yyyy-MM-dd");
|
|
|
|
+ viewBinding.tvBirthday.setText(s1);
|
|
} else {
|
|
} else {
|
|
viewBinding.tvBirthday.setText("");
|
|
viewBinding.tvBirthday.setText("");
|
|
}
|
|
}
|