Commit 7b8a96d892949adfe91279a703ad91265b5254de
Exists in
yxb_dev
and in
2 other branches
Merge branch 'yxb_dev' of http://git.shunzhi.net/taohd/parentwork into developer
Showing
6 changed files
with
29 additions
and
5 deletions
Show diff stats
app/src/main/java/com/shunzhi/parent/adapter/SchoolListAdapter.java
@@ -2,6 +2,7 @@ package com.shunzhi.parent.adapter; | @@ -2,6 +2,7 @@ package com.shunzhi.parent.adapter; | ||
2 | 2 | ||
3 | 3 | ||
4 | import android.content.Context; | 4 | import android.content.Context; |
5 | +import android.util.Log; | ||
5 | import android.view.LayoutInflater; | 6 | import android.view.LayoutInflater; |
6 | import android.view.View; | 7 | import android.view.View; |
7 | import android.view.ViewGroup; | 8 | import android.view.ViewGroup; |
@@ -31,6 +32,7 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { | @@ -31,6 +32,7 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { | ||
31 | public SchoolListAdapter(Context context, List<SortBean> list) { | 32 | public SchoolListAdapter(Context context, List<SortBean> list) { |
32 | this.context = context; | 33 | this.context = context; |
33 | this.list = list; | 34 | this.list = list; |
35 | + Log.e("sss-===",list.size()+""); | ||
34 | ischeck = new boolean[list.size()]; | 36 | ischeck = new boolean[list.size()]; |
35 | for (int i=0;i<ischeck.length;i++){ | 37 | for (int i=0;i<ischeck.length;i++){ |
36 | ischeck[i]=false; | 38 | ischeck[i]=false; |
@@ -38,6 +40,15 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { | @@ -38,6 +40,15 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { | ||
38 | 40 | ||
39 | } | 41 | } |
40 | 42 | ||
43 | + @Override | ||
44 | + public void addAll(List<SortBean> data) { | ||
45 | + super.addAll(data); | ||
46 | + this.list = data; | ||
47 | + ischeck = new boolean[data.size()]; | ||
48 | + for (int i=0;i<ischeck.length;i++){ | ||
49 | + ischeck[i]=false; | ||
50 | + } | ||
51 | + } | ||
41 | 52 | ||
42 | @Override | 53 | @Override |
43 | public BaseRecyclerViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { | 54 | public BaseRecyclerViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { |
@@ -62,6 +73,7 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { | @@ -62,6 +73,7 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { | ||
62 | @Override | 73 | @Override |
63 | public void onBindViewHolder(final SortBean object, final int position) { | 74 | public void onBindViewHolder(final SortBean object, final int position) { |
64 | select_school.setVisibility(View.INVISIBLE); | 75 | select_school.setVisibility(View.INVISIBLE); |
76 | + Log.e("1111-===",position+""); | ||
65 | if (ischeck[position] ==true) { | 77 | if (ischeck[position] ==true) { |
66 | select_school.setVisibility(View.VISIBLE); | 78 | select_school.setVisibility(View.VISIBLE); |
67 | } | 79 | } |
@@ -122,4 +134,6 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { | @@ -122,4 +134,6 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { | ||
122 | public static SortBean getCurrentSortBean() { | 134 | public static SortBean getCurrentSortBean() { |
123 | return currentSortBean; | 135 | return currentSortBean; |
124 | } | 136 | } |
137 | + | ||
138 | + | ||
125 | } | 139 | } |
app/src/main/java/com/shunzhi/parent/presenter/loginandregister/LoginAndRegisterPresenter.java
@@ -74,7 +74,7 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | @@ -74,7 +74,7 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | ||
74 | if (responseBody == null) return; | 74 | if (responseBody == null) return; |
75 | try { | 75 | try { |
76 | JSONObject json = new JSONObject(responseBody.string()); | 76 | JSONObject json = new JSONObject(responseBody.string()); |
77 | -// ToastUtils.showToast(json.optString("message")+"json="+json); | 77 | + ToastUtils.showToast(json.optString("message")+"json="+json); |
78 | if (TextUtils.isEmpty(json.optString("error"))) { | 78 | if (TextUtils.isEmpty(json.optString("error"))) { |
79 | mIView.showerror(json.optString("message")); | 79 | mIView.showerror(json.optString("message")); |
80 | return; | 80 | return; |
app/src/main/java/com/shunzhi/parent/presenter/mine/MyChildPresenter.java
1 | package com.shunzhi.parent.presenter.mine; | 1 | package com.shunzhi.parent.presenter.mine; |
2 | 2 | ||
3 | -import android.util.Log; | ||
4 | - | ||
5 | import com.google.gson.JsonObject; | 3 | import com.google.gson.JsonObject; |
6 | import com.share.mvpsdk.utils.OkHttpExceptionUtil; | 4 | import com.share.mvpsdk.utils.OkHttpExceptionUtil; |
7 | import com.share.mvpsdk.utils.ToastUtils; | 5 | import com.share.mvpsdk.utils.ToastUtils; |
6 | +import com.shunzhi.parent.AppConfig; | ||
8 | import com.shunzhi.parent.bean.ChildClass; | 7 | import com.shunzhi.parent.bean.ChildClass; |
9 | import com.shunzhi.parent.bean.CurrentBean; | 8 | import com.shunzhi.parent.bean.CurrentBean; |
10 | import com.shunzhi.parent.bean.GradeBean; | 9 | import com.shunzhi.parent.bean.GradeBean; |
@@ -71,6 +70,7 @@ public class MyChildPresenter extends MyChildContract.MyChildPresenter { | @@ -71,6 +70,7 @@ public class MyChildPresenter extends MyChildContract.MyChildPresenter { | ||
71 | @Override | 70 | @Override |
72 | public void accept(JsonObject jsonObject) throws Exception { | 71 | public void accept(JsonObject jsonObject) throws Exception { |
73 | ToastUtils.showToast("绑定孩子成功"); | 72 | ToastUtils.showToast("绑定孩子成功"); |
73 | + AppConfig.ISBINDING=true; | ||
74 | if (jsonObject.get("data").toString().equals("null")) { | 74 | if (jsonObject.get("data").toString().equals("null")) { |
75 | mIView.addChildSuccess("", ""); | 75 | mIView.addChildSuccess("", ""); |
76 | } else { | 76 | } else { |
app/src/main/java/com/shunzhi/parent/ui/fragment/loginandregistfragment/LoginAndRegistFragment.java
@@ -11,6 +11,7 @@ import android.view.Gravity; | @@ -11,6 +11,7 @@ import android.view.Gravity; | ||
11 | import android.view.LayoutInflater; | 11 | import android.view.LayoutInflater; |
12 | import android.view.View; | 12 | import android.view.View; |
13 | import android.view.ViewGroup; | 13 | import android.view.ViewGroup; |
14 | +import android.view.WindowManager; | ||
14 | import android.widget.EditText; | 15 | import android.widget.EditText; |
15 | import android.widget.ImageView; | 16 | import android.widget.ImageView; |
16 | import android.widget.LinearLayout; | 17 | import android.widget.LinearLayout; |
@@ -143,6 +144,7 @@ public class LoginAndRegistFragment extends BaseMVPCompatFragment<LoginAndRegist | @@ -143,6 +144,7 @@ public class LoginAndRegistFragment extends BaseMVPCompatFragment<LoginAndRegist | ||
143 | PopupWindow popupWindow = new PopupWindow(); | 144 | PopupWindow popupWindow = new PopupWindow(); |
144 | popupWindow.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT); | 145 | popupWindow.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT); |
145 | popupWindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT); | 146 | popupWindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT); |
147 | + backgroundAlpha(0.5f); | ||
146 | View view = LayoutInflater.from(getActivity()).inflate(R.layout.dialog_view, null); | 148 | View view = LayoutInflater.from(getActivity()).inflate(R.layout.dialog_view, null); |
147 | TextView dialogInfo = view.findViewById(R.id.dialog_info); | 149 | TextView dialogInfo = view.findViewById(R.id.dialog_info); |
148 | dialogInfo.setText("注册成功"); | 150 | dialogInfo.setText("注册成功"); |
@@ -178,8 +180,9 @@ public class LoginAndRegistFragment extends BaseMVPCompatFragment<LoginAndRegist | @@ -178,8 +180,9 @@ public class LoginAndRegistFragment extends BaseMVPCompatFragment<LoginAndRegist | ||
178 | 180 | ||
179 | @Override | 181 | @Override |
180 | public void showerror(String error) { | 182 | public void showerror(String error) { |
183 | + backgroundAlpha(1f); | ||
181 | progressDialog.dismiss(); | 184 | progressDialog.dismiss(); |
182 | -// ToastUtils.showToast(error); | 185 | + ToastUtils.showToast(error); |
183 | } | 186 | } |
184 | 187 | ||
185 | @Override | 188 | @Override |
@@ -287,4 +290,11 @@ public class LoginAndRegistFragment extends BaseMVPCompatFragment<LoginAndRegist | @@ -287,4 +290,11 @@ public class LoginAndRegistFragment extends BaseMVPCompatFragment<LoginAndRegist | ||
287 | } | 290 | } |
288 | }; | 291 | }; |
289 | 292 | ||
293 | + | ||
294 | + public void backgroundAlpha(float bgAlpha) { | ||
295 | + WindowManager.LayoutParams lp = getActivity().getWindow().getAttributes(); | ||
296 | + lp.alpha = bgAlpha; //0.0-1.0 | ||
297 | + getActivity().getWindow().setAttributes(lp); | ||
298 | + } | ||
299 | + | ||
290 | } | 300 | } |
468 Bytes
app/src/main/res/layout/activity_select_school.xml
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | android:layout_width="wrap_content" | 19 | android:layout_width="wrap_content" |
20 | android:layout_height="wrap_content" | 20 | android:layout_height="wrap_content" |
21 | android:drawablePadding="@dimen/size_dp_5" | 21 | android:drawablePadding="@dimen/size_dp_5" |
22 | - android:drawableRight="@drawable/pull" | 22 | + android:drawableRight="@drawable/pull_black" |
23 | android:gravity="center" | 23 | android:gravity="center" |
24 | android:paddingLeft="@dimen/size_dp_15" | 24 | android:paddingLeft="@dimen/size_dp_15" |
25 | android:text="杭州" | 25 | android:text="杭州" |