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
@@ -144,8 +144,6 @@ | @@ -144,8 +144,6 @@ | ||
144 | 144 | ||
145 | <activity | 145 | <activity |
146 | android:name=".ui.MainActivity" | 146 | android:name=".ui.MainActivity" |
147 | - android:windowSoftInputMode="adjustPan|stateAlwaysHidden" | ||
148 | - android:launchMode="singleInstance" | ||
149 | android:screenOrientation="portrait"/> | 147 | android:screenOrientation="portrait"/> |
150 | 148 | ||
151 | <activity | 149 | <activity |
app/src/main/java/com/shunzhi/parent/adapter/SchoolListAdapter.java
@@ -32,7 +32,6 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { | @@ -32,7 +32,6 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { | ||
32 | public SchoolListAdapter(Context context, List<SortBean> list) { | 32 | public SchoolListAdapter(Context context, List<SortBean> list) { |
33 | this.context = context; | 33 | this.context = context; |
34 | this.list = list; | 34 | this.list = list; |
35 | - Log.e("sss-===",list.size()+""); | ||
36 | ischeck = new boolean[list.size()]; | 35 | ischeck = new boolean[list.size()]; |
37 | for (int i=0;i<ischeck.length;i++){ | 36 | for (int i=0;i<ischeck.length;i++){ |
38 | ischeck[i]=false; | 37 | ischeck[i]=false; |
@@ -93,12 +92,18 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { | @@ -93,12 +92,18 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { | ||
93 | item_view.setOnClickListener(new View.OnClickListener() { | 92 | item_view.setOnClickListener(new View.OnClickListener() { |
94 | @Override | 93 | @Override |
95 | public void onClick(View v) { | 94 | public void onClick(View v) { |
96 | - ischeck[position] = true; | ||
97 | - if(currentPosition!=-1) { | 95 | + if(ischeck[position]){ |
98 | ischeck[currentPosition] = false; | 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 | notifyDataSetChanged(); | 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,7 +18,6 @@ import com.shunzhi.parent.AppContext; | ||
18 | import com.shunzhi.parent.R; | 18 | import com.shunzhi.parent.R; |
19 | import com.shunzhi.parent.contract.mine.PersonInfoContract; | 19 | import com.shunzhi.parent.contract.mine.PersonInfoContract; |
20 | import com.shunzhi.parent.presenter.mine.PersonInfoPrasenter; | 20 | import com.shunzhi.parent.presenter.mine.PersonInfoPrasenter; |
21 | -import com.shunzhi.parent.util.GlideUtils; | ||
22 | 21 | ||
23 | /** | 22 | /** |
24 | * Created by Administrator on 2018/3/10 0010. | 23 | * Created by Administrator on 2018/3/10 0010. |
@@ -57,7 +56,7 @@ public class PersonInfoActivity extends BaseMVPCompatActivity<PersonInfoContract | @@ -57,7 +56,7 @@ public class PersonInfoActivity extends BaseMVPCompatActivity<PersonInfoContract | ||
57 | private void initInfo() { | 56 | private void initInfo() { |
58 | String url = AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_IMAGE); | 57 | String url = AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_IMAGE); |
59 | if (!TextUtils.isEmpty(url)) { | 58 | if (!TextUtils.isEmpty(url)) { |
60 | - GlideUtils.showImg(this,user_image,url); | 59 | + Glide.with(this).load(url).asBitmap().centerCrop().into(user_image); |
61 | // Glide.with(this).load(url).asBitmap().error(R.drawable.test).centerCrop().into(user_image); | 60 | // Glide.with(this).load(url).asBitmap().error(R.drawable.test).centerCrop().into(user_image); |
62 | } else { | 61 | } else { |
63 | Glide.with(this).load(R.drawable.defphoto).centerCrop().into(user_image); | 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,7 +96,7 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContra | ||
96 | } | 96 | } |
97 | 97 | ||
98 | private void setSchoolList() { | 98 | private void setSchoolList() { |
99 | - mPresenter.schoolListResult(AppContext.getInstance().cityName, ""); | 99 | + mPresenter.schoolListResult(AppContext.getInstance().district, ""); |
100 | } | 100 | } |
101 | 101 | ||
102 | @Override | 102 | @Override |
app/src/main/java/com/shunzhi/parent/ui/activity/mywebview/WebViewActivity.java
@@ -4,7 +4,6 @@ import android.content.Context; | @@ -4,7 +4,6 @@ import android.content.Context; | ||
4 | import android.content.Intent; | 4 | import android.content.Intent; |
5 | import android.graphics.Bitmap; | 5 | import android.graphics.Bitmap; |
6 | import android.os.Bundle; | 6 | import android.os.Bundle; |
7 | -import android.util.Log; | ||
8 | import android.view.View; | 7 | import android.view.View; |
9 | import android.webkit.JavascriptInterface; | 8 | import android.webkit.JavascriptInterface; |
10 | import android.webkit.WebChromeClient; | 9 | import android.webkit.WebChromeClient; |
@@ -68,7 +67,7 @@ public class WebViewActivity extends BaseCompatActivity { | @@ -68,7 +67,7 @@ public class WebViewActivity extends BaseCompatActivity { | ||
68 | @Override | 67 | @Override |
69 | public void onClick(View v) { | 68 | public void onClick(View v) { |
70 | if(type!=-1&&type!= AppConfig.ORDER_CENTER) { | 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 | }else{ | 71 | }else{ |
73 | finish(); | 72 | finish(); |
74 | } | 73 | } |
@@ -133,7 +132,7 @@ public class WebViewActivity extends BaseCompatActivity { | @@ -133,7 +132,7 @@ public class WebViewActivity extends BaseCompatActivity { | ||
133 | } else { | 132 | } else { |
134 | super.onBackPressedSupport(); | 133 | super.onBackPressedSupport(); |
135 | if (type != -1 && type != AppConfig.ORDER_CENTER) { | 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,7 +27,6 @@ import com.shunzhi.parent.ui.activity.MyChildActivity; | ||
27 | import com.shunzhi.parent.ui.activity.PersonInfoActivity; | 27 | import com.shunzhi.parent.ui.activity.PersonInfoActivity; |
28 | import com.shunzhi.parent.ui.activity.mywebview.WebViewActivity; | 28 | import com.shunzhi.parent.ui.activity.mywebview.WebViewActivity; |
29 | import com.shunzhi.parent.ui.activity.orderdetail.OrderDetailActivity; | 29 | import com.shunzhi.parent.ui.activity.orderdetail.OrderDetailActivity; |
30 | -import com.shunzhi.parent.util.GlideUtils; | ||
31 | 30 | ||
32 | public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract.LoginPresenter, LoginAndRegisterContract.ILoginModel> | 31 | public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract.LoginPresenter, LoginAndRegisterContract.ILoginModel> |
33 | implements MineContract.IMineView, View.OnClickListener { | 32 | implements MineContract.IMineView, View.OnClickListener { |
@@ -85,7 +84,7 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | @@ -85,7 +84,7 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | ||
85 | if (AppConfig.ISLOGIN) { | 84 | if (AppConfig.ISLOGIN) { |
86 | String url = AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_IMAGE); | 85 | String url = AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_IMAGE); |
87 | if (!TextUtils.isEmpty(url)) { | 86 | if (!TextUtils.isEmpty(url)) { |
88 | - GlideUtils.showImg(getContext(), user_photo, url); | 87 | + Glide.with(this).load(url).asBitmap().centerCrop().into(user_photo); |
89 | } else { | 88 | } else { |
90 | Glide.with(getActivity()).load(R.drawable.defphoto).into(user_photo); | 89 | Glide.with(getActivity()).load(R.drawable.defphoto).into(user_photo); |
91 | user_photo.setCornerRadius(20); | 90 | user_photo.setCornerRadius(20); |
app/src/main/res/layout/activity_personinfo.xml
@@ -27,14 +27,14 @@ | @@ -27,14 +27,14 @@ | ||
27 | android:layout_height="180dp" | 27 | android:layout_height="180dp" |
28 | android:background="@drawable/backgroud_top" | 28 | android:background="@drawable/backgroud_top" |
29 | android:orientation="vertical" | 29 | android:orientation="vertical" |
30 | - > | 30 | + android:paddingTop="20dp"> |
31 | + | ||
31 | <TextView | 32 | <TextView |
32 | android:layout_width="match_parent" | 33 | android:layout_width="match_parent" |
33 | - android:layout_height="?android:actionBarSize" | 34 | + android:layout_height="wrap_content" |
34 | android:layout_gravity="center" | 35 | android:layout_gravity="center" |
35 | android:gravity="center" | 36 | android:gravity="center" |
36 | android:text="个人资料" | 37 | android:text="个人资料" |
37 | - android:background="@color/back_top" | ||
38 | android:textColor="@color/white" | 38 | android:textColor="@color/white" |
39 | android:textSize="@dimen/txtsize_headline" /> | 39 | android:textSize="@dimen/txtsize_headline" /> |
40 | 40 | ||
@@ -52,9 +52,8 @@ | @@ -52,9 +52,8 @@ | ||
52 | android:layout_width="100dp" | 52 | android:layout_width="100dp" |
53 | android:layout_height="100dp" | 53 | android:layout_height="100dp" |
54 | android:src="@color/white" | 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 | </FrameLayout> | 57 | </FrameLayout> |
59 | 58 | ||
60 | <LinearLayout | 59 | <LinearLayout |
app/src/main/res/layout/fragment_mine.xml
@@ -14,15 +14,15 @@ | @@ -14,15 +14,15 @@ | ||
14 | 14 | ||
15 | <LinearLayout | 15 | <LinearLayout |
16 | android:id="@+id/top_layout" | 16 | android:id="@+id/top_layout" |
17 | + android:paddingTop="20dp" | ||
17 | android:layout_width="match_parent" | 18 | android:layout_width="match_parent" |
18 | android:layout_height="180dp" | 19 | android:layout_height="180dp" |
19 | android:background="@color/back_top" | 20 | android:background="@color/back_top" |
20 | android:orientation="vertical"> | 21 | android:orientation="vertical"> |
21 | 22 | ||
22 | - | ||
23 | <TextView | 23 | <TextView |
24 | android:layout_width="match_parent" | 24 | android:layout_width="match_parent" |
25 | - android:layout_height="?android:actionBarSize" | 25 | + android:layout_height="wrap_content" |
26 | android:layout_gravity="center" | 26 | android:layout_gravity="center" |
27 | android:gravity="center" | 27 | android:gravity="center" |
28 | android:text="个人中心" | 28 | android:text="个人中心" |
@@ -37,11 +37,11 @@ | @@ -37,11 +37,11 @@ | ||
37 | 37 | ||
38 | <com.makeramen.roundedimageview.RoundedImageView | 38 | <com.makeramen.roundedimageview.RoundedImageView |
39 | android:id="@+id/user_photo" | 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 | android:layout_margin="20dp" | 42 | android:layout_margin="20dp" |
43 | android:src="@drawable/user_imge_defult" | 43 | android:src="@drawable/user_imge_defult" |
44 | - app:riv_corner_radius="40dp" /> | 44 | + app:riv_corner_radius="60dp" /> |
45 | 45 | ||
46 | <LinearLayout | 46 | <LinearLayout |
47 | android:layout_width="wrap_content" | 47 | android:layout_width="wrap_content" |