Commit 73227804a4e818e59930304a037ef1546d40acf9
Exists in
yxb_dev
and in
2 other branches
Merge branch 'yxb_dev' of http://git.shunzhi.net/taohd/parentwork into developer
Showing
8 changed files
with
25 additions
and
26 deletions
Show diff stats
app/src/main/AndroidManifest.xml
app/src/main/java/com/shunzhi/parent/adapter/SchoolListAdapter.java
... | ... | @@ -32,7 +32,6 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { |
32 | 32 | public SchoolListAdapter(Context context, List<SortBean> list) { |
33 | 33 | this.context = context; |
34 | 34 | this.list = list; |
35 | - Log.e("sss-===",list.size()+""); | |
36 | 35 | ischeck = new boolean[list.size()]; |
37 | 36 | for (int i=0;i<ischeck.length;i++){ |
38 | 37 | ischeck[i]=false; |
... | ... | @@ -93,12 +92,18 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { |
93 | 92 | item_view.setOnClickListener(new View.OnClickListener() { |
94 | 93 | @Override |
95 | 94 | public void onClick(View v) { |
96 | - ischeck[position] = true; | |
97 | - if(currentPosition!=-1) { | |
95 | + if(ischeck[position]){ | |
98 | 96 | ischeck[currentPosition] = false; |
97 | + currentPosition=-1; | |
98 | + currentSortBean = null; | |
99 | + }else { | |
100 | + ischeck[position] = true; | |
101 | + if (currentPosition != -1) { | |
102 | + ischeck[currentPosition] = false; | |
103 | + } | |
104 | + currentPosition = position; | |
105 | + currentSortBean = object; | |
99 | 106 | } |
100 | - currentPosition = position; | |
101 | - currentSortBean=object; | |
102 | 107 | notifyDataSetChanged(); |
103 | 108 | } |
104 | 109 | }); | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/activity/PersonInfoActivity.java
... | ... | @@ -18,7 +18,6 @@ import com.shunzhi.parent.AppContext; |
18 | 18 | import com.shunzhi.parent.R; |
19 | 19 | import com.shunzhi.parent.contract.mine.PersonInfoContract; |
20 | 20 | import com.shunzhi.parent.presenter.mine.PersonInfoPrasenter; |
21 | -import com.shunzhi.parent.util.GlideUtils; | |
22 | 21 | |
23 | 22 | /** |
24 | 23 | * Created by Administrator on 2018/3/10 0010. |
... | ... | @@ -57,7 +56,7 @@ public class PersonInfoActivity extends BaseMVPCompatActivity<PersonInfoContract |
57 | 56 | private void initInfo() { |
58 | 57 | String url = AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_IMAGE); |
59 | 58 | if (!TextUtils.isEmpty(url)) { |
60 | - GlideUtils.showImg(this,user_image,url); | |
59 | + Glide.with(this).load(url).asBitmap().centerCrop().into(user_image); | |
61 | 60 | // Glide.with(this).load(url).asBitmap().error(R.drawable.test).centerCrop().into(user_image); |
62 | 61 | } else { |
63 | 62 | Glide.with(this).load(R.drawable.defphoto).centerCrop().into(user_image); | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/activity/binding/SelectSchoolActivity.java
... | ... | @@ -96,7 +96,7 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContra |
96 | 96 | } |
97 | 97 | |
98 | 98 | private void setSchoolList() { |
99 | - mPresenter.schoolListResult(AppContext.getInstance().cityName, ""); | |
99 | + mPresenter.schoolListResult(AppContext.getInstance().district, ""); | |
100 | 100 | } |
101 | 101 | |
102 | 102 | @Override | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/activity/mywebview/WebViewActivity.java
... | ... | @@ -4,7 +4,6 @@ import android.content.Context; |
4 | 4 | import android.content.Intent; |
5 | 5 | import android.graphics.Bitmap; |
6 | 6 | import android.os.Bundle; |
7 | -import android.util.Log; | |
8 | 7 | import android.view.View; |
9 | 8 | import android.webkit.JavascriptInterface; |
10 | 9 | import android.webkit.WebChromeClient; |
... | ... | @@ -68,7 +67,7 @@ public class WebViewActivity extends BaseCompatActivity { |
68 | 67 | @Override |
69 | 68 | public void onClick(View v) { |
70 | 69 | if(type!=-1&&type!= AppConfig.ORDER_CENTER) { |
71 | - startActivity(new Intent().setClass(WebViewActivity.this, MainActivity.class)); | |
70 | + startActivity(new Intent().setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP).setClass(WebViewActivity.this, MainActivity.class)); | |
72 | 71 | }else{ |
73 | 72 | finish(); |
74 | 73 | } |
... | ... | @@ -133,7 +132,7 @@ public class WebViewActivity extends BaseCompatActivity { |
133 | 132 | } else { |
134 | 133 | super.onBackPressedSupport(); |
135 | 134 | if (type != -1 && type != AppConfig.ORDER_CENTER) { |
136 | - startActivity(new Intent().setClass(this, MainActivity.class)); | |
135 | + startActivity(new Intent().setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP).setClass(this, MainActivity.class)); | |
137 | 136 | } |
138 | 137 | } |
139 | 138 | } | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
... | ... | @@ -27,7 +27,6 @@ import com.shunzhi.parent.ui.activity.MyChildActivity; |
27 | 27 | import com.shunzhi.parent.ui.activity.PersonInfoActivity; |
28 | 28 | import com.shunzhi.parent.ui.activity.mywebview.WebViewActivity; |
29 | 29 | import com.shunzhi.parent.ui.activity.orderdetail.OrderDetailActivity; |
30 | -import com.shunzhi.parent.util.GlideUtils; | |
31 | 30 | |
32 | 31 | public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract.LoginPresenter, LoginAndRegisterContract.ILoginModel> |
33 | 32 | implements MineContract.IMineView, View.OnClickListener { |
... | ... | @@ -85,7 +84,7 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract |
85 | 84 | if (AppConfig.ISLOGIN) { |
86 | 85 | String url = AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_IMAGE); |
87 | 86 | if (!TextUtils.isEmpty(url)) { |
88 | - GlideUtils.showImg(getContext(), user_photo, url); | |
87 | + Glide.with(this).load(url).asBitmap().centerCrop().into(user_photo); | |
89 | 88 | } else { |
90 | 89 | Glide.with(getActivity()).load(R.drawable.defphoto).into(user_photo); |
91 | 90 | user_photo.setCornerRadius(20); | ... | ... |
app/src/main/res/layout/activity_personinfo.xml
... | ... | @@ -27,14 +27,14 @@ |
27 | 27 | android:layout_height="180dp" |
28 | 28 | android:background="@drawable/backgroud_top" |
29 | 29 | android:orientation="vertical" |
30 | - > | |
30 | + android:paddingTop="20dp"> | |
31 | + | |
31 | 32 | <TextView |
32 | 33 | android:layout_width="match_parent" |
33 | - android:layout_height="?android:actionBarSize" | |
34 | + android:layout_height="wrap_content" | |
34 | 35 | android:layout_gravity="center" |
35 | 36 | android:gravity="center" |
36 | 37 | android:text="个人资料" |
37 | - android:background="@color/back_top" | |
38 | 38 | android:textColor="@color/white" |
39 | 39 | android:textSize="@dimen/txtsize_headline" /> |
40 | 40 | |
... | ... | @@ -52,9 +52,8 @@ |
52 | 52 | android:layout_width="100dp" |
53 | 53 | android:layout_height="100dp" |
54 | 54 | android:src="@color/white" |
55 | - app:riv_corner_radius="50dp" | |
56 | - app:riv_oval="false" | |
57 | - /> | |
55 | + app:riv_corner_radius="60dp" | |
56 | + app:riv_oval="false" /> | |
58 | 57 | </FrameLayout> |
59 | 58 | |
60 | 59 | <LinearLayout | ... | ... |
app/src/main/res/layout/fragment_mine.xml
... | ... | @@ -14,15 +14,15 @@ |
14 | 14 | |
15 | 15 | <LinearLayout |
16 | 16 | android:id="@+id/top_layout" |
17 | + android:paddingTop="20dp" | |
17 | 18 | android:layout_width="match_parent" |
18 | 19 | android:layout_height="180dp" |
19 | 20 | android:background="@color/back_top" |
20 | 21 | android:orientation="vertical"> |
21 | 22 | |
22 | - | |
23 | 23 | <TextView |
24 | 24 | android:layout_width="match_parent" |
25 | - android:layout_height="?android:actionBarSize" | |
25 | + android:layout_height="wrap_content" | |
26 | 26 | android:layout_gravity="center" |
27 | 27 | android:gravity="center" |
28 | 28 | android:text="个人中心" |
... | ... | @@ -37,11 +37,11 @@ |
37 | 37 | |
38 | 38 | <com.makeramen.roundedimageview.RoundedImageView |
39 | 39 | android:id="@+id/user_photo" |
40 | - android:layout_width="80dp" | |
41 | - android:layout_height="80dp" | |
40 | + android:layout_width="60dp" | |
41 | + android:layout_height="60dp" | |
42 | 42 | android:layout_margin="20dp" |
43 | 43 | android:src="@drawable/user_imge_defult" |
44 | - app:riv_corner_radius="40dp" /> | |
44 | + app:riv_corner_radius="60dp" /> | |
45 | 45 | |
46 | 46 | <LinearLayout |
47 | 47 | android:layout_width="wrap_content" | ... | ... |