Commit 2338cf4c2201089583845c1e28585c98250c84f1
1 parent
3cc452267b
Exists in
master
子账户管理界面处理和接口编写
Showing
13 changed files
with
664 additions
and
67 deletions
Show diff stats
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/AccountManagementActivity.java
| ... | ... | @@ -3,12 +3,23 @@ package com.hjx.personalcenter.activity; |
| 3 | 3 | import android.app.Activity; |
| 4 | 4 | import android.content.Intent; |
| 5 | 5 | import android.os.Bundle; |
| 6 | +import android.os.Handler; | |
| 7 | +import android.os.Message; | |
| 8 | +import android.support.v7.widget.LinearLayoutManager; | |
| 9 | +import android.support.v7.widget.RecyclerView; | |
| 6 | 10 | import android.view.View; |
| 7 | 11 | import android.widget.TextView; |
| 8 | 12 | |
| 9 | 13 | import com.hjx.personalcenter.R; |
| 14 | +import com.hjx.personalcenter.adapter.AccountChildsAdapter; | |
| 10 | 15 | import com.hjx.personalcenter.db.Content; |
| 11 | 16 | import com.hjx.personalcenter.db.SaveParam; |
| 17 | +import com.hjx.personalcenter.http.HttpCode; | |
| 18 | +import com.hjx.personalcenter.http.HttpManager; | |
| 19 | +import com.hjx.personalcenter.model.ChildsInfo; | |
| 20 | + | |
| 21 | +import java.util.ArrayList; | |
| 22 | +import java.util.List; | |
| 12 | 23 | |
| 13 | 24 | /**账户管理 熊巍 |
| 14 | 25 | * Created by h on 2017/8/12. |
| ... | ... | @@ -16,10 +27,27 @@ import com.hjx.personalcenter.db.SaveParam; |
| 16 | 27 | |
| 17 | 28 | public class AccountManagementActivity extends Activity implements View.OnClickListener { |
| 18 | 29 | private TextView changbangding,changpassword,usernames; |
| 30 | + private RecyclerView listview; | |
| 31 | + private AccountChildsAdapter childsAdapter; | |
| 32 | + private ArrayList<ChildsInfo.DataBean> data = new ArrayList<>(); | |
| 33 | + Handler handler = new Handler(){ | |
| 34 | + @Override | |
| 35 | + public void handleMessage(Message msg) { | |
| 36 | + super.handleMessage(msg); | |
| 37 | + switch (msg.what){ | |
| 38 | + case HttpCode.CHILDS_SUCESS: | |
| 39 | + data.clear(); | |
| 40 | + data.addAll( (List<ChildsInfo.DataBean>)msg.obj); | |
| 41 | + childsAdapter.notifyDataSetChanged(); | |
| 42 | + break; | |
| 43 | + } | |
| 44 | + } | |
| 45 | + }; | |
| 19 | 46 | @Override |
| 20 | 47 | protected void onCreate(Bundle savedInstanceState) { |
| 21 | 48 | super.onCreate(savedInstanceState); |
| 22 | 49 | setContentView(R.layout.activity_account_management); |
| 50 | + HttpManager.getInstance().getchildAccountinfo(this,600,handler); | |
| 23 | 51 | initView(); |
| 24 | 52 | initData(); |
| 25 | 53 | initLister(); |
| ... | ... | @@ -29,11 +57,17 @@ public class AccountManagementActivity extends Activity implements View.OnClickL |
| 29 | 57 | changbangding = (TextView) findViewById(R.id.changBangding); |
| 30 | 58 | changpassword = (TextView) findViewById(R.id.changpassword); |
| 31 | 59 | usernames = (TextView) findViewById(R.id.cunt_username); |
| 60 | + listview = (RecyclerView) findViewById(R.id.id_recyclerview_horizontal); | |
| 32 | 61 | } |
| 33 | 62 | |
| 34 | 63 | private void initData() { |
| 35 | 64 | String cunt_username = SaveParam.getInstance().getLoginParam(this,"cunt_username"); |
| 36 | 65 | usernames.setText(cunt_username); |
| 66 | + LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this); | |
| 67 | + linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL); | |
| 68 | + listview.setLayoutManager(linearLayoutManager); | |
| 69 | + childsAdapter = new AccountChildsAdapter(data,this); | |
| 70 | + listview.setAdapter(childsAdapter); | |
| 37 | 71 | |
| 38 | 72 | } |
| 39 | 73 | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/adapter/AccountChildsAdapter.java
| ... | ... | @@ -0,0 +1,88 @@ |
| 1 | +package com.hjx.personalcenter.adapter; | |
| 2 | + | |
| 3 | +import android.content.Context; | |
| 4 | +import android.support.v7.widget.RecyclerView; | |
| 5 | +import android.view.LayoutInflater; | |
| 6 | +import android.view.View; | |
| 7 | +import android.view.ViewGroup; | |
| 8 | +import android.widget.ImageView; | |
| 9 | +import android.widget.TextView; | |
| 10 | + | |
| 11 | +import com.hjx.personalcenter.R; | |
| 12 | +import com.hjx.personalcenter.model.ChildsInfo; | |
| 13 | + | |
| 14 | +import java.util.ArrayList; | |
| 15 | +import java.util.List; | |
| 16 | + | |
| 17 | +/** | |
| 18 | + * Created by h on 2017/8/26. | |
| 19 | + */ | |
| 20 | + | |
| 21 | +public class AccountChildsAdapter extends RecyclerView.Adapter<AccountChildsAdapter.AccountChildsHolder> { | |
| 22 | + private List<ChildsInfo.DataBean> specailList; | |
| 23 | + private LayoutInflater mInflater; | |
| 24 | + private Context mContext ; | |
| 25 | + | |
| 26 | + public AccountChildsAdapter(ArrayList<ChildsInfo.DataBean> specailList,Context context) { | |
| 27 | + this.mContext = context; | |
| 28 | + this.specailList = specailList; | |
| 29 | + mInflater = LayoutInflater.from(context); | |
| 30 | + } | |
| 31 | + | |
| 32 | + public OnItemClickListener mOnItemClickListener; | |
| 33 | + | |
| 34 | + public interface OnItemClickListener { | |
| 35 | + void onItemClick(View view, int position); | |
| 36 | + } | |
| 37 | + | |
| 38 | + public void setOnItemClickListener(OnItemClickListener mOnItemClickLitener) { | |
| 39 | + this.mOnItemClickListener = mOnItemClickLitener; | |
| 40 | + } | |
| 41 | + | |
| 42 | + public void setList(List<ChildsInfo.DataBean> list) { | |
| 43 | + this.specailList = list; | |
| 44 | + notifyDataSetChanged(); | |
| 45 | + } | |
| 46 | + | |
| 47 | + @Override | |
| 48 | + public AccountChildsHolder onCreateViewHolder(ViewGroup parent, int viewType) { | |
| 49 | + View view = mInflater.inflate(R.layout.recycler_childaccunt_item_view, parent, false); | |
| 50 | + | |
| 51 | + AccountChildsHolder holder = new AccountChildsHolder(view); | |
| 52 | + return holder; | |
| 53 | + } | |
| 54 | + | |
| 55 | + @Override | |
| 56 | + public void onBindViewHolder(AccountChildsHolder holder, int position) { | |
| 57 | + ChildsInfo.DataBean bean = specailList.get(position); | |
| 58 | + if (bean != null) { | |
| 59 | + holder.iv_child_head.setImageResource(R.mipmap.header_default); | |
| 60 | + holder.iv_child_name.setText(bean.getName()); | |
| 61 | + holder.iv_child_grade.setText(bean.getGrade()); | |
| 62 | + holder.iv_child_school.setText(bean.getSchool()); | |
| 63 | + holder.iv_child_adress.setText(bean.getRegion()); | |
| 64 | + | |
| 65 | + } | |
| 66 | + | |
| 67 | + | |
| 68 | + } | |
| 69 | + | |
| 70 | + @Override | |
| 71 | + public int getItemCount() { | |
| 72 | + return specailList.size(); | |
| 73 | + } | |
| 74 | + | |
| 75 | + class AccountChildsHolder extends RecyclerView.ViewHolder { | |
| 76 | + ImageView iv_child_head; | |
| 77 | + TextView iv_child_name, iv_child_grade, iv_child_school, iv_child_adress; | |
| 78 | + public AccountChildsHolder(View itemView) { | |
| 79 | + super(itemView); | |
| 80 | + iv_child_head = (ImageView) itemView.findViewById(R.id.iv_child_head); | |
| 81 | + iv_child_name = (TextView) itemView.findViewById(R.id.iv_child_name); | |
| 82 | + iv_child_grade = (TextView) itemView.findViewById(R.id.iv_child_grade); | |
| 83 | + iv_child_school = (TextView) itemView.findViewById(R.id.iv_child_school); | |
| 84 | + iv_child_adress = (TextView) itemView.findViewById(R.id.iv_child_adress); | |
| 85 | + | |
| 86 | + } | |
| 87 | + } | |
| 88 | +} | |
| 0 | 89 | \ No newline at end of file | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/adapter/RecyclerViewAdapter.java
| ... | ... | @@ -33,7 +33,7 @@ public class RecyclerViewAdapter extends RecyclerView.Adapter<RecyclerViewAdapte |
| 33 | 33 | |
| 34 | 34 | @Override |
| 35 | 35 | public RecyclerHolder onCreateViewHolder(ViewGroup parent, int viewType) { |
| 36 | - View view = LayoutInflater.from(mContext).inflate(R.layout.recycler_item_view, parent, false); | |
| 36 | + View view = LayoutInflater.from(mContext).inflate(R.layout.recycler_study_tem_view, parent, false); | |
| 37 | 37 | RecyclerHolder holder = new RecyclerHolder(view); |
| 38 | 38 | return holder; |
| 39 | 39 | } | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/http/HttpCode.java
PersonalCenter/app/src/main/java/com/hjx/personalcenter/http/HttpManager.java
| ... | ... | @@ -21,6 +21,7 @@ import com.hjx.personalcenter.activity.TheStartPageActivity; |
| 21 | 21 | import com.hjx.personalcenter.db.SaveParam; |
| 22 | 22 | import com.hjx.personalcenter.gson.GsonTool; |
| 23 | 23 | import com.hjx.personalcenter.model.CardInfo; |
| 24 | +import com.hjx.personalcenter.model.ChildsInfo; | |
| 24 | 25 | import com.hjx.personalcenter.model.CityInfo; |
| 25 | 26 | import com.hjx.personalcenter.model.CountyInfo; |
| 26 | 27 | import com.hjx.personalcenter.model.GradeInfo; |
| ... | ... | @@ -1035,6 +1036,60 @@ public class HttpManager { |
| 1035 | 1036 | }); |
| 1036 | 1037 | } |
| 1037 | 1038 | |
| 1039 | + /** | |
| 1040 | + * 查询子账户信息 | |
| 1041 | + * @param mContext | |
| 1042 | + * @param userId | |
| 1043 | + * @param handler | |
| 1044 | + */ | |
| 1045 | + public void getchildAccountinfo(final Context mContext, long userId , final Handler handler) { | |
| 1046 | + mProgress = DialogPermission.showProgress(mContext, null, "正在获取信息...", | |
| 1047 | + false, true, null); | |
| 1048 | + HttpClient.getInstance().setTimeout(5 * 1000); | |
| 1049 | + HttpClient.getInstance().addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"); | |
| 1050 | + HttpClient.getInstance().get(HttpUrl.childUserURL+ "?userId=" + userId , new AsyncHttpResponseHandler() { | |
| 1051 | + @Override | |
| 1052 | + public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { | |
| 1053 | + closeProgress(); | |
| 1054 | + Log.e("test", "子账户信息" + new String(arg2)); | |
| 1055 | + ChildsInfo childsInfo = GsonTool.getPerson(new String(arg2), ChildsInfo.class);//解析json数据 | |
| 1056 | + List<ChildsInfo.DataBean> schoolInfoBeanList = childsInfo.getData(); | |
| 1057 | + Message msg = Message.obtain(); | |
| 1058 | + msg.what = HttpCode.CHILDS_SUCESS; | |
| 1059 | + msg.obj = schoolInfoBeanList; | |
| 1060 | + handler.sendMessage(msg); | |
| 1061 | + } | |
| 1062 | + | |
| 1063 | + @Override | |
| 1064 | + public void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) { | |
| 1065 | + closeProgress(); | |
| 1066 | + Log.e("test", "错误信息" + new String(arg2)); | |
| 1067 | + new CircleDialog.Builder((FragmentActivity) mContext) | |
| 1068 | + .setCanceledOnTouchOutside(false) | |
| 1069 | + .setCancelable(false) | |
| 1070 | + .setWidth(0.5f) | |
| 1071 | + .configText(new ConfigText() { | |
| 1072 | + @Override | |
| 1073 | + public void onConfig(TextParams params) { | |
| 1074 | + params.gravity = Gravity.CENTER; | |
| 1075 | + params.padding = new int[]{50, 50, 50, 50}; | |
| 1076 | + } | |
| 1077 | + }) | |
| 1078 | + .setText("当前无网络,请检查网络设置") | |
| 1079 | + .setNegative("继续使用", null) | |
| 1080 | + .setPositive("设置网络", new View.OnClickListener() { | |
| 1081 | + @Override | |
| 1082 | + public void onClick(View v) { | |
| 1083 | + Intent intent = new Intent(Settings.ACTION_SETTINGS);//系统设置界面 | |
| 1084 | + mContext.startActivity(intent); | |
| 1085 | + } | |
| 1086 | + }) | |
| 1087 | + .show(); | |
| 1088 | + } | |
| 1089 | + }); | |
| 1090 | + | |
| 1091 | + } | |
| 1092 | + | |
| 1038 | 1093 | |
| 1039 | 1094 | |
| 1040 | 1095 | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/http/HttpUrl.java
| ... | ... | @@ -31,6 +31,8 @@ public class HttpUrl { |
| 31 | 31 | public static String signature=GetDomain()+"/signature/addOrUpdateSignature";//修改个性签名 |
| 32 | 32 | public static String getsignature=GetDomain()+"/signature/info";//获取个性签名 |
| 33 | 33 | public static String feedbackURL=GetDomain()+"/feedback/add";//用户反馈 |
| 34 | + public static String childUserURL=GetDomain()+"/childUser/info";//用户反馈 | |
| 35 | + | |
| 34 | 36 | |
| 35 | 37 | |
| 36 | 38 | ... | ... |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/model/ChildsInfo.java
| ... | ... | @@ -0,0 +1,151 @@ |
| 1 | +package com.hjx.personalcenter.model; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | +import java.util.List; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * Created by h on 2017/8/26. | |
| 8 | + */ | |
| 9 | + | |
| 10 | +public class ChildsInfo implements Serializable { | |
| 11 | + | |
| 12 | + /** | |
| 13 | + * status : 1 | |
| 14 | + * pageSize : 1 | |
| 15 | + * data : [{"region":"郑州","parentId":600,"school":"郑州小学","status":"未使用","name":"李四","grade":"初一","image":"http://hjxprodbucket.oss.aliyuncs.com/aaaaa.jpg","subAccountId":2}] | |
| 16 | + * msg : success | |
| 17 | + * pageNum : 1 | |
| 18 | + */ | |
| 19 | + | |
| 20 | + private int status; | |
| 21 | + private int pageSize; | |
| 22 | + private String msg; | |
| 23 | + private int pageNum; | |
| 24 | + private List<DataBean> data; | |
| 25 | + | |
| 26 | + public int getStatus() { | |
| 27 | + return status; | |
| 28 | + } | |
| 29 | + | |
| 30 | + public void setStatus(int status) { | |
| 31 | + this.status = status; | |
| 32 | + } | |
| 33 | + | |
| 34 | + public int getPageSize() { | |
| 35 | + return pageSize; | |
| 36 | + } | |
| 37 | + | |
| 38 | + public void setPageSize(int pageSize) { | |
| 39 | + this.pageSize = pageSize; | |
| 40 | + } | |
| 41 | + | |
| 42 | + public String getMsg() { | |
| 43 | + return msg; | |
| 44 | + } | |
| 45 | + | |
| 46 | + public void setMsg(String msg) { | |
| 47 | + this.msg = msg; | |
| 48 | + } | |
| 49 | + | |
| 50 | + public int getPageNum() { | |
| 51 | + return pageNum; | |
| 52 | + } | |
| 53 | + | |
| 54 | + public void setPageNum(int pageNum) { | |
| 55 | + this.pageNum = pageNum; | |
| 56 | + } | |
| 57 | + | |
| 58 | + public List<DataBean> getData() { | |
| 59 | + return data; | |
| 60 | + } | |
| 61 | + | |
| 62 | + public void setData(List<DataBean> data) { | |
| 63 | + this.data = data; | |
| 64 | + } | |
| 65 | + | |
| 66 | + public static class DataBean { | |
| 67 | + /** | |
| 68 | + * region : 郑州 | |
| 69 | + * parentId : 600 | |
| 70 | + * school : 郑州小学 | |
| 71 | + * status : 未使用 | |
| 72 | + * name : 李四 | |
| 73 | + * grade : 初一 | |
| 74 | + * image : http://hjxprodbucket.oss.aliyuncs.com/aaaaa.jpg | |
| 75 | + * subAccountId : 2 | |
| 76 | + */ | |
| 77 | + | |
| 78 | + private String region; | |
| 79 | + private int parentId; | |
| 80 | + private String school; | |
| 81 | + private String status; | |
| 82 | + private String name; | |
| 83 | + private String grade; | |
| 84 | + private String image; | |
| 85 | + private int subAccountId; | |
| 86 | + | |
| 87 | + public String getRegion() { | |
| 88 | + return region; | |
| 89 | + } | |
| 90 | + | |
| 91 | + public void setRegion(String region) { | |
| 92 | + this.region = region; | |
| 93 | + } | |
| 94 | + | |
| 95 | + public int getParentId() { | |
| 96 | + return parentId; | |
| 97 | + } | |
| 98 | + | |
| 99 | + public void setParentId(int parentId) { | |
| 100 | + this.parentId = parentId; | |
| 101 | + } | |
| 102 | + | |
| 103 | + public String getSchool() { | |
| 104 | + return school; | |
| 105 | + } | |
| 106 | + | |
| 107 | + public void setSchool(String school) { | |
| 108 | + this.school = school; | |
| 109 | + } | |
| 110 | + | |
| 111 | + public String getStatus() { | |
| 112 | + return status; | |
| 113 | + } | |
| 114 | + | |
| 115 | + public void setStatus(String status) { | |
| 116 | + this.status = status; | |
| 117 | + } | |
| 118 | + | |
| 119 | + public String getName() { | |
| 120 | + return name; | |
| 121 | + } | |
| 122 | + | |
| 123 | + public void setName(String name) { | |
| 124 | + this.name = name; | |
| 125 | + } | |
| 126 | + | |
| 127 | + public String getGrade() { | |
| 128 | + return grade; | |
| 129 | + } | |
| 130 | + | |
| 131 | + public void setGrade(String grade) { | |
| 132 | + this.grade = grade; | |
| 133 | + } | |
| 134 | + | |
| 135 | + public String getImage() { | |
| 136 | + return image; | |
| 137 | + } | |
| 138 | + | |
| 139 | + public void setImage(String image) { | |
| 140 | + this.image = image; | |
| 141 | + } | |
| 142 | + | |
| 143 | + public int getSubAccountId() { | |
| 144 | + return subAccountId; | |
| 145 | + } | |
| 146 | + | |
| 147 | + public void setSubAccountId(int subAccountId) { | |
| 148 | + this.subAccountId = subAccountId; | |
| 149 | + } | |
| 150 | + } | |
| 151 | +} | ... | ... |
PersonalCenter/app/src/main/res/layout/activity_account_management.xml
| 1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | - android:orientation="vertical" | |
| 4 | 3 | android:layout_width="match_parent" |
| 5 | - android:layout_height="match_parent"> | |
| 4 | + android:layout_height="match_parent" | |
| 5 | + android:orientation="vertical"> | |
| 6 | + | |
| 6 | 7 | <RelativeLayout |
| 7 | 8 | android:id="@+id/title" |
| 8 | 9 | android:layout_width="match_parent" |
| 9 | 10 | android:layout_height="wrap_content" |
| 10 | 11 | android:background="@color/login_text_blue" |
| 11 | - android:minHeight="50dp" > | |
| 12 | + android:minHeight="50dp"> | |
| 12 | 13 | |
| 13 | 14 | <ImageView |
| 14 | 15 | android:id="@+id/cancel" |
| ... | ... | @@ -28,32 +29,36 @@ |
| 28 | 29 | android:textColor="@android:color/white" |
| 29 | 30 | android:textSize="22sp" /> |
| 30 | 31 | </RelativeLayout> |
| 32 | + | |
| 31 | 33 | <LinearLayout |
| 32 | 34 | android:layout_width="wrap_content" |
| 33 | 35 | android:layout_height="wrap_content" |
| 34 | - android:orientation="horizontal" | |
| 35 | 36 | android:layout_margin="20dp" |
| 36 | - android:gravity="center_vertical"> | |
| 37 | + android:gravity="center_vertical" | |
| 38 | + android:orientation="horizontal"> | |
| 39 | + | |
| 37 | 40 | <View |
| 38 | 41 | android:layout_width="5dp" |
| 39 | 42 | android:layout_height="20dp" |
| 40 | 43 | android:background="@color/login_text_blue"> |
| 41 | 44 | |
| 42 | 45 | </View> |
| 46 | + | |
| 43 | 47 | <TextView |
| 44 | 48 | android:layout_width="wrap_content" |
| 45 | 49 | android:layout_height="wrap_content" |
| 46 | - android:text="账户安全" | |
| 47 | 50 | android:layout_marginLeft="5dp" |
| 48 | - android:textSize="22sp" | |
| 49 | - /> | |
| 51 | + android:text="账户安全" | |
| 52 | + android:textSize="22sp" /> | |
| 50 | 53 | |
| 51 | 54 | </LinearLayout> |
| 55 | + | |
| 52 | 56 | <LinearLayout |
| 53 | 57 | android:layout_width="match_parent" |
| 54 | 58 | android:layout_height="wrap_content" |
| 55 | 59 | android:layout_marginLeft="60dp" |
| 56 | 60 | android:orientation="vertical"> |
| 61 | + | |
| 57 | 62 | <LinearLayout |
| 58 | 63 | android:layout_width="match_parent" |
| 59 | 64 | android:layout_height="wrap_content"> |
| ... | ... | @@ -63,101 +68,261 @@ |
| 63 | 68 | android:layout_width="0dp" |
| 64 | 69 | android:layout_height="wrap_content" |
| 65 | 70 | android:layout_weight="1.5" |
| 66 | - android:textSize="22sp" | |
| 67 | - android:text="当前绑定手机号"/> | |
| 71 | + android:text="当前绑定手机号" | |
| 72 | + android:textSize="22sp" /> | |
| 73 | + | |
| 68 | 74 | <TextView |
| 69 | 75 | android:id="@+id/cunt_username" |
| 70 | 76 | android:layout_width="0dp" |
| 71 | 77 | android:layout_height="wrap_content" |
| 72 | 78 | android:layout_marginLeft="50dp" |
| 73 | 79 | android:layout_weight="6" |
| 74 | - android:textSize="22sp" | |
| 75 | - android:text=""/> | |
| 80 | + android:text="" | |
| 81 | + android:textSize="22sp" /> | |
| 82 | + | |
| 76 | 83 | <TextView |
| 77 | 84 | android:id="@+id/changBangding" |
| 78 | 85 | android:layout_width="0dp" |
| 79 | 86 | android:layout_height="wrap_content" |
| 80 | 87 | android:layout_weight="1" |
| 81 | - android:textSize="22sp" | |
| 82 | - android:text="更换绑定"/> | |
| 88 | + android:text="更换绑定" | |
| 89 | + android:textSize="22sp" /> | |
| 90 | + | |
| 83 | 91 | <ImageView |
| 84 | 92 | android:layout_width="wrap_content" |
| 85 | 93 | android:layout_height="wrap_content" |
| 86 | 94 | android:layout_weight="0.1" |
| 87 | 95 | android:padding="10dp" |
| 88 | - android:src="@mipmap/youjiantou"/> | |
| 96 | + android:src="@mipmap/youjiantou" /> | |
| 89 | 97 | </LinearLayout> |
| 98 | + | |
| 90 | 99 | <LinearLayout |
| 91 | 100 | android:layout_width="match_parent" |
| 92 | - android:layout_marginTop="30dp" | |
| 93 | - android:layout_height="wrap_content"> | |
| 101 | + android:layout_height="wrap_content" | |
| 102 | + android:layout_marginTop="30dp"> | |
| 94 | 103 | |
| 95 | 104 | |
| 96 | 105 | <TextView |
| 97 | 106 | android:layout_width="0dp" |
| 98 | 107 | android:layout_height="wrap_content" |
| 99 | 108 | android:layout_weight="1.5" |
| 100 | - android:textSize="22sp" | |
| 101 | - android:text="登录密码"/> | |
| 109 | + android:text="登录密码" | |
| 110 | + android:textSize="22sp" /> | |
| 111 | + | |
| 102 | 112 | <TextView |
| 103 | 113 | android:layout_width="0dp" |
| 104 | 114 | android:layout_height="wrap_content" |
| 105 | 115 | android:layout_marginLeft="50dp" |
| 106 | 116 | android:layout_weight="6" |
| 107 | - android:textSize="22sp" | |
| 108 | - android:text="已设置"/> | |
| 117 | + android:text="已设置" | |
| 118 | + android:textSize="22sp" /> | |
| 119 | + | |
| 109 | 120 | <TextView |
| 110 | 121 | android:id="@+id/changpassword" |
| 111 | 122 | android:layout_width="0dp" |
| 112 | 123 | android:layout_height="wrap_content" |
| 113 | 124 | android:layout_weight="1" |
| 114 | - android:textSize="22sp" | |
| 115 | - android:text="修改密码"/> | |
| 125 | + android:text="修改密码" | |
| 126 | + android:textSize="22sp" /> | |
| 127 | + | |
| 116 | 128 | <ImageView |
| 117 | 129 | android:layout_width="wrap_content" |
| 118 | 130 | android:layout_height="wrap_content" |
| 119 | 131 | android:layout_weight="0.1" |
| 120 | 132 | android:padding="10dp" |
| 121 | - android:src="@mipmap/youjiantou"/> | |
| 133 | + android:src="@mipmap/youjiantou" /> | |
| 122 | 134 | </LinearLayout> |
| 123 | - | |
| 135 | + | |
| 124 | 136 | </LinearLayout> |
| 125 | 137 | |
| 126 | 138 | <View |
| 127 | 139 | android:layout_width="match_parent" |
| 128 | - android:layout_margin="20dp" | |
| 129 | 140 | android:layout_height="0.7dp" |
| 141 | + android:layout_margin="20dp" | |
| 130 | 142 | android:background="#FF909090" /> |
| 143 | + | |
| 131 | 144 | <LinearLayout |
| 132 | 145 | android:layout_width="wrap_content" |
| 133 | 146 | android:layout_height="wrap_content" |
| 134 | - android:orientation="horizontal" | |
| 135 | 147 | android:layout_margin="20dp" |
| 136 | - android:gravity="center_vertical"> | |
| 148 | + android:gravity="center_vertical" | |
| 149 | + android:orientation="horizontal"> | |
| 150 | + | |
| 137 | 151 | <View |
| 138 | 152 | android:layout_width="5dp" |
| 139 | 153 | android:layout_height="20dp" |
| 140 | 154 | android:background="@color/login_text_blue"> |
| 141 | 155 | |
| 142 | 156 | </View> |
| 157 | + | |
| 143 | 158 | <TextView |
| 144 | 159 | android:layout_width="wrap_content" |
| 145 | 160 | android:layout_height="wrap_content" |
| 146 | - android:text="子账户管理" | |
| 147 | 161 | android:layout_marginLeft="5dp" |
| 148 | - android:textSize="22sp" | |
| 149 | - /> | |
| 162 | + android:text="子账户管理" | |
| 163 | + android:textSize="22sp" /> | |
| 150 | 164 | |
| 151 | 165 | </LinearLayout> |
| 152 | - <GridView | |
| 153 | - android:id="@+id/gv_accunt" | |
| 166 | + | |
| 167 | + <LinearLayout | |
| 154 | 168 | android:layout_width="match_parent" |
| 155 | - android:layout_height="wrap_content" | |
| 156 | - android:numColumns="3"> | |
| 169 | + android:layout_height="match_parent" | |
| 170 | + android:layout_marginLeft="30dp" | |
| 171 | + android:orientation="vertical"> | |
| 172 | + | |
| 173 | + <LinearLayout | |
| 174 | + android:layout_width="match_parent" | |
| 175 | + android:layout_height="wrap_content"> | |
| 176 | + | |
| 177 | + <LinearLayout | |
| 178 | + android:layout_width="0dp" | |
| 179 | + android:layout_height="wrap_content" | |
| 180 | + android:layout_weight="1"> | |
| 181 | + | |
| 182 | + <LinearLayout | |
| 183 | + android:layout_width="wrap_content" | |
| 184 | + android:layout_height="wrap_content" | |
| 185 | + android:background="@drawable/corcle_blue_bg" | |
| 186 | + android:orientation="vertical"> | |
| 187 | + | |
| 188 | + <LinearLayout | |
| 189 | + android:layout_width="match_parent" | |
| 190 | + android:layout_height="wrap_content" | |
| 191 | + android:orientation="horizontal"> | |
| 192 | + | |
| 193 | + <ImageView | |
| 194 | + android:layout_width="wrap_content" | |
| 195 | + android:layout_height="wrap_content" | |
| 196 | + android:layout_margin="10dp" | |
| 197 | + android:src="@mipmap/header_default" /> | |
| 157 | 198 | |
| 158 | - </GridView> | |
| 199 | + <LinearLayout | |
| 200 | + android:layout_width="0dp" | |
| 201 | + android:layout_height="wrap_content" | |
| 202 | + android:layout_marginLeft="10dp" | |
| 203 | + android:layout_marginTop="10dp" | |
| 204 | + android:layout_weight="1" | |
| 205 | + android:orientation="vertical"> | |
| 159 | 206 | |
| 207 | + <TextView | |
| 208 | + android:layout_width="wrap_content" | |
| 209 | + android:layout_height="wrap_content" | |
| 210 | + android:text="删除用户" | |
| 211 | + android:textSize="18sp" /> | |
| 160 | 212 | |
| 213 | + <TextView | |
| 214 | + android:layout_width="wrap_content" | |
| 215 | + android:layout_height="wrap_content" | |
| 216 | + android:text="使用中" | |
| 217 | + android:textSize="18sp" /> | |
| 218 | + | |
| 219 | + <TextView | |
| 220 | + android:layout_width="wrap_content" | |
| 221 | + android:layout_height="wrap_content" | |
| 222 | + android:text="删除用户" | |
| 223 | + android:textSize="18sp" /> | |
| 224 | + | |
| 225 | + <TextView | |
| 226 | + android:layout_width="wrap_content" | |
| 227 | + android:layout_height="wrap_content" | |
| 228 | + android:text="使用中" | |
| 229 | + android:textSize="18sp" /> | |
| 230 | + | |
| 231 | + | |
| 232 | + </LinearLayout> | |
| 233 | + | |
| 234 | + <ImageView | |
| 235 | + android:layout_width="wrap_content" | |
| 236 | + android:layout_height="wrap_content" | |
| 237 | + android:layout_gravity="right" | |
| 238 | + android:layout_marginLeft="60dp" | |
| 239 | + android:src="@mipmap/shiyongzhong" /> | |
| 240 | + | |
| 241 | + </LinearLayout> | |
| 242 | + | |
| 243 | + <View | |
| 244 | + android:layout_width="match_parent" | |
| 245 | + android:layout_height="0.7dp" | |
| 246 | + android:layout_margin="10dp" | |
| 247 | + android:background="@color/cutoff_line"> | |
| 248 | + | |
| 249 | + </View> | |
| 250 | + | |
| 251 | + <LinearLayout | |
| 252 | + android:layout_width="match_parent" | |
| 253 | + android:layout_height="wrap_content" | |
| 254 | + android:layout_marginBottom="10dp" | |
| 255 | + android:orientation="horizontal"> | |
| 256 | + | |
| 257 | + <TextView | |
| 258 | + android:layout_width="0dp" | |
| 259 | + android:layout_height="wrap_content" | |
| 260 | + android:layout_weight="1" | |
| 261 | + android:gravity="center" | |
| 262 | + android:text="删除用户" | |
| 263 | + android:textSize="18sp" /> | |
| 264 | + | |
| 265 | + <TextView | |
| 266 | + android:layout_width="0dp" | |
| 267 | + android:layout_height="wrap_content" | |
| 268 | + android:layout_weight="1" | |
| 269 | + android:gravity="center" | |
| 270 | + android:text="使用中" | |
| 271 | + android:textSize="18sp" /> | |
| 272 | + | |
| 273 | + | |
| 274 | + </LinearLayout> | |
| 275 | + | |
| 276 | + </LinearLayout> | |
| 277 | + | |
| 278 | + | |
| 279 | + </LinearLayout> | |
| 280 | + | |
| 281 | + <LinearLayout | |
| 282 | + android:layout_width="0dp" | |
| 283 | + android:layout_height="wrap_content" | |
| 284 | + android:layout_weight="1"> | |
| 285 | + | |
| 286 | + </LinearLayout> | |
| 287 | + | |
| 288 | + <LinearLayout | |
| 289 | + android:layout_width="0dp" | |
| 290 | + android:layout_height="wrap_content" | |
| 291 | + android:layout_weight="1"> | |
| 292 | + | |
| 293 | + </LinearLayout> | |
| 294 | + </LinearLayout> | |
| 295 | + | |
| 296 | + <LinearLayout | |
| 297 | + android:layout_width="match_parent" | |
| 298 | + android:layout_height="wrap_content" | |
| 299 | + android:orientation="horizontal"> | |
| 300 | + <android.support.v7.widget.RecyclerView | |
| 301 | + android:id="@+id/id_recyclerview_horizontal" | |
| 302 | + android:layout_width="wrap_content" | |
| 303 | + android:layout_height="wrap_content" | |
| 304 | + android:layout_centerVertical="true" | |
| 305 | + android:scrollbars="none" | |
| 306 | + > | |
| 307 | + </android.support.v7.widget.RecyclerView> | |
| 308 | + <LinearLayout | |
| 309 | + android:layout_width="wrap_content" | |
| 310 | + android:layout_height="wrap_content" | |
| 311 | + android:background="@drawable/corcle_blue_bg" | |
| 312 | + android:gravity="center"> | |
| 313 | + <ImageView | |
| 314 | + android:layout_width="wrap_content" | |
| 315 | + android:layout_height="wrap_content" | |
| 316 | + android:src="@mipmap/jia"/> | |
| 317 | + | |
| 318 | + </LinearLayout> | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + </LinearLayout> | |
| 324 | + | |
| 325 | + </LinearLayout> | |
| 161 | 326 | |
| 162 | 327 | |
| 163 | 328 | </LinearLayout> |
| 164 | 329 | \ No newline at end of file | ... | ... |
PersonalCenter/app/src/main/res/layout/recycler_childaccunt_item_view.xml
| ... | ... | @@ -0,0 +1,100 @@ |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:orientation="vertical" android:layout_width="match_parent" | |
| 4 | + android:layout_height="match_parent"> | |
| 5 | + <LinearLayout | |
| 6 | + android:layout_width="wrap_content" | |
| 7 | + android:layout_height="wrap_content" | |
| 8 | + android:background="@drawable/corcle_black_bg" | |
| 9 | + android:orientation="vertical"> | |
| 10 | + | |
| 11 | + <LinearLayout | |
| 12 | + android:layout_width="match_parent" | |
| 13 | + android:layout_height="wrap_content" | |
| 14 | + android:orientation="horizontal"> | |
| 15 | + | |
| 16 | + <ImageView | |
| 17 | + android:id="@+id/iv_child_head" | |
| 18 | + android:layout_width="wrap_content" | |
| 19 | + android:layout_height="wrap_content" | |
| 20 | + android:layout_margin="10dp" | |
| 21 | + android:src="@mipmap/header_default" /> | |
| 22 | + | |
| 23 | + <LinearLayout | |
| 24 | + android:layout_width="0dp" | |
| 25 | + android:layout_height="wrap_content" | |
| 26 | + android:layout_marginLeft="10dp" | |
| 27 | + android:layout_marginTop="10dp" | |
| 28 | + android:layout_weight="1" | |
| 29 | + android:orientation="vertical"> | |
| 30 | + | |
| 31 | + <TextView | |
| 32 | + android:id="@+id/iv_child_name" | |
| 33 | + android:layout_width="wrap_content" | |
| 34 | + android:layout_height="wrap_content" | |
| 35 | + android:text="删除用户" | |
| 36 | + android:textSize="18sp" /> | |
| 37 | + | |
| 38 | + <TextView | |
| 39 | + android:id="@+id/iv_child_grade" | |
| 40 | + android:layout_width="wrap_content" | |
| 41 | + android:layout_height="wrap_content" | |
| 42 | + android:text="使用中" | |
| 43 | + android:textSize="18sp" /> | |
| 44 | + | |
| 45 | + <TextView | |
| 46 | + android:id="@+id/iv_child_school" | |
| 47 | + android:layout_width="wrap_content" | |
| 48 | + android:layout_height="wrap_content" | |
| 49 | + android:text="删除用户" | |
| 50 | + android:textSize="18sp" /> | |
| 51 | + | |
| 52 | + <TextView | |
| 53 | + android:id="@+id/iv_child_adress" | |
| 54 | + android:layout_width="wrap_content" | |
| 55 | + android:layout_height="wrap_content" | |
| 56 | + android:text="使用中" | |
| 57 | + android:textSize="18sp" /> | |
| 58 | + | |
| 59 | + | |
| 60 | + </LinearLayout> | |
| 61 | + | |
| 62 | + | |
| 63 | + </LinearLayout> | |
| 64 | + | |
| 65 | + <View | |
| 66 | + android:layout_width="match_parent" | |
| 67 | + android:layout_height="0.7dp" | |
| 68 | + android:layout_margin="10dp" | |
| 69 | + android:background="@color/cutoff_line"> | |
| 70 | + | |
| 71 | + </View> | |
| 72 | + | |
| 73 | + <LinearLayout | |
| 74 | + android:layout_width="match_parent" | |
| 75 | + android:layout_height="wrap_content" | |
| 76 | + android:layout_marginBottom="10dp" | |
| 77 | + android:orientation="horizontal"> | |
| 78 | + | |
| 79 | + <TextView | |
| 80 | + android:layout_width="0dp" | |
| 81 | + android:layout_height="wrap_content" | |
| 82 | + android:layout_weight="1" | |
| 83 | + android:gravity="center" | |
| 84 | + android:text="删除用户" | |
| 85 | + android:textSize="18sp" /> | |
| 86 | + | |
| 87 | + <TextView | |
| 88 | + android:layout_width="0dp" | |
| 89 | + android:layout_height="wrap_content" | |
| 90 | + android:layout_weight="1" | |
| 91 | + android:gravity="center" | |
| 92 | + android:text="切换使用" | |
| 93 | + android:textSize="18sp" /> | |
| 94 | + | |
| 95 | + | |
| 96 | + </LinearLayout> | |
| 97 | + | |
| 98 | + </LinearLayout> | |
| 99 | + | |
| 100 | +</LinearLayout> | |
| 0 | 101 | \ No newline at end of file | ... | ... |
PersonalCenter/app/src/main/res/layout/recycler_item_view.xml
| ... | ... | @@ -1,30 +0,0 @@ |
| 1 | -<?xml version="1.0" encoding="utf-8"?> | |
| 2 | -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | - android:layout_width="match_parent" | |
| 4 | - android:layout_height="match_parent" | |
| 5 | - android:orientation="vertical"> | |
| 6 | - | |
| 7 | - <LinearLayout | |
| 8 | - android:layout_width="wrap_content" | |
| 9 | - android:layout_height="wrap_content" | |
| 10 | - android:layout_gravity="center" | |
| 11 | - android:gravity="center" | |
| 12 | - android:orientation="vertical"> | |
| 13 | - | |
| 14 | - <TextView | |
| 15 | - android:id="@+id/item_text" | |
| 16 | - android:layout_width="wrap_content" | |
| 17 | - android:layout_height="wrap_content" | |
| 18 | - android:text="test" | |
| 19 | - android:textColor="@android:color/black" | |
| 20 | - android:textSize="36sp" /> | |
| 21 | - | |
| 22 | - <Button | |
| 23 | - android:id="@+id/item_button" | |
| 24 | - android:layout_width="wrap_content" | |
| 25 | - android:layout_height="wrap_content" | |
| 26 | - android:layout_marginTop="36dp" | |
| 27 | - android:text="下一页" | |
| 28 | - android:textSize="24sp" /> | |
| 29 | - </LinearLayout> | |
| 30 | -</LinearLayout> | |
| 31 | 0 | \ No newline at end of file |
PersonalCenter/app/src/main/res/layout/recycler_study_tem_view.xml
| ... | ... | @@ -0,0 +1,30 @@ |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="match_parent" | |
| 4 | + android:layout_height="match_parent" | |
| 5 | + android:orientation="vertical"> | |
| 6 | + | |
| 7 | + <LinearLayout | |
| 8 | + android:layout_width="wrap_content" | |
| 9 | + android:layout_height="wrap_content" | |
| 10 | + android:layout_gravity="center" | |
| 11 | + android:gravity="center" | |
| 12 | + android:orientation="vertical"> | |
| 13 | + | |
| 14 | + <TextView | |
| 15 | + android:id="@+id/item_text" | |
| 16 | + android:layout_width="wrap_content" | |
| 17 | + android:layout_height="wrap_content" | |
| 18 | + android:text="test" | |
| 19 | + android:textColor="@android:color/black" | |
| 20 | + android:textSize="36sp" /> | |
| 21 | + | |
| 22 | + <Button | |
| 23 | + android:id="@+id/item_button" | |
| 24 | + android:layout_width="wrap_content" | |
| 25 | + android:layout_height="wrap_content" | |
| 26 | + android:layout_marginTop="36dp" | |
| 27 | + android:text="下一页" | |
| 28 | + android:textSize="24sp" /> | |
| 29 | + </LinearLayout> | |
| 30 | +</LinearLayout> | |
| 0 | 31 | \ No newline at end of file | ... | ... |
PersonalCenter/app/src/main/res/mipmap-xhdpi/jia.png
505 Bytes
PersonalCenter/app/src/main/res/mipmap-xhdpi/shiyongzhong.png
2.22 KB