2
This commit is contained in:
@@ -23,6 +23,7 @@ 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;
|
||||||
@@ -125,11 +126,11 @@ public class LoginSetInfoActivity extends BaseActivity implements
|
|||||||
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; // 记录选中的条目数量
|
||||||
@@ -174,7 +175,7 @@ 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
|
||||||
@@ -188,7 +189,7 @@ public class LoginSetInfoActivity extends BaseActivity implements
|
|||||||
|
|
||||||
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);// 职业职称
|
||||||
@@ -196,7 +197,7 @@ public class LoginSetInfoActivity extends BaseActivity implements
|
|||||||
|
|
||||||
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);// 医师资格证图片
|
||||||
@@ -492,16 +493,46 @@ 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);
|
||||||
|
if (my_name != null) {
|
||||||
|
my_name.setEnabled(b);
|
||||||
|
my_name.setFocusable(b);
|
||||||
|
my_name.setFocusableInTouchMode(b);
|
||||||
|
}
|
||||||
ll_my_sex.setEnabled(b);
|
ll_my_sex.setEnabled(b);
|
||||||
ll_my_hospital.setEnabled(b);
|
ll_my_hospital.setEnabled(b);
|
||||||
ll_my_office_name.setEnabled(b);
|
ll_my_office_name.setEnabled(b);
|
||||||
ll_my_office_phone.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_professional.setEnabled(b);
|
||||||
ll_my_zgzs_number.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_upload_certificateImg.setEnabled(b);
|
||||||
ll_my_disease.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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 弹出对话框
|
// 弹出对话框
|
||||||
private void showAlertTips(String message) {
|
private void showAlertTips(String message) {
|
||||||
buildAlert = ECAlertDialog.buildAlert(ct, message,
|
buildAlert = ECAlertDialog.buildAlert(ct, message,
|
||||||
@@ -558,12 +589,14 @@ public class LoginSetInfoActivity extends BaseActivity implements
|
|||||||
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:// 性别
|
||||||
|
hideSoftKeyboard();
|
||||||
pwSexOptions.showAtLocation(my_sex, Gravity.BOTTOM, 0, 0);
|
pwSexOptions.showAtLocation(my_sex, Gravity.BOTTOM, 0, 0);
|
||||||
break;
|
break;
|
||||||
case R.id.ll_my_hospital:// 医院
|
case R.id.ll_my_hospital:// 医院
|
||||||
|
hideSoftKeyboard();
|
||||||
// 设置适配器
|
// 设置适配器
|
||||||
// listView.setAdapter(new MyListAdapter(my_hospital,
|
// listView.setAdapter(new MyListAdapter(my_hospital,
|
||||||
// hospitalList));
|
// hospitalList));
|
||||||
@@ -576,20 +609,23 @@ public class LoginSetInfoActivity extends BaseActivity implements
|
|||||||
// my_hospital, 1);
|
// my_hospital, 1);
|
||||||
break;
|
break;
|
||||||
case R.id.ll_my_office_name:// 科室
|
case R.id.ll_my_office_name:// 科室
|
||||||
|
hideSoftKeyboard();
|
||||||
showPwOptions("请选择科室", officeListItems, officeListUuidItems,
|
showPwOptions("请选择科室", officeListItems, officeListUuidItems,
|
||||||
my_office_name, 2);
|
my_office_name, 2);
|
||||||
break;
|
break;
|
||||||
case R.id.ll_my_office_phone:// 科室电话
|
case R.id.ll_my_office_phone:// 科室电话
|
||||||
showEditPopuWindows(my_office_phone, 2);
|
focusInlineEdit(my_office_phone);
|
||||||
break;
|
break;
|
||||||
case R.id.ll_my_professional:// 职称
|
case R.id.ll_my_professional:// 职称
|
||||||
|
hideSoftKeyboard();
|
||||||
showPwOptions("请选择职称", professionalListItems,
|
showPwOptions("请选择职称", professionalListItems,
|
||||||
professionalUuidListItems, my_professional, 3);
|
professionalUuidListItems, my_professional, 3);
|
||||||
break;
|
break;
|
||||||
case R.id.ll_my_zgzs_number:// 资格证号
|
case R.id.ll_my_zgzs_number:// 资格证号
|
||||||
showEditPopuWindows(my_zgzs_number, 3);
|
focusInlineEdit(my_zgzs_number);
|
||||||
break;
|
break;
|
||||||
case R.id.ll_upload_certificateImg:// 资格证图片
|
case R.id.ll_upload_certificateImg:// 资格证图片
|
||||||
|
hideSoftKeyboard();
|
||||||
save(mobile);
|
save(mobile);
|
||||||
Intent intent = new Intent(ct, SelectedPhotoActivity.class);
|
Intent intent = new Intent(ct, SelectedPhotoActivity.class);
|
||||||
intent.putExtra("isConstraint", true);// 是否等比例裁剪
|
intent.putExtra("isConstraint", true);// 是否等比例裁剪
|
||||||
@@ -599,6 +635,7 @@ public class LoginSetInfoActivity extends BaseActivity implements
|
|||||||
R.anim.timepicker_anim_exit_bottom);
|
R.anim.timepicker_anim_exit_bottom);
|
||||||
break;
|
break;
|
||||||
case R.id.ll_my_disease:// 专长
|
case R.id.ll_my_disease:// 专长
|
||||||
|
hideSoftKeyboard();
|
||||||
showDiseasePop(my_disease);
|
showDiseasePop(my_disease);
|
||||||
break;
|
break;
|
||||||
case R.id.btn_skip_info:// 跳过
|
case R.id.btn_skip_info:// 跳过
|
||||||
@@ -1041,7 +1078,7 @@ public class LoginSetInfoActivity extends BaseActivity implements
|
|||||||
ToastUtil.showToast("科室电话不为空");
|
ToastUtil.showToast("科室电话不为空");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (officePhone.equals("请输入科室电话")) {
|
if (officePhone.equals("请输入科室电话") || officePhone.length() < 10) {
|
||||||
ToastUtil.showToast("请输入正确的科室电话");
|
ToastUtil.showToast("请输入正确的科室电话");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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