浏览代码

完善学生信息功能

316044749 7 年之前
父节点
当前提交
db7319210e

+ 53 - 164
app/src/main/java/com/ynstkz/shitu/android/activity/StudentInfoActivity.java

@@ -6,6 +6,7 @@ import android.content.DialogInterface;
 import android.os.Bundle;
 import android.support.annotation.Nullable;
 import android.text.TextUtils;
+import android.text.format.DateFormat;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.widget.Button;
@@ -27,7 +28,6 @@ import com.ynstkz.shitu.android.data.RequestGroup;
 import com.ynstkz.shitu.android.data.SharedPreferencesUtils;
 import com.ynstkz.shitu.android.view.ScrollViewWithGridView;
 
-import java.text.DateFormat;
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.List;
@@ -43,6 +43,8 @@ import okhttp3.Response;
 public class StudentInfoActivity extends TitleBarActivity {
 
 
+    @Bind(R.id.iv_back)
+    ImageView ivBack;
     @Bind(R.id.tv_title)
     TextView tvTitle;
     @Bind(R.id.view_title)
@@ -55,42 +57,10 @@ public class StudentInfoActivity extends TitleBarActivity {
     TextView tvSex;
     @Bind(R.id.edit_nation)
     EditText editNation;
-    @Bind(R.id.edit_native_place)
-    EditText editNativePlace;
     @Bind(R.id.tv_residenceCityId)
     TextView tvResidenceCityId;
     @Bind(R.id.tv_residenceRegionId)
     TextView tvResidenceRegionId;
-    @Bind(R.id.edit_residenceType)
-    EditText editResidenceType;
-    @Bind(R.id.edit_height)
-    EditText editHeight;
-    @Bind(R.id.edit_weight)
-    EditText editWeight;
-    @Bind(R.id.edit_bloodType)
-    EditText editBloodType;
-    @Bind(R.id.edit_physicalExamination)
-    EditText editPhysicalExamination;
-    @Bind(R.id.edit_idcode)
-    EditText editIdcode;
-    @Bind(R.id.tv_livingProvinceId)
-    TextView tvLivingProvinceId;
-    @Bind(R.id.tv_livingCityId)
-    TextView tvLivingCityId;
-    @Bind(R.id.tv_livingRegionId)
-    TextView tvLivingRegionId;
-    @Bind(R.id.edit_livingAddress)
-    EditText editLivingAddress;
-    @Bind(R.id.textView)
-    TextView textView;
-    @Bind(R.id.edit_contactAddress)
-    EditText editContactAddress;
-    @Bind(R.id.edit_zipCode)
-    EditText editZipCode;
-    @Bind(R.id.edit_preSchoolEducation)
-    EditText editPreSchoolEducation;
-    @Bind(R.id.edit_hobby)
-    EditText editHobby;
     @Bind(R.id.ll_member_family)
     LinearLayout llMemberFamily;
     @Bind(R.id.gv_images)
@@ -105,10 +75,6 @@ public class StudentInfoActivity extends TitleBarActivity {
     private String residenceCityId;
     private String residenceRegionId;
 
-    private String livingProvinceId;
-    private String livingCityId;
-    private String livingRegionId;
-
     //家庭成员信息
     private List<StudentFamilyInfoBean> listStudentFamilyInfo;
 
@@ -147,10 +113,10 @@ public class StudentInfoActivity extends TitleBarActivity {
                     @Override
                     public void onDateSet(DatePicker datePicker, int year, int monthOfYear, int dayOfMonth) {
                         calendar.set(year, monthOfYear, dayOfMonth);
-                        birthday = android.text.format.DateFormat.format("yyyy-MM-dd", calendar).toString();
+                        birthday = DateFormat.format("yyyy-MM-dd", calendar).toString();
                         tvBirthday.setText(birthday);
                     }
-                },calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH));
+                }, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH));
                 dialog.show();
             }
         });
@@ -199,35 +165,6 @@ public class StudentInfoActivity extends TitleBarActivity {
             }
         });
 
-        /**
-         * 现居住 省
-         */
-        tvLivingProvinceId.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                getLocalCityList("11", "");
-            }
-        });
-
-        /**
-         * 现居住 市
-         */
-        tvLivingCityId.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                getLocalCityList("12", livingProvinceId);
-            }
-        });
-
-        /**
-         * 现居住 区
-         */
-        tvLivingRegionId.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                getLocalCityList("13", livingCityId);
-            }
-        });
 
         /**
          * 保存
@@ -235,74 +172,21 @@ public class StudentInfoActivity extends TitleBarActivity {
         btnSave.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                saveApplyFamilyInfo();
                 String studentName = editUsername.getText().toString().trim();
-                if(TextUtils.isEmpty(studentName)){
+                if (TextUtils.isEmpty(studentName)) {
                     showToast("用户名不能为空");
                     return;
                 }
-                if(TextUtils.isEmpty(birthday)){
+                if (TextUtils.isEmpty(birthday)) {
                     showToast("出生日期不能为空");
                     return;
                 }
                 String ethnic = editNation.getText().toString().trim();
-                if(TextUtils.isEmpty(ethnic)){
+                if (TextUtils.isEmpty(ethnic)) {
                     showToast("民族不能为空");
                     return;
                 }
-                String nativePlace = editNativePlace.getText().toString().trim();
-                if(TextUtils.isEmpty(nativePlace)){
-                    showToast("籍贯不能为空");
-                    return;
-                }
-                String height = editHeight.getText().toString().trim();
-                if(TextUtils.isEmpty(height)){
-                    showToast("升高不能为空");
-                    return;
-                }
-                String weight = editWeight.getText().toString().trim();
-                if(TextUtils.isEmpty(weight)){
-                    showToast("体重不能为空");
-                    return;
-                }
-                String bloodType = editBloodType.getText().toString().trim();
-                if(TextUtils.isEmpty(bloodType)){
-                    showToast("血型不能为空");
-                    return;
-                }
-                String physicalExamination = editPhysicalExamination.getText().toString().trim();
-                if(TextUtils.isEmpty(physicalExamination)){
-                    showToast("体检不能为空");
-                    return;
-                }
-                String idCardNum = editIdcode.getText().toString().trim();
-                if(TextUtils.isEmpty(idCardNum)){
-                    showToast("体检不能为空");
-                    return;
-                }
-                String contactAddress = editContactAddress.getText().toString().trim();
-                if(TextUtils.isEmpty(contactAddress)){
-                    showToast("居住地详细地址不能为空");
-                    return;
-                }
-                String zipCode = editZipCode.getText().toString().trim();
-                if(TextUtils.isEmpty(zipCode)){
-                    showToast("邮政编码不能为空");
-                    return;
-                }
-                String preSchoolEducation = editPreSchoolEducation.getText().toString();
-                if(TextUtils.isEmpty(preSchoolEducation)){
-                    showToast("学前教育不能为空");
-                    return;
-                }
-                String hobby = editHobby.getText().toString().trim();
-                if(TextUtils.isEmpty(hobby)){
-                    showToast("兴趣爱好不能为空");
-                    return;
-                }
-                saveApplyStudentInfo(studentName, birthday, "", ethnic, nativePlace, residenceProvinceId, residenceCityId, residenceRegionId, "",
-                        height, weight, bloodType, physicalExamination, idCardNum, livingProvinceId, livingCityId, livingRegionId, contactAddress, zipCode,
-                        preSchoolEducation, hobby);
+                saveApplyStudentInfo(studentName, birthday, sex+"", ethnic, residenceProvinceId, residenceCityId, residenceRegionId);
             }
         });
     }
@@ -350,15 +234,6 @@ public class StudentInfoActivity extends TitleBarActivity {
                                         } else if ("03".equals(type)) {
                                             residenceRegionId = dataBean.get(i).getRegionId() + "";
                                             tvResidenceRegionId.setText(dataBean.get(i).getRegionName());
-                                        } else if ("11".equals(type)) {
-                                            livingProvinceId = dataBean.get(i).getRegionId() + "";
-                                            tvLivingProvinceId.setText(dataBean.get(i).getRegionName());
-                                        } else if ("12".equals(type)) {
-                                            livingCityId = dataBean.get(i).getRegionId() + "";
-                                            tvLivingCityId.setText(dataBean.get(i).getRegionName());
-                                        } else if ("13".equals(type)) {
-                                            livingRegionId = dataBean.get(i).getRegionId() + "";
-                                            tvLivingRegionId.setText(dataBean.get(i).getRegionName());
                                         }
                                     }
                                 });
@@ -376,14 +251,10 @@ public class StudentInfoActivity extends TitleBarActivity {
     /**
      * 保存学生信息
      */
-    private void saveApplyStudentInfo(String studentName, String birthday, String sex, String ethnic, String nativePlace, String residenceProvinceId,
-                                      String residenceCityId, String residenceRegionId, String residenceType, String height, String weight,
-                                      String bloodType, String physicalExamination, String idCardNum, String livingProvinceId, String livingCityId,
-                                      String livingRegionId, String contactAddress,String zipCode, String preSchoolEducation, String hobby){
-
-        RequestGroup.saveApplyStudentInfo(studentName, birthday, sex, ethnic, nativePlace, residenceProvinceId, residenceCityId, residenceRegionId, residenceType,
-                height, weight, bloodType, physicalExamination, idCardNum, livingProvinceId, livingCityId, livingRegionId, contactAddress, zipCode, preSchoolEducation,
-                hobby, new Callback() {
+    private void saveApplyStudentInfo(String studentName, String birthday, String sex, String ethnic, String residenceProvinceId,
+                                      String residenceCityId, String residenceRegionId) {
+
+        RequestGroup.saveApplyStudentInfo(studentName, birthday, sex, ethnic, residenceProvinceId, residenceCityId, residenceRegionId, new Callback() {
                     @Override
                     public Object parseNetworkResponse(Response response, int id) throws Exception {
                         return new Gson().fromJson(response.body().string(), StudentInfoAddBean.class);
@@ -396,10 +267,10 @@ public class StudentInfoActivity extends TitleBarActivity {
 
                     @Override
                     public void onResponse(Object response, int id) {
-                        StudentInfoAddBean studentInfoAddBean = (StudentInfoAddBean)response;
-                        if(studentInfoAddBean != null) {
-                            if("200".equals(studentInfoAddBean.getCode())){
-                                saveApplyFamilyInfo();
+                        StudentInfoAddBean studentInfoAddBean = (StudentInfoAddBean) response;
+                        if (studentInfoAddBean != null) {
+                            if ("200".equals(studentInfoAddBean.getCode())) {
+                                saveApplyFamilyInfo(studentInfoAddBean.getData()+"");
                             } else {
                                 showToast(studentInfoAddBean.getMsg());
                             }
@@ -412,23 +283,24 @@ public class StudentInfoActivity extends TitleBarActivity {
     /**
      * 保存家庭成员信息
      */
-    private void saveApplyFamilyInfo(){
-        if(llMemberFamily.getChildCount() > 0) {
-            for (int i=0; i<llMemberFamily.getChildCount(); i++) {
+    private void saveApplyFamilyInfo(String studentId) {
+        if (llMemberFamily.getChildCount() > 0) {
+            for (int i = 0; i < llMemberFamily.getChildCount(); i++) {
                 LinearLayout viewMemberFamilyItem = (LinearLayout) llMemberFamily.getChildAt(i);
 
-                String tv_familyName = ((EditText)viewMemberFamilyItem.findViewById(R.id.tv_familyName)).getText().toString().trim();
-                String familyPhone = ((EditText)viewMemberFamilyItem.findViewById(R.id.edit_familyPhone)).getText().toString().trim();
-                String job = ((EditText)viewMemberFamilyItem.findViewById(R.id.edit_job)).getText().toString().trim();
-                String remark = ((EditText)viewMemberFamilyItem.findViewById(R.id.edit_remark)).getText().toString().trim();
+                String relationShip = ((EditText) viewMemberFamilyItem.findViewById(R.id.edit_relation)).getText().toString().trim();
+                String tv_familyName = ((EditText) viewMemberFamilyItem.findViewById(R.id.tv_familyName)).getText().toString().trim();
+                String familyPhone = ((EditText) viewMemberFamilyItem.findViewById(R.id.edit_familyPhone)).getText().toString().trim();
+                String job = ((EditText) viewMemberFamilyItem.findViewById(R.id.edit_job)).getText().toString().trim();
+                String remark = ((EditText) viewMemberFamilyItem.findViewById(R.id.edit_remark)).getText().toString().trim();
 
                 StudentFamilyInfoBean studentFamilyInfoBean = new StudentFamilyInfoBean();
+                studentFamilyInfoBean.setRelationShip(relationShip);
                 studentFamilyInfoBean.setFamilyName(tv_familyName);
-                studentFamilyInfoBean.setFamilyId("");
                 studentFamilyInfoBean.setFamilyPhone(familyPhone);
                 studentFamilyInfoBean.setJob(job);
                 studentFamilyInfoBean.setRemark(remark);
-                studentFamilyInfoBean.setStudentInfoId("");
+                studentFamilyInfoBean.setStudentInfoId(studentId);
                 studentFamilyInfoBean.setUserId(SharedPreferencesUtils.getUserId());
                 listStudentFamilyInfo.add(studentFamilyInfoBean);
             }
@@ -447,13 +319,12 @@ public class StudentInfoActivity extends TitleBarActivity {
 
             @Override
             public void onResponse(Object response, int id) {
-                StudentInfoAddBean studentInfoAddBean = (StudentInfoAddBean)response;
-                if(studentInfoAddBean != null) {
-                    if("200".equals(studentInfoAddBean.getCode())){ //提交家庭信息成功
-
-                    } else {
-                        showToast(studentInfoAddBean.getMsg());
+                StudentInfoAddBean studentInfoAddBean = (StudentInfoAddBean) response;
+                if (studentInfoAddBean != null) {
+                    if ("200".equals(studentInfoAddBean.getCode())) { //提交家庭信息成功
+                        finish();
                     }
+                    showToast(studentInfoAddBean.getMsg());
                 }
             }
         });
@@ -462,24 +333,42 @@ public class StudentInfoActivity extends TitleBarActivity {
     /**
      * 初始化家庭成员信息
      */
-    private void initFamilyInfo(){
+    private void initFamilyInfo() {
         llMemberFamily.removeAllViews();
         View familyView = LayoutInflater.from(this).inflate(R.layout.item_student_family, null);
         TextView tvFamilyLab = familyView.findViewById(R.id.tv_family_lab);
         tvFamilyLab.setText("家庭成员1");
         ImageView ivFamilyAdd = familyView.findViewById(R.id.iv_family_add);
-        ivFamilyAdd.setVisibility(View.VISIBLE);
         //添加成员
         ivFamilyAdd.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                View familyView = LayoutInflater.from(StudentInfoActivity.this).inflate(R.layout.item_student_family, null);
+                final View familyView = LayoutInflater.from(StudentInfoActivity.this).inflate(R.layout.item_student_family, null);
                 TextView tvFamilyLab = familyView.findViewById(R.id.tv_family_lab);
+                ImageView ivFamilyAdd = familyView.findViewById(R.id.iv_family_add);
+                ivFamilyAdd.setImageResource(R.drawable.family_info_remove_icon);
                 llMemberFamily.addView(familyView);
+                ivFamilyAdd.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        llMemberFamily.removeView(familyView);
+                        refreshFamilyLab();
+                    }
+                });
                 tvFamilyLab.setText("家庭成员" + llMemberFamily.getChildCount());
+
             }
         });
         llMemberFamily.addView(familyView);
     }
 
+    private void refreshFamilyLab(){
+        if (llMemberFamily.getChildCount() > 0) {
+            for (int i = 0; i < llMemberFamily.getChildCount(); i++) {
+                LinearLayout viewMemberFamilyItem = (LinearLayout) llMemberFamily.getChildAt(i);
+                TextView tvFamilyLab = viewMemberFamilyItem.findViewById(R.id.tv_family_lab);
+                tvFamilyLab.setText("家庭成员" + (i+1));
+            }
+        }
+    }
 }

+ 2 - 18
app/src/main/java/com/ynstkz/shitu/android/data/RequestGroup.java

@@ -458,32 +458,16 @@ public class RequestGroup {
      residenceAddress (string, optional): 户口所在地详细地址 ,
      hobby (string, optional): 兴趣爱好
      */
-    public static void saveApplyStudentInfo(String studentName, String birthday, String sex, String ethnic, String nativePlace, String residenceProvinceId,
-                                            String residenceCityId, String residenceRegionId, String residenceType, String height, String weight,
-                                            String bloodType, String physicalExamination, String idCardNum, String livingProvinceId, String livingCityId,
-                                            String livingRegionId, String contactAddress,String zipCode, String preSchoolEducation, String hobby, Callback callback){
+    public static void saveApplyStudentInfo(String studentName, String birthday, String sex, String ethnic, String residenceProvinceId,
+                                            String residenceCityId, String residenceRegionId, Callback callback){
         Map<String, String> params = getSystemParams();
         params.put("studentName", studentName);
         params.put("birthday", birthday);
         params.put("sex", sex);
         params.put("ethnic", ethnic);
-        params.put("nativePlace", nativePlace);
         params.put("residenceProvinceId", residenceProvinceId);
         params.put("residenceCityId", residenceCityId);
         params.put("residenceRegionId", residenceRegionId);
-        params.put("residenceType", residenceType);
-        params.put("height", height);
-        params.put("weight", weight);
-        params.put("bloodType", bloodType);
-        params.put("physicalExamination", physicalExamination);
-        params.put("idCardNum", idCardNum);
-        params.put("livingProvinceId", livingProvinceId);
-        params.put("livingCityId", livingCityId);
-        params.put("livingRegionId", livingRegionId);
-        params.put("contactAddress", contactAddress);
-        params.put("zipCode", zipCode);
-        params.put("preSchoolEducation", preSchoolEducation);
-        params.put("hobby", hobby);
         OkHttpUtils.postString().url(UrlCat.URL_APPLY_STUDENT_INFO).addHeader(KEY_TOKEN,
                 SharedPreferencesUtils.getToken()).content(new Gson().toJson(params)).build().execute(callback);
     }

二进制
app/src/main/res/drawable-xxhdpi/family_info_remove_icon.png


+ 1 - 391
app/src/main/res/layout/activity_studentinfo.xml

@@ -139,36 +139,6 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:orientation="horizontal"
-
-                android:padding="@dimen/default_content_margin">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:text="籍贯"
-                    android:textColor="@color/color_666"
-                    android:textSize="@dimen/company_16sp" />
-
-                <EditText
-                    android:id="@+id/edit_native_place"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:layout_marginLeft="@dimen/student_info_leftpadding"
-                    android:background="@null"
-                    android:hint="请输入"
-                    android:textColor="@color/color_999"
-                    android:textSize="@dimen/company_16sp" />
-
-            </RelativeLayout>
-
-            <include layout="@layout/view_default_line" />
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
                 android:padding="@dimen/default_content_margin">
 
                 <TextView
@@ -222,367 +192,6 @@
 
             <include layout="@layout/view_default_line" />
 
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-
-                android:padding="@dimen/default_content_margin">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:text="户口性质"
-                    android:textColor="@color/color_666"
-                    android:textSize="@dimen/company_16sp" />
-
-                <EditText
-                    android:id="@+id/edit_residenceType"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:layout_marginLeft="@dimen/student_info_leftpadding"
-                    android:background="@null"
-                    android:hint="请输入"
-                    android:textColor="@color/color_999"
-                    android:textSize="@dimen/company_16sp" />
-
-            </RelativeLayout>
-
-            <include layout="@layout/view_default_line" />
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:padding="@dimen/default_content_margin">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:text="身高"
-                    android:textColor="@color/color_666"
-                    android:textSize="@dimen/company_16sp" />
-
-                <EditText
-                    android:id="@+id/edit_height"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:layout_marginLeft="@dimen/student_info_leftpadding"
-                    android:background="@null"
-                    android:hint="请输入"
-                    android:textColor="@color/color_999"
-                    android:textSize="@dimen/company_16sp" />
-
-            </RelativeLayout>
-
-            <include layout="@layout/view_default_line" />
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:padding="@dimen/default_content_margin">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:text="体重"
-                    android:textColor="@color/color_666"
-                    android:textSize="@dimen/company_16sp" />
-
-                <EditText
-                    android:id="@+id/edit_weight"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:layout_marginLeft="@dimen/student_info_leftpadding"
-                    android:background="@null"
-                    android:hint="请输入"
-                    android:textColor="@color/color_999"
-                    android:textSize="@dimen/company_16sp" />
-
-            </RelativeLayout>
-
-            <include layout="@layout/view_default_line" />
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:padding="@dimen/default_content_margin">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:text="血型"
-                    android:textColor="@color/color_666"
-                    android:textSize="@dimen/company_16sp" />
-
-                <EditText
-                    android:id="@+id/edit_bloodType"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:layout_marginLeft="@dimen/student_info_leftpadding"
-                    android:background="@null"
-                    android:hint="请输入"
-                    android:textColor="@color/color_999"
-                    android:textSize="@dimen/company_16sp" />
-
-            </RelativeLayout>
-
-            <include layout="@layout/view_default_line" />
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:padding="@dimen/default_content_margin">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:text="体检"
-                    android:textColor="@color/color_666"
-                    android:textSize="@dimen/company_16sp" />
-
-                <EditText
-                    android:id="@+id/edit_physicalExamination"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:layout_marginLeft="@dimen/student_info_leftpadding"
-                    android:background="@null"
-                    android:hint="请输入"
-                    android:textColor="@color/color_999"
-                    android:textSize="@dimen/company_16sp" />
-
-            </RelativeLayout>
-
-            <include layout="@layout/view_default_line" />
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:padding="@dimen/default_content_margin">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:text="身份证号"
-                    android:textColor="@color/color_666"
-                    android:textSize="@dimen/company_16sp" />
-
-                <EditText
-                    android:id="@+id/edit_idcode"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:layout_marginLeft="@dimen/student_info_leftpadding"
-                    android:background="@null"
-                    android:hint="请输入"
-                    android:textColor="@color/color_999"
-                    android:textSize="@dimen/company_16sp" />
-
-            </RelativeLayout>
-
-            <include layout="@layout/view_default_line" />
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:padding="@dimen/default_content_margin">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:text="现居住地"
-                    android:textColor="@color/color_666"
-                    android:textSize="@dimen/company_16sp" />
-
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:layout_marginLeft="@dimen/student_info_leftpadding">
-
-                    <TextView
-                        android:id="@+id/tv_livingProvinceId"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_centerVertical="true"
-                        android:drawableRight="@drawable/student_location_select"
-                        android:text="选择省"
-                        android:textColor="@color/color_999"
-                        android:textSize="@dimen/company_16sp" />
-
-                    <TextView
-                        android:id="@+id/tv_livingCityId"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_centerVertical="true"
-                        android:layout_marginLeft="@dimen/company_20dp"
-                        android:drawableRight="@drawable/student_location_select"
-                        android:text="选择市"
-                        android:textColor="@color/color_999"
-                        android:textSize="@dimen/company_16sp" />
-
-                    <TextView
-                        android:id="@+id/tv_livingRegionId"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_centerVertical="true"
-                        android:layout_marginLeft="@dimen/company_20dp"
-                        android:drawableRight="@drawable/student_location_select"
-                        android:text="选择区"
-                        android:textColor="@color/color_999"
-                        android:textSize="@dimen/company_16sp" />
-
-                </LinearLayout>
-
-            </RelativeLayout>
-
-            <EditText
-                android:id="@+id/edit_livingAddress"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
-                android:layout_marginLeft="100dp"
-                android:background="@null"
-                android:hint="请输入详情地址"
-                android:textColor="@color/color_999"
-                android:textSize="@dimen/company_16sp" />
-
-            <include layout="@layout/view_default_line" />
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:padding="@dimen/default_content_margin">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:text="通讯地址"
-                    android:textColor="@color/color_666"
-                    android:textSize="@dimen/company_16sp"
-                    android:id="@+id/textView" />
-
-                <EditText
-                    android:id="@+id/edit_contactAddress"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:layout_marginLeft="@dimen/student_info_leftpadding"
-                    android:background="@null"
-                    android:hint="请输入"
-                    android:textColor="@color/color_999"
-                    android:textSize="@dimen/company_16sp" />
-
-            </RelativeLayout>
-
-            <include layout="@layout/view_default_line" />
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:padding="@dimen/default_content_margin">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:text="邮政编码"
-                    android:textColor="@color/color_666"
-                    android:textSize="@dimen/company_16sp" />
-
-                <EditText
-                    android:id="@+id/edit_zipCode"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:layout_marginLeft="@dimen/student_info_leftpadding"
-                    android:background="@null"
-                    android:hint="请输入"
-                    android:textColor="@color/color_999"
-                    android:textSize="@dimen/company_16sp" />
-
-            </RelativeLayout>
-
-            <include layout="@layout/view_default_line" />
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:padding="@dimen/default_content_margin">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:text="学前教育"
-                    android:textColor="@color/color_666"
-                    android:textSize="@dimen/company_16sp" />
-
-                <EditText
-                    android:id="@+id/edit_preSchoolEducation"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:layout_marginLeft="@dimen/student_info_leftpadding"
-                    android:background="@null"
-                    android:hint="请输入"
-                    android:textColor="@color/color_999"
-                    android:textSize="@dimen/company_16sp" />
-
-            </RelativeLayout>
-
-            <include layout="@layout/view_default_line" />
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:padding="@dimen/default_content_margin">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:text="兴趣爱好"
-                    android:textColor="@color/color_666"
-                    android:textSize="@dimen/company_16sp" />
-
-                <EditText
-                    android:id="@+id/edit_hobby"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:layout_marginLeft="@dimen/student_info_leftpadding"
-                    android:background="@null"
-                    android:hint="请输入"
-                    android:textColor="@color/color_999"
-                    android:textSize="@dimen/company_16sp" />
-
-            </RelativeLayout>
-
-            <include layout="@layout/view_default_line" />
-
             <LinearLayout
                 android:id="@+id/ll_member_family"
                 android:layout_width="match_parent"
@@ -605,6 +214,7 @@
                 android:layout_marginLeft="@dimen/default_content_margin"
                 android:layout_marginRight="@dimen/default_content_margin"
                 android:background="@drawable/shape_default_btn_bg"
+                android:layout_marginBottom="@dimen/company_20dp"
                 android:textColor="@color/white"
                 android:textSize="@dimen/company_16sp"
                 android:text="保存"/>

+ 4 - 6
app/src/main/res/layout/item_student_family.xml

@@ -24,8 +24,7 @@
             android:layout_height="wrap_content"
             android:layout_marginLeft="@dimen/company_20dp"
             android:layout_gravity="bottom"
-            android:src="@drawable/family_info_add_icon"
-            android:visibility="gone"/>
+            android:src="@drawable/family_info_add_icon"/>
 
     </LinearLayout>
 
@@ -43,15 +42,14 @@
             android:textColor="@color/color_666"
             android:textSize="@dimen/company_16sp" />
 
-        <TextView
-            android:id="@+id/tv_sex"
+        <EditText
+            android:id="@+id/edit_relation"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_centerVertical="true"
             android:layout_marginLeft="@dimen/student_info_leftpadding"
             android:background="@null"
-            android:drawableRight="@drawable/student_location_select"
-            android:hint="父亲"
+            android:hint="请输入"
             android:textColor="@color/color_999"
             android:textSize="@dimen/company_16sp" />