Commit 2f0e524070513fc203a8f15d031ba7f224bc06ab

Authored by 陶汉栋
2 parents ec30fab4 d045d156

no message

app/src/main/java/com/shunzhi/parent/presenter/consult/ConsultPresenter.java
@@ -77,7 +77,7 @@ public class ConsultPresenter extends ConsultContract.ConsultPresenter { @@ -77,7 +77,7 @@ public class ConsultPresenter extends ConsultContract.ConsultPresenter {
77 } 77 }
78 mIView.showBanners(guangGaoBeanList); 78 mIView.showBanners(guangGaoBeanList);
79 } else { 79 } else {
80 - ToastUtils.showToast(jsonObject.get("message").getAsString()); 80 +// ToastUtils.showToast(jsonObject.get("message").getAsString());
81 } 81 }
82 } 82 }
83 }, new Consumer<Throwable>() { 83 }, new Consumer<Throwable>() {
app/src/main/java/com/shunzhi/parent/presenter/consult/consultone/ConsultOnePresenter.java
@@ -73,7 +73,7 @@ public class ConsultOnePresenter extends ConsultOneContract.ConsultOnePresenter{ @@ -73,7 +73,7 @@ public class ConsultOnePresenter extends ConsultOneContract.ConsultOnePresenter{
73 } 73 }
74 mIView.showBanners(guangGaoBeanList); 74 mIView.showBanners(guangGaoBeanList);
75 }else { 75 }else {
76 - ToastUtils.showToast(jsonObject.get("message").getAsString()); 76 +// ToastUtils.showToast(jsonObject.get("message").getAsString());
77 } 77 }
78 } 78 }
79 }, new Consumer<Throwable>() { 79 }, new Consumer<Throwable>() {
app/src/main/java/com/shunzhi/parent/presenter/mine/MyChildPresenter.java
@@ -71,7 +71,6 @@ public class MyChildPresenter extends MyChildContract.MyChildPresenter { @@ -71,7 +71,6 @@ public class MyChildPresenter extends MyChildContract.MyChildPresenter {
71 @Override 71 @Override
72 public void accept(JsonObject jsonObject) throws Exception { 72 public void accept(JsonObject jsonObject) throws Exception {
73 ToastUtils.showToast("绑定孩子成功"); 73 ToastUtils.showToast("绑定孩子成功");
74 - Log.e("asdasda", jsonObject.get("data").toString());  
75 if (jsonObject.get("data").toString().equals("null")) { 74 if (jsonObject.get("data").toString().equals("null")) {
76 mIView.addChildSuccess("", ""); 75 mIView.addChildSuccess("", "");
77 } else { 76 } else {
app/src/main/java/com/shunzhi/parent/ui/activity/binding/CheckInfoActivity.java
@@ -101,7 +101,8 @@ public class CheckInfoActivity extends BaseMVPCompatActivity&lt;MyChildContract.MyC @@ -101,7 +101,8 @@ public class CheckInfoActivity extends BaseMVPCompatActivity&lt;MyChildContract.MyC
101 right_btn.setOnClickListener(new View.OnClickListener() { 101 right_btn.setOnClickListener(new View.OnClickListener() {
102 @Override 102 @Override
103 public void onClick(View v) { 103 public void onClick(View v) {
104 - startActivity(new Intent().setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP).setClass(CheckInfoActivity.this, MyChildActivity.class)); 104 + popupWindow.dismiss();
  105 + startActivity(new Intent().setFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_CLEAR_TASK).setClass(CheckInfoActivity.this, MyChildActivity.class));
105 finish(); 106 finish();
106 } 107 }
107 }); 108 });
app/src/main/java/com/shunzhi/parent/ui/activity/mywebview/WebViewActivity.java
@@ -40,6 +40,7 @@ public class WebViewActivity extends BaseCompatActivity { @@ -40,6 +40,7 @@ public class WebViewActivity extends BaseCompatActivity {
40 Intent intent = new Intent(context, WebViewActivity.class); 40 Intent intent = new Intent(context, WebViewActivity.class);
41 intent.putExtra("url", url); 41 intent.putExtra("url", url);
42 intent.putExtra("type", type); 42 intent.putExtra("type", type);
  43 + intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
43 context.startActivity(intent); 44 context.startActivity(intent);
44 } 45 }
45 46
@@ -57,7 +58,7 @@ public class WebViewActivity extends BaseCompatActivity { @@ -57,7 +58,7 @@ public class WebViewActivity extends BaseCompatActivity {
57 @Override 58 @Override
58 protected void initView(Bundle savedInstanceState) { 59 protected void initView(Bundle savedInstanceState) {
59 60
60 - binding_success = findViewById(R.id.binding_success); 61 +// binding_success = findViewById(R.id.binding_success);
61 62
62 binding_success = findViewById(R.id.binding_success1); 63 binding_success = findViewById(R.id.binding_success1);
63 64
@@ -78,7 +79,7 @@ public class WebViewActivity extends BaseCompatActivity { @@ -78,7 +79,7 @@ public class WebViewActivity extends BaseCompatActivity {
78 79
79 nesteScrollWebView = findViewById(R.id.nesteScrollWebView); 80 nesteScrollWebView = findViewById(R.id.nesteScrollWebView);
80 81
81 - nesteScrollWebView = findViewById(R.id.webView); 82 +// nesteScrollWebView = findViewById(R.id.webView);
82 83
83 pvWeb = findViewById(R.id.pb_web); 84 pvWeb = findViewById(R.id.pb_web);
84 type = getIntent().getIntExtra("type", 0); 85 type = getIntent().getIntExtra("type", 0);
@@ -106,6 +107,9 @@ public class WebViewActivity extends BaseCompatActivity { @@ -106,6 +107,9 @@ public class WebViewActivity extends BaseCompatActivity {
106 binding_success.setVisibility(View.GONE); 107 binding_success.setVisibility(View.GONE);
107 binding_success2.setVisibility(View.GONE); 108 binding_success2.setVisibility(View.GONE);
108 title_web.setVisibility(View.GONE); 109 title_web.setVisibility(View.GONE);
  110 + LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) nesteScrollWebView.getLayoutParams();
  111 + lp.setMargins(0, 0, 0, 0);
  112 + nesteScrollWebView.setLayoutParams(lp);
109 113
110 } 114 }
111 115
@@ -116,7 +120,7 @@ public class WebViewActivity extends BaseCompatActivity { @@ -116,7 +120,7 @@ public class WebViewActivity extends BaseCompatActivity {
116 120
117 @Override 121 @Override
118 protected int getLayoutId() { 122 protected int getLayoutId() {
119 - return R.layout.activity_webview; 123 + return R.layout.activity_web_view;
120 } 124 }
121 125
122 @Override 126 @Override
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
@@ -17,7 +17,6 @@ import com.netease.nimlib.sdk.NIMClient; @@ -17,7 +17,6 @@ import com.netease.nimlib.sdk.NIMClient;
17 import com.share.mvpsdk.base.BasePresenter; 17 import com.share.mvpsdk.base.BasePresenter;
18 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; 18 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment;
19 import com.share.mvpsdk.utils.CacheUtils; 19 import com.share.mvpsdk.utils.CacheUtils;
20 -import com.share.mvpsdk.utils.ToastUtils;  
21 import com.shunzhi.parent.AppConfig; 20 import com.shunzhi.parent.AppConfig;
22 import com.shunzhi.parent.AppContext; 21 import com.shunzhi.parent.AppContext;
23 import com.shunzhi.parent.R; 22 import com.shunzhi.parent.R;
@@ -31,13 +30,11 @@ import com.shunzhi.parent.ui.activity.mywebview.WebViewActivity; @@ -31,13 +30,11 @@ import com.shunzhi.parent.ui.activity.mywebview.WebViewActivity;
31 import com.shunzhi.parent.ui.activity.orderdetail.OrderDetailActivity; 30 import com.shunzhi.parent.ui.activity.orderdetail.OrderDetailActivity;
32 import com.shunzhi.parent.util.GlideUtils; 31 import com.shunzhi.parent.util.GlideUtils;
33 32
34 -import static java.util.ResourceBundle.clearCache;  
35 -  
36 public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract.LoginPresenter, LoginAndRegisterContract.ILoginModel> 33 public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract.LoginPresenter, LoginAndRegisterContract.ILoginModel>
37 implements MineContract.IMineView, View.OnClickListener { 34 implements MineContract.IMineView, View.OnClickListener {
38 - LinearLayout childlayout, personinfo, layout_orderDetail, layout_order,layout_cache; 35 + LinearLayout childlayout, personinfo, layout_orderDetail, layout_order, layout_cache, layout_about;
39 RoundedImageView user_photo; 36 RoundedImageView user_photo;
40 - TextView user_name, user_mobile, tvExit,binding_state; 37 + TextView user_name, user_mobile, tvExit, binding_state;
41 38
42 @NonNull 39 @NonNull
43 @Override 40 @Override
@@ -56,7 +53,9 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract @@ -56,7 +53,9 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract
56 personinfo = view.findViewById(R.id.personinfo); 53 personinfo = view.findViewById(R.id.personinfo);
57 layout_order = view.findViewById(R.id.layout_order); 54 layout_order = view.findViewById(R.id.layout_order);
58 layout_orderDetail = view.findViewById(R.id.layout_orderDetail); 55 layout_orderDetail = view.findViewById(R.id.layout_orderDetail);
59 - layout_cache=view.findViewById(R.id.layout_cache); 56 + layout_cache = view.findViewById(R.id.layout_cache);
  57 + layout_about = view.findViewById(R.id.layout_about);
  58 + layout_about.setOnClickListener(this);
60 layout_cache.setOnClickListener(this); 59 layout_cache.setOnClickListener(this);
61 childlayout.setOnClickListener(this); 60 childlayout.setOnClickListener(this);
62 personinfo.setOnClickListener(this); 61 personinfo.setOnClickListener(this);
@@ -67,14 +66,14 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract @@ -67,14 +66,14 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract
67 user_mobile = view.findViewById(R.id.user_mobile); 66 user_mobile = view.findViewById(R.id.user_mobile);
68 tvExit = view.findViewById(R.id.tvExit); 67 tvExit = view.findViewById(R.id.tvExit);
69 tvExit.setOnClickListener(this); 68 tvExit.setOnClickListener(this);
70 - binding_state=view.findViewById(R.id.binding_state);  
71 - if(AppConfig.ISBINDING){ 69 + binding_state = view.findViewById(R.id.binding_state);
  70 + if (AppConfig.ISBINDING) {
72 binding_state.setText(""); 71 binding_state.setText("");
73 } 72 }
74 73
75 } 74 }
76 75
77 - private void setPersonInfo() { 76 + private void setPersonInfo() {
78 if (AppConfig.ISLOGIN) { 77 if (AppConfig.ISLOGIN) {
79 String url = AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_IMAGE); 78 String url = AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_IMAGE);
80 if (!TextUtils.isEmpty(url)) { 79 if (!TextUtils.isEmpty(url)) {
@@ -123,6 +122,9 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract @@ -123,6 +122,9 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract
123 case R.id.layout_cache: 122 case R.id.layout_cache:
124 clearMyCache(); 123 clearMyCache();
125 break; 124 break;
  125 + case R.id.layout_about:
  126 + WebViewActivity.getInstance(getActivity(),AppConfig.BASE_URL_ORDER+"About.html",-1);
  127 + break;
126 default: 128 default:
127 break; 129 break;
128 } 130 }
@@ -130,9 +132,9 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract @@ -130,9 +132,9 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract
130 132
131 private void clearMyCache() { 133 private void clearMyCache() {
132 134
133 - AlertDialog.Builder builder=new AlertDialog.Builder(getActivity()); 135 + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
134 try { 136 try {
135 - builder.setMessage("清理缓存"+CacheUtils.getCacheSize(getActivity())+"") 137 + builder.setMessage("清理缓存" + CacheUtils.getCacheSize(getActivity()) + "")
136 .setPositiveButton("取消", new DialogInterface.OnClickListener() { 138 .setPositiveButton("取消", new DialogInterface.OnClickListener() {
137 @Override 139 @Override
138 public void onClick(DialogInterface dialogInterface, int i) { 140 public void onClick(DialogInterface dialogInterface, int i) {
app/src/main/res/layout/activity_web_view.xml
@@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
39 </RelativeLayout> 39 </RelativeLayout>
40 40
41 <LinearLayout 41 <LinearLayout
42 - android:id="@+id/binding_success" 42 + android:id="@+id/binding_success1"
43 android:layout_width="match_parent" 43 android:layout_width="match_parent"
44 android:layout_height="wrap_content" 44 android:layout_height="wrap_content"
45 android:gravity="center" 45 android:gravity="center"
@@ -122,6 +122,9 @@ @@ -122,6 +122,9 @@
122 <com.share.mvpsdk.widgets.NestedScrollWebView 122 <com.share.mvpsdk.widgets.NestedScrollWebView
123 android:layout_width="match_parent" 123 android:layout_width="match_parent"
124 android:layout_height="match_parent" 124 android:layout_height="match_parent"
  125 + android:layout_marginLeft="20dp"
  126 + android:layout_marginRight="20dp"
  127 + android:layout_marginTop="10dp"
125 android:id="@+id/nesteScrollWebView" 128 android:id="@+id/nesteScrollWebView"
126 ></com.share.mvpsdk.widgets.NestedScrollWebView> 129 ></com.share.mvpsdk.widgets.NestedScrollWebView>
127 130
app/src/main/res/layout/activity_webview.xml
@@ -1,128 +0,0 @@ @@ -1,128 +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 - android:background="@color/bgColor">  
7 - <RelativeLayout  
8 - android:layout_width="match_parent"  
9 - android:background="@color/back_top"  
10 - android:layout_height="?android:actionBarSize"  
11 - android:orientation="horizontal"  
12 - >  
13 - <ImageView  
14 - android:id="@+id/close_btn"  
15 - android:layout_width="wrap_content"  
16 - android:layout_height="match_parent"  
17 - android:gravity="center"  
18 - android:paddingLeft="@dimen/size_dp_15"  
19 - android:src="@drawable/back"  
20 - android:paddingRight="@dimen/size_dp_15"  
21 - android:textColor="@color/textColor"  
22 - android:textSize="@dimen/textSize16" />  
23 - <TextView  
24 - android:id="@+id/title_web"  
25 - android:layout_width="wrap_content"  
26 - android:layout_height="wrap_content"  
27 - android:text="订购中心"  
28 - android:textSize="@dimen/txtsize_title"  
29 - android:layout_centerInParent="true"  
30 - android:visibility="gone"  
31 - android:textColor="@color/textColor"  
32 -  
33 - />  
34 -  
35 - </RelativeLayout>  
36 -  
37 - <ProgressBar  
38 - android:id="@+id/pb_web"  
39 - style="?android:attr/progressBarStyleHorizontal"  
40 - android:layout_width="match_parent"  
41 - android:layout_height="3dp"  
42 - android:progressDrawable="@drawable/web_progress_bar_bg"  
43 - android:visibility="gone"/>  
44 -  
45 - <LinearLayout  
46 - android:id="@+id/binding_success1"  
47 - android:layout_width="match_parent"  
48 - android:layout_height="wrap_content"  
49 - android:gravity="center"  
50 - android:background="@color/white"  
51 - android:layout_marginLeft="20dp"  
52 - android:padding="30dp"  
53 - android:layout_marginRight="20dp"  
54 -  
55 - >  
56 -  
57 - <ImageView  
58 - android:layout_width="40dp"  
59 - android:layout_height="40dp"  
60 - android:background="@drawable/success_big" />  
61 -  
62 - <TextView  
63 - android:layout_width="wrap_content"  
64 - android:layout_height="match_parent"  
65 - android:layout_marginLeft="20dp"  
66 - android:text="绑定成功"  
67 - android:gravity="center"  
68 - android:textColor="@color/textColor"  
69 - android:textSize="@dimen/txtsize_headline" />  
70 -  
71 - </LinearLayout>  
72 - <LinearLayout  
73 - android:id="@+id/binding_success2"  
74 - android:visibility="gone"  
75 - android:layout_width="match_parent"  
76 - android:layout_height="wrap_content"  
77 - android:gravity="center"  
78 - android:background="@color/white"  
79 - android:layout_marginLeft="20dp"  
80 - android:padding="30dp"  
81 - android:orientation="vertical"  
82 - android:layout_marginRight="20dp"  
83 -  
84 - >  
85 - <TextView  
86 - android:id="@+id/tv_info"  
87 - android:layout_width="wrap_content"  
88 - android:layout_height="match_parent"  
89 - android:layout_marginLeft="20dp"  
90 - android:text="生成孩子“汇作业”账号为:sz1803081515,初始密码为:sz1803081515(与账号相同)。孩子可以下载“汇作业”app进行使用"  
91 - android:gravity="center"  
92 - android:textColor="@color/textColor"  
93 - android:textSize="@dimen/txtsize_headline" />  
94 - <LinearLayout  
95 - android:layout_width="match_parent"  
96 - android:layout_height="wrap_content"  
97 - android:layout_marginTop="10dp"  
98 - android:gravity="center"  
99 - >  
100 - <TextView  
101 - android:layout_width="wrap_content"  
102 - android:layout_height="match_parent"  
103 - android:layout_marginLeft="20dp"  
104 - android:text="下载地址:"  
105 - android:textColor="@color/textColor"  
106 - android:textSize="@dimen/txtsize_headline" />  
107 - <TextView  
108 - android:id="@+id/zuoye"  
109 - android:layout_width="wrap_content"  
110 - android:layout_height="match_parent"  
111 - android:layout_marginLeft="20dp"  
112 - android:text="汇作业"  
113 - android:gravity="center"  
114 - android:textColor="@color/textBlue"  
115 - android:textSize="@dimen/txtsize_headline" />  
116 - </LinearLayout>  
117 -  
118 - </LinearLayout>  
119 - <com.share.mvpsdk.widgets.NestedScrollWebView  
120 - android:id="@+id/webView"  
121 - android:layout_height="match_parent"  
122 - android:layout_width="match_parent"  
123 - android:layout_marginTop="20dp"  
124 - android:layout_marginRight="20dp"  
125 - android:layout_marginLeft="20dp"  
126 - />  
127 -  
128 -</LinearLayout>  
app/src/main/res/layout/dialog_view.xml
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 - android:layout_width="300dp" 3 + android:layout_width="260dp"
4 android:layout_gravity="center" 4 android:layout_gravity="center"
5 android:layout_height="wrap_content" 5 android:layout_height="wrap_content"
6 android:background="#00000000" 6 android:background="#00000000"
@@ -8,11 +8,12 @@ @@ -8,11 +8,12 @@
8 8
9 <TextView 9 <TextView
10 android:id="@+id/dialog_info" 10 android:id="@+id/dialog_info"
11 - android:layout_width="300dp"  
12 - android:layout_height="200dp" 11 + android:layout_width="260dp"
  12 + android:layout_height="180dp"
13 android:gravity="center" 13 android:gravity="center"
14 - android:textSize="@dimen/txtsize_headline" 14 + android:textSize="@dimen/sp_18"
15 android:layout_gravity="center" 15 android:layout_gravity="center"
  16 + android:padding="@dimen/size_dp_10"
16 android:background="@drawable/rudiobtn_white" /> 17 android:background="@drawable/rudiobtn_white" />
17 18
18 <LinearLayout 19 <LinearLayout
@@ -22,22 +23,22 @@ @@ -22,22 +23,22 @@
22 23
23 <TextView 24 <TextView
24 android:id="@+id/cancel_btn" 25 android:id="@+id/cancel_btn"
25 - android:layout_width="140dp" 26 + android:layout_width="120dp"
26 android:layout_height="40dp" 27 android:layout_height="40dp"
27 android:gravity="center" 28 android:gravity="center"
28 android:textColor="@color/white" 29 android:textColor="@color/white"
29 - android:textSize="@dimen/txtsize_title" 30 + android:textSize="@dimen/sp_16"
30 android:background="@drawable/rudiobtn" 31 android:background="@drawable/rudiobtn"
31 android:text="取消" /> 32 android:text="取消" />
32 33
33 <TextView 34 <TextView
34 android:id="@+id/right_btn" 35 android:id="@+id/right_btn"
35 android:layout_marginLeft="20dp" 36 android:layout_marginLeft="20dp"
36 - android:layout_width="140dp" 37 + android:layout_width="120dp"
37 android:layout_height="40dp" 38 android:layout_height="40dp"
38 android:gravity="center" 39 android:gravity="center"
39 android:textColor="@color/white" 40 android:textColor="@color/white"
40 - android:textSize="@dimen/txtsize_title" 41 + android:textSize="@dimen/sp_16"
41 android:background="@drawable/rudiobtn" 42 android:background="@drawable/rudiobtn"
42 android:text="确定" /> 43 android:text="确定" />
43 </LinearLayout> 44 </LinearLayout>
app/src/main/res/layout/fragment_mine.xml
@@ -299,6 +299,7 @@ @@ -299,6 +299,7 @@
299 android:layout_marginRight="15dp" 299 android:layout_marginRight="15dp"
300 android:background="@color/bottomline" /> 300 android:background="@color/bottomline" />
301 <LinearLayout 301 <LinearLayout
  302 + android:id="@+id/layout_about"
302 android:layout_width="match_parent" 303 android:layout_width="match_parent"
303 android:layout_height="?android:actionBarSize" 304 android:layout_height="?android:actionBarSize"
304 android:gravity="center_vertical" 305 android:gravity="center_vertical"