2
This commit is contained in:
@@ -21,8 +21,9 @@ import android.view.inputmethod.InputMethodManager;
|
|||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
import android.widget.AdapterView.OnItemClickListener;
|
import android.widget.AdapterView.OnItemClickListener;
|
||||||
import android.widget.BaseAdapter;
|
import android.widget.BaseAdapter;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
|
import android.widget.EditText;
|
||||||
import android.widget.GridView;
|
import android.widget.GridView;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
@@ -124,13 +125,13 @@ public class LoginSetInfoActivity extends BaseActivity implements
|
|||||||
private String cityId = "";
|
private String cityId = "";
|
||||||
private String disctictId = "";
|
private String disctictId = "";
|
||||||
private boolean choosehos =false;
|
private boolean choosehos =false;
|
||||||
private TextView my_hospital;
|
private TextView my_hospital;
|
||||||
private TextView my_office_phone;
|
private EditText my_office_phone;
|
||||||
private TextView my_professional;
|
private TextView my_professional;
|
||||||
private TextView my_zgzs_number;
|
private EditText my_zgzs_number;
|
||||||
private TextView my_disease;
|
private TextView my_disease;
|
||||||
private TextView my_name;
|
private EditText my_name;
|
||||||
private TextView my_sex;
|
private TextView my_sex;
|
||||||
private TextView my_office_name;
|
private TextView my_office_name;
|
||||||
private int checkNum = 0; // 记录选中的条目数量
|
private int checkNum = 0; // 记录选中的条目数量
|
||||||
private ECAlertDialog buildAlert;
|
private ECAlertDialog buildAlert;
|
||||||
@@ -173,30 +174,30 @@ public class LoginSetInfoActivity extends BaseActivity implements
|
|||||||
|
|
||||||
my_photo = view.findViewById(R.id.my_photo);// 头像
|
my_photo = view.findViewById(R.id.my_photo);// 头像
|
||||||
|
|
||||||
ll_my_name = (LinearLayout) view.findViewById(R.id.ll_my_name);// 姓名
|
ll_my_name = (LinearLayout) view.findViewById(R.id.ll_my_name);// 姓名
|
||||||
my_name = (TextView) view.findViewById(R.id.my_name);// 姓名
|
my_name = (EditText) view.findViewById(R.id.my_name);// 姓名
|
||||||
|
|
||||||
ll_my_sex = (LinearLayout) view.findViewById(R.id.ll_my_sex);// sex
|
ll_my_sex = (LinearLayout) view.findViewById(R.id.ll_my_sex);// sex
|
||||||
my_sex = (TextView) view.findViewById(R.id.my_sex);// sex
|
my_sex = (TextView) view.findViewById(R.id.my_sex);// sex
|
||||||
|
|
||||||
ll_my_hospital = (LinearLayout) view.findViewById(R.id.ll_my_hospital);// 医院
|
ll_my_hospital = (LinearLayout) view.findViewById(R.id.ll_my_hospital);// 医院
|
||||||
my_hospital = (TextView) view.findViewById(R.id.my_hospital);// 医院名称
|
my_hospital = (TextView) view.findViewById(R.id.my_hospital);// 医院名称
|
||||||
ll_my_photo=(LinearLayout) view.findViewById(R.id.ll_my_photo);
|
ll_my_photo=(LinearLayout) view.findViewById(R.id.ll_my_photo);
|
||||||
ll_my_office_name = (LinearLayout) view
|
ll_my_office_name = (LinearLayout) view
|
||||||
.findViewById(R.id.ll_my_office_name);// 工作室
|
.findViewById(R.id.ll_my_office_name);// 工作室
|
||||||
my_office_name = (TextView) view.findViewById(R.id.my_office_name);// 工作室名称
|
my_office_name = (TextView) view.findViewById(R.id.my_office_name);// 工作室名称
|
||||||
|
|
||||||
ll_my_office_phone = (LinearLayout) view
|
ll_my_office_phone = (LinearLayout) view
|
||||||
.findViewById(R.id.ll_my_office_phone);// 工作室电话
|
.findViewById(R.id.ll_my_office_phone);// 工作室电话
|
||||||
my_office_phone = (TextView) view.findViewById(R.id.my_office_phone);// 工作室
|
my_office_phone = (EditText) view.findViewById(R.id.my_office_phone);// 工作室
|
||||||
|
|
||||||
ll_my_professional = (LinearLayout) view
|
ll_my_professional = (LinearLayout) view
|
||||||
.findViewById(R.id.ll_my_professional);// 职业职称
|
.findViewById(R.id.ll_my_professional);// 职业职称
|
||||||
my_professional = (TextView) view.findViewById(R.id.my_professional);// 职业职称
|
my_professional = (TextView) view.findViewById(R.id.my_professional);// 职业职称
|
||||||
|
|
||||||
ll_my_zgzs_number = (LinearLayout) view
|
ll_my_zgzs_number = (LinearLayout) view
|
||||||
.findViewById(R.id.ll_my_zgzs_number);// 医师资格证号码
|
.findViewById(R.id.ll_my_zgzs_number);// 医师资格证号码
|
||||||
my_zgzs_number = (TextView) view.findViewById(R.id.my_zgzs_number);// 医师资格证号码
|
my_zgzs_number = (EditText) view.findViewById(R.id.my_zgzs_number);// 医师资格证号码
|
||||||
|
|
||||||
ll_upload_certificateImg = (LinearLayout) view
|
ll_upload_certificateImg = (LinearLayout) view
|
||||||
.findViewById(R.id.ll_upload_certificateImg);// 医师资格证图片
|
.findViewById(R.id.ll_upload_certificateImg);// 医师资格证图片
|
||||||
@@ -489,17 +490,47 @@ public class LoginSetInfoActivity extends BaseActivity implements
|
|||||||
/**
|
/**
|
||||||
* 设置资料各项点击事件
|
* 设置资料各项点击事件
|
||||||
*/
|
*/
|
||||||
private void setInfoClick(boolean b) {
|
private void setInfoClick(boolean b) {
|
||||||
ll_my_photo.setEnabled(b);
|
ll_my_photo.setEnabled(b);
|
||||||
ll_my_name.setEnabled(b);
|
ll_my_name.setEnabled(b);
|
||||||
ll_my_sex.setEnabled(b);
|
if (my_name != null) {
|
||||||
ll_my_hospital.setEnabled(b);
|
my_name.setEnabled(b);
|
||||||
ll_my_office_name.setEnabled(b);
|
my_name.setFocusable(b);
|
||||||
ll_my_office_phone.setEnabled(b);
|
my_name.setFocusableInTouchMode(b);
|
||||||
ll_my_professional.setEnabled(b);
|
}
|
||||||
ll_my_zgzs_number.setEnabled(b);
|
ll_my_sex.setEnabled(b);
|
||||||
ll_upload_certificateImg.setEnabled(b);
|
ll_my_hospital.setEnabled(b);
|
||||||
ll_my_disease.setEnabled(b);
|
ll_my_office_name.setEnabled(b);
|
||||||
|
ll_my_office_phone.setEnabled(b);
|
||||||
|
if (my_office_phone != null) {
|
||||||
|
my_office_phone.setEnabled(b);
|
||||||
|
my_office_phone.setFocusable(b);
|
||||||
|
my_office_phone.setFocusableInTouchMode(b);
|
||||||
|
}
|
||||||
|
ll_my_professional.setEnabled(b);
|
||||||
|
ll_my_zgzs_number.setEnabled(b);
|
||||||
|
if (my_zgzs_number != null) {
|
||||||
|
my_zgzs_number.setEnabled(b);
|
||||||
|
my_zgzs_number.setFocusable(b);
|
||||||
|
my_zgzs_number.setFocusableInTouchMode(b);
|
||||||
|
}
|
||||||
|
ll_upload_certificateImg.setEnabled(b);
|
||||||
|
ll_my_disease.setEnabled(b);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void focusInlineEdit(EditText editText) {
|
||||||
|
if (editText == null || !editText.isEnabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
editText.requestFocus();
|
||||||
|
CharSequence text = editText.getText();
|
||||||
|
if (text != null) {
|
||||||
|
editText.setSelection(text.length());
|
||||||
|
}
|
||||||
|
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
if (imm != null) {
|
||||||
|
imm.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 弹出对话框
|
// 弹出对话框
|
||||||
@@ -556,50 +587,56 @@ public class LoginSetInfoActivity extends BaseActivity implements
|
|||||||
// 为了验证是不是上一个用户
|
// 为了验证是不是上一个用户
|
||||||
String mobile = SharePrefUtil.getString(ct, Constant.SP_IS_FIRST_NAME,
|
String mobile = SharePrefUtil.getString(ct, Constant.SP_IS_FIRST_NAME,
|
||||||
Constant.mobile, "");// 手机号
|
Constant.mobile, "");// 手机号
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.ll_my_name:// 姓名
|
case R.id.ll_my_name:// 姓名
|
||||||
showEditPopuWindows(my_name, 1);
|
focusInlineEdit(my_name);
|
||||||
break;
|
break;
|
||||||
case R.id.ll_my_sex:// 性别
|
case R.id.ll_my_sex:// 性别
|
||||||
pwSexOptions.showAtLocation(my_sex, Gravity.BOTTOM, 0, 0);
|
hideSoftKeyboard();
|
||||||
break;
|
pwSexOptions.showAtLocation(my_sex, Gravity.BOTTOM, 0, 0);
|
||||||
case R.id.ll_my_hospital:// 医院
|
break;
|
||||||
// 设置适配器
|
case R.id.ll_my_hospital:// 医院
|
||||||
// listView.setAdapter(new MyListAdapter(my_hospital,
|
hideSoftKeyboard();
|
||||||
// hospitalList));
|
// 设置适配器
|
||||||
// // 弹出popuwindow框
|
// listView.setAdapter(new MyListAdapter(my_hospital,
|
||||||
// setPopupWindow(my_hospital);
|
// hospitalList));
|
||||||
// 先选择者城市再选择医院
|
// // 弹出popuwindow框
|
||||||
startActivityForResult(new Intent(LoginSetInfoActivity.this,ChoosehospitalActivity.class),333);
|
// setPopupWindow(my_hospital);
|
||||||
// pwCityOptions.showAtLocation(my_hospital, Gravity.BOTTOM, 0, 0);
|
// 先选择者城市再选择医院
|
||||||
// showPwOptions("请选择医院", hospitalListItems, hospitalListUuidItems,
|
startActivityForResult(new Intent(LoginSetInfoActivity.this,ChoosehospitalActivity.class),333);
|
||||||
// my_hospital, 1);
|
// pwCityOptions.showAtLocation(my_hospital, Gravity.BOTTOM, 0, 0);
|
||||||
break;
|
// showPwOptions("请选择医院", hospitalListItems, hospitalListUuidItems,
|
||||||
case R.id.ll_my_office_name:// 科室
|
// my_hospital, 1);
|
||||||
showPwOptions("请选择科室", officeListItems, officeListUuidItems,
|
break;
|
||||||
my_office_name, 2);
|
case R.id.ll_my_office_name:// 科室
|
||||||
break;
|
hideSoftKeyboard();
|
||||||
case R.id.ll_my_office_phone:// 科室电话
|
showPwOptions("请选择科室", officeListItems, officeListUuidItems,
|
||||||
showEditPopuWindows(my_office_phone, 2);
|
my_office_name, 2);
|
||||||
break;
|
break;
|
||||||
case R.id.ll_my_professional:// 职称
|
case R.id.ll_my_office_phone:// 科室电话
|
||||||
showPwOptions("请选择职称", professionalListItems,
|
focusInlineEdit(my_office_phone);
|
||||||
professionalUuidListItems, my_professional, 3);
|
break;
|
||||||
break;
|
case R.id.ll_my_professional:// 职称
|
||||||
case R.id.ll_my_zgzs_number:// 资格证号
|
hideSoftKeyboard();
|
||||||
showEditPopuWindows(my_zgzs_number, 3);
|
showPwOptions("请选择职称", professionalListItems,
|
||||||
break;
|
professionalUuidListItems, my_professional, 3);
|
||||||
case R.id.ll_upload_certificateImg:// 资格证图片
|
break;
|
||||||
save(mobile);
|
case R.id.ll_my_zgzs_number:// 资格证号
|
||||||
Intent intent = new Intent(ct, SelectedPhotoActivity.class);
|
focusInlineEdit(my_zgzs_number);
|
||||||
intent.putExtra("isConstraint", true);// 是否等比例裁剪
|
break;
|
||||||
startActivityForResult(intent, TO_SELECT_PHOTO);
|
case R.id.ll_upload_certificateImg:// 资格证图片
|
||||||
// 进入退出动画
|
hideSoftKeyboard();
|
||||||
overridePendingTransition(R.anim.timepicker_anim_enter_bottom,
|
save(mobile);
|
||||||
R.anim.timepicker_anim_exit_bottom);
|
Intent intent = new Intent(ct, SelectedPhotoActivity.class);
|
||||||
break;
|
intent.putExtra("isConstraint", true);// 是否等比例裁剪
|
||||||
case R.id.ll_my_disease:// 专长
|
startActivityForResult(intent, TO_SELECT_PHOTO);
|
||||||
showDiseasePop(my_disease);
|
// 进入退出动画
|
||||||
|
overridePendingTransition(R.anim.timepicker_anim_enter_bottom,
|
||||||
|
R.anim.timepicker_anim_exit_bottom);
|
||||||
|
break;
|
||||||
|
case R.id.ll_my_disease:// 专长
|
||||||
|
hideSoftKeyboard();
|
||||||
|
showDiseasePop(my_disease);
|
||||||
break;
|
break;
|
||||||
case R.id.btn_skip_info:// 跳过
|
case R.id.btn_skip_info:// 跳过
|
||||||
handleSkipOrBack(mobile);
|
handleSkipOrBack(mobile);
|
||||||
@@ -1037,13 +1074,13 @@ public class LoginSetInfoActivity extends BaseActivity implements
|
|||||||
ToastUtil.showToast("科室不为空");
|
ToastUtil.showToast("科室不为空");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (TextUtils.isEmpty(officePhone)) {
|
if (TextUtils.isEmpty(officePhone)) {
|
||||||
ToastUtil.showToast("科室电话不为空");
|
ToastUtil.showToast("科室电话不为空");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (officePhone.equals("请输入科室电话")) {
|
if (officePhone.equals("请输入科室电话") || officePhone.length() < 10) {
|
||||||
ToastUtil.showToast("请输入正确的科室电话");
|
ToastUtil.showToast("请输入正确的科室电话");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (TextUtils.isEmpty(etProfessionalName)) {
|
if (TextUtils.isEmpty(etProfessionalName)) {
|
||||||
ToastUtil.showToast("职称不为空");
|
ToastUtil.showToast("职称不为空");
|
||||||
|
|||||||
@@ -60,10 +60,17 @@
|
|||||||
style="@style/InfoLeftStyle"
|
style="@style/InfoLeftStyle"
|
||||||
android:text="姓名" />
|
android:text="姓名" />
|
||||||
|
|
||||||
<TextView
|
<EditText
|
||||||
android:id="@+id/my_name"
|
android:id="@+id/my_name"
|
||||||
style="@style/InfoRightStyle"
|
style="@style/InfoRightStyle"
|
||||||
android:hint="请输入姓名" />
|
android:layout_width="200dp"
|
||||||
|
android:background="@null"
|
||||||
|
android:drawableRight="@null"
|
||||||
|
android:hint="请输入姓名"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="textPersonName"
|
||||||
|
android:maxLength="20"
|
||||||
|
android:textCursorDrawable="@drawable/color_cursor" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -132,10 +139,17 @@
|
|||||||
style="@style/InfoLeftStyle"
|
style="@style/InfoLeftStyle"
|
||||||
android:text="科室电话" />
|
android:text="科室电话" />
|
||||||
|
|
||||||
<TextView
|
<EditText
|
||||||
android:id="@+id/my_office_phone"
|
android:id="@+id/my_office_phone"
|
||||||
style="@style/InfoRightStyle"
|
style="@style/InfoRightStyle"
|
||||||
android:hint="请输入所在科室的电话" />
|
android:layout_width="200dp"
|
||||||
|
android:background="@null"
|
||||||
|
android:drawableRight="@null"
|
||||||
|
android:hint="请输入所在科室的电话"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="phone"
|
||||||
|
android:maxLength="20"
|
||||||
|
android:textCursorDrawable="@drawable/color_cursor" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -168,11 +182,17 @@
|
|||||||
style="@style/InfoLeftStyle"
|
style="@style/InfoLeftStyle"
|
||||||
android:text="执业医师证编号" />
|
android:text="执业医师证编号" />
|
||||||
|
|
||||||
<TextView
|
<EditText
|
||||||
android:id="@+id/my_zgzs_number"
|
android:id="@+id/my_zgzs_number"
|
||||||
style="@style/InfoRightStyle"
|
style="@style/InfoRightStyle"
|
||||||
android:layout_width="160dp"
|
android:layout_width="180dp"
|
||||||
android:hint="请输入执业医师证编号" />
|
android:background="@null"
|
||||||
|
android:drawableRight="@null"
|
||||||
|
android:hint="请输入执业医师证编号"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="number"
|
||||||
|
android:maxLength="30"
|
||||||
|
android:textCursorDrawable="@drawable/color_cursor" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|||||||
Reference in New Issue
Block a user