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 | 2 | |
| 3 | 3 | |
| 4 | 4 | import android.content.Context; | 
| 5 | +import android.util.Log; | |
| 5 | 6 | import android.view.LayoutInflater; | 
| 6 | 7 | import android.view.View; | 
| 7 | 8 | import android.view.ViewGroup; | 
| ... | ... | @@ -31,6 +32,7 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { | 
| 31 | 32 | public SchoolListAdapter(Context context, List<SortBean> list) { | 
| 32 | 33 | this.context = context; | 
| 33 | 34 | this.list = list; | 
| 35 | + Log.e("sss-===",list.size()+""); | |
| 34 | 36 | ischeck = new boolean[list.size()]; | 
| 35 | 37 | for (int i=0;i<ischeck.length;i++){ | 
| 36 | 38 | ischeck[i]=false; | 
| ... | ... | @@ -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 | 53 | @Override | 
| 43 | 54 | public BaseRecyclerViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { | 
| ... | ... | @@ -62,6 +73,7 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { | 
| 62 | 73 | @Override | 
| 63 | 74 | public void onBindViewHolder(final SortBean object, final int position) { | 
| 64 | 75 | select_school.setVisibility(View.INVISIBLE); | 
| 76 | + Log.e("1111-===",position+""); | |
| 65 | 77 | if (ischeck[position] ==true) { | 
| 66 | 78 | select_school.setVisibility(View.VISIBLE); | 
| 67 | 79 | } | 
| ... | ... | @@ -122,4 +134,6 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { | 
| 122 | 134 | public static SortBean getCurrentSortBean() { | 
| 123 | 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 | 74 | if (responseBody == null) return; | 
| 75 | 75 | try { | 
| 76 | 76 | JSONObject json = new JSONObject(responseBody.string()); | 
| 77 | -// ToastUtils.showToast(json.optString("message")+"json="+json); | |
| 77 | + ToastUtils.showToast(json.optString("message")+"json="+json); | |
| 78 | 78 | if (TextUtils.isEmpty(json.optString("error"))) { | 
| 79 | 79 | mIView.showerror(json.optString("message")); | 
| 80 | 80 | return; | ... | ... | 
app/src/main/java/com/shunzhi/parent/presenter/mine/MyChildPresenter.java
| 1 | 1 | package com.shunzhi.parent.presenter.mine; | 
| 2 | 2 | |
| 3 | -import android.util.Log; | |
| 4 | - | |
| 5 | 3 | import com.google.gson.JsonObject; | 
| 6 | 4 | import com.share.mvpsdk.utils.OkHttpExceptionUtil; | 
| 7 | 5 | import com.share.mvpsdk.utils.ToastUtils; | 
| 6 | +import com.shunzhi.parent.AppConfig; | |
| 8 | 7 | import com.shunzhi.parent.bean.ChildClass; | 
| 9 | 8 | import com.shunzhi.parent.bean.CurrentBean; | 
| 10 | 9 | import com.shunzhi.parent.bean.GradeBean; | 
| ... | ... | @@ -71,6 +70,7 @@ public class MyChildPresenter extends MyChildContract.MyChildPresenter { | 
| 71 | 70 | @Override | 
| 72 | 71 | public void accept(JsonObject jsonObject) throws Exception { | 
| 73 | 72 | ToastUtils.showToast("绑定孩子成功"); | 
| 73 | + AppConfig.ISBINDING=true; | |
| 74 | 74 | if (jsonObject.get("data").toString().equals("null")) { | 
| 75 | 75 | mIView.addChildSuccess("", ""); | 
| 76 | 76 | } else { | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/fragment/loginandregistfragment/LoginAndRegistFragment.java
| ... | ... | @@ -11,6 +11,7 @@ import android.view.Gravity; | 
| 11 | 11 | import android.view.LayoutInflater; | 
| 12 | 12 | import android.view.View; | 
| 13 | 13 | import android.view.ViewGroup; | 
| 14 | +import android.view.WindowManager; | |
| 14 | 15 | import android.widget.EditText; | 
| 15 | 16 | import android.widget.ImageView; | 
| 16 | 17 | import android.widget.LinearLayout; | 
| ... | ... | @@ -143,6 +144,7 @@ public class LoginAndRegistFragment extends BaseMVPCompatFragment<LoginAndRegist | 
| 143 | 144 | PopupWindow popupWindow = new PopupWindow(); | 
| 144 | 145 | popupWindow.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT); | 
| 145 | 146 | popupWindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT); | 
| 147 | + backgroundAlpha(0.5f); | |
| 146 | 148 | View view = LayoutInflater.from(getActivity()).inflate(R.layout.dialog_view, null); | 
| 147 | 149 | TextView dialogInfo = view.findViewById(R.id.dialog_info); | 
| 148 | 150 | dialogInfo.setText("注册成功"); | 
| ... | ... | @@ -178,8 +180,9 @@ public class LoginAndRegistFragment extends BaseMVPCompatFragment<LoginAndRegist | 
| 178 | 180 | |
| 179 | 181 | @Override | 
| 180 | 182 | public void showerror(String error) { | 
| 183 | + backgroundAlpha(1f); | |
| 181 | 184 | progressDialog.dismiss(); | 
| 182 | -// ToastUtils.showToast(error); | |
| 185 | + ToastUtils.showToast(error); | |
| 183 | 186 | } | 
| 184 | 187 | |
| 185 | 188 | @Override | 
| ... | ... | @@ -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 | 19 | android:layout_width="wrap_content" | 
| 20 | 20 | android:layout_height="wrap_content" | 
| 21 | 21 | android:drawablePadding="@dimen/size_dp_5" | 
| 22 | - android:drawableRight="@drawable/pull" | |
| 22 | + android:drawableRight="@drawable/pull_black" | |
| 23 | 23 | android:gravity="center" | 
| 24 | 24 | android:paddingLeft="@dimen/size_dp_15" | 
| 25 | 25 | android:text="杭州" | ... | ... |