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 77 }
78 78 mIView.showBanners(guangGaoBeanList);
79 79 } else {
80   - ToastUtils.showToast(jsonObject.get("message").getAsString());
  80 +// ToastUtils.showToast(jsonObject.get("message").getAsString());
81 81 }
82 82 }
83 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 73 }
74 74 mIView.showBanners(guangGaoBeanList);
75 75 }else {
76   - ToastUtils.showToast(jsonObject.get("message").getAsString());
  76 +// ToastUtils.showToast(jsonObject.get("message").getAsString());
77 77 }
78 78 }
79 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 71 @Override
72 72 public void accept(JsonObject jsonObject) throws Exception {
73 73 ToastUtils.showToast("绑定孩子成功");
74   - Log.e("asdasda", jsonObject.get("data").toString());
75 74 if (jsonObject.get("data").toString().equals("null")) {
76 75 mIView.addChildSuccess("", "");
77 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 101 right_btn.setOnClickListener(new View.OnClickListener() {
102 102 @Override
103 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 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 40 Intent intent = new Intent(context, WebViewActivity.class);
41 41 intent.putExtra("url", url);
42 42 intent.putExtra("type", type);
  43 + intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
43 44 context.startActivity(intent);
44 45 }
45 46  
... ... @@ -57,7 +58,7 @@ public class WebViewActivity extends BaseCompatActivity {
57 58 @Override
58 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 63 binding_success = findViewById(R.id.binding_success1);
63 64  
... ... @@ -78,7 +79,7 @@ public class WebViewActivity extends BaseCompatActivity {
78 79  
79 80 nesteScrollWebView = findViewById(R.id.nesteScrollWebView);
80 81  
81   - nesteScrollWebView = findViewById(R.id.webView);
  82 +// nesteScrollWebView = findViewById(R.id.webView);
82 83  
83 84 pvWeb = findViewById(R.id.pb_web);
84 85 type = getIntent().getIntExtra("type", 0);
... ... @@ -106,6 +107,9 @@ public class WebViewActivity extends BaseCompatActivity {
106 107 binding_success.setVisibility(View.GONE);
107 108 binding_success2.setVisibility(View.GONE);
108 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 120  
117 121 @Override
118 122 protected int getLayoutId() {
119   - return R.layout.activity_webview;
  123 + return R.layout.activity_web_view;
120 124 }
121 125  
122 126 @Override
... ...
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
... ... @@ -17,7 +17,6 @@ import com.netease.nimlib.sdk.NIMClient;
17 17 import com.share.mvpsdk.base.BasePresenter;
18 18 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment;
19 19 import com.share.mvpsdk.utils.CacheUtils;
20   -import com.share.mvpsdk.utils.ToastUtils;
21 20 import com.shunzhi.parent.AppConfig;
22 21 import com.shunzhi.parent.AppContext;
23 22 import com.shunzhi.parent.R;
... ... @@ -31,13 +30,11 @@ import com.shunzhi.parent.ui.activity.mywebview.WebViewActivity;
31 30 import com.shunzhi.parent.ui.activity.orderdetail.OrderDetailActivity;
32 31 import com.shunzhi.parent.util.GlideUtils;
33 32  
34   -import static java.util.ResourceBundle.clearCache;
35   -
36 33 public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract.LoginPresenter, LoginAndRegisterContract.ILoginModel>
37 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 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 39 @NonNull
43 40 @Override
... ... @@ -56,7 +53,9 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract
56 53 personinfo = view.findViewById(R.id.personinfo);
57 54 layout_order = view.findViewById(R.id.layout_order);
58 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 59 layout_cache.setOnClickListener(this);
61 60 childlayout.setOnClickListener(this);
62 61 personinfo.setOnClickListener(this);
... ... @@ -67,14 +66,14 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract
67 66 user_mobile = view.findViewById(R.id.user_mobile);
68 67 tvExit = view.findViewById(R.id.tvExit);
69 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 71 binding_state.setText("");
73 72 }
74 73  
75 74 }
76 75  
77   - private void setPersonInfo() {
  76 + private void setPersonInfo() {
78 77 if (AppConfig.ISLOGIN) {
79 78 String url = AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_IMAGE);
80 79 if (!TextUtils.isEmpty(url)) {
... ... @@ -123,6 +122,9 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract
123 122 case R.id.layout_cache:
124 123 clearMyCache();
125 124 break;
  125 + case R.id.layout_about:
  126 + WebViewActivity.getInstance(getActivity(),AppConfig.BASE_URL_ORDER+"About.html",-1);
  127 + break;
126 128 default:
127 129 break;
128 130 }
... ... @@ -130,9 +132,9 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract
130 132  
131 133 private void clearMyCache() {
132 134  
133   - AlertDialog.Builder builder=new AlertDialog.Builder(getActivity());
  135 + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
134 136 try {
135   - builder.setMessage("清理缓存"+CacheUtils.getCacheSize(getActivity())+"")
  137 + builder.setMessage("清理缓存" + CacheUtils.getCacheSize(getActivity()) + "")
136 138 .setPositiveButton("取消", new DialogInterface.OnClickListener() {
137 139 @Override
138 140 public void onClick(DialogInterface dialogInterface, int i) {
... ...
app/src/main/res/layout/activity_web_view.xml
... ... @@ -39,7 +39,7 @@
39 39 </RelativeLayout>
40 40  
41 41 <LinearLayout
42   - android:id="@+id/binding_success"
  42 + android:id="@+id/binding_success1"
43 43 android:layout_width="match_parent"
44 44 android:layout_height="wrap_content"
45 45 android:gravity="center"
... ... @@ -122,6 +122,9 @@
122 122 <com.share.mvpsdk.widgets.NestedScrollWebView
123 123 android:layout_width="match_parent"
124 124 android:layout_height="match_parent"
  125 + android:layout_marginLeft="20dp"
  126 + android:layout_marginRight="20dp"
  127 + android:layout_marginTop="10dp"
125 128 android:id="@+id/nesteScrollWebView"
126 129 ></com.share.mvpsdk.widgets.NestedScrollWebView>
127 130  
... ...
app/src/main/res/layout/activity_webview.xml
... ... @@ -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 1 <?xml version="1.0" encoding="utf-8"?>
2 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3   - android:layout_width="300dp"
  3 + android:layout_width="260dp"
4 4 android:layout_gravity="center"
5 5 android:layout_height="wrap_content"
6 6 android:background="#00000000"
... ... @@ -8,11 +8,12 @@
8 8  
9 9 <TextView
10 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 13 android:gravity="center"
14   - android:textSize="@dimen/txtsize_headline"
  14 + android:textSize="@dimen/sp_18"
15 15 android:layout_gravity="center"
  16 + android:padding="@dimen/size_dp_10"
16 17 android:background="@drawable/rudiobtn_white" />
17 18  
18 19 <LinearLayout
... ... @@ -22,22 +23,22 @@
22 23  
23 24 <TextView
24 25 android:id="@+id/cancel_btn"
25   - android:layout_width="140dp"
  26 + android:layout_width="120dp"
26 27 android:layout_height="40dp"
27 28 android:gravity="center"
28 29 android:textColor="@color/white"
29   - android:textSize="@dimen/txtsize_title"
  30 + android:textSize="@dimen/sp_16"
30 31 android:background="@drawable/rudiobtn"
31 32 android:text="取消" />
32 33  
33 34 <TextView
34 35 android:id="@+id/right_btn"
35 36 android:layout_marginLeft="20dp"
36   - android:layout_width="140dp"
  37 + android:layout_width="120dp"
37 38 android:layout_height="40dp"
38 39 android:gravity="center"
39 40 android:textColor="@color/white"
40   - android:textSize="@dimen/txtsize_title"
  41 + android:textSize="@dimen/sp_16"
41 42 android:background="@drawable/rudiobtn"
42 43 android:text="确定" />
43 44 </LinearLayout>
... ...
app/src/main/res/layout/fragment_mine.xml
... ... @@ -299,6 +299,7 @@
299 299 android:layout_marginRight="15dp"
300 300 android:background="@color/bottomline" />
301 301 <LinearLayout
  302 + android:id="@+id/layout_about"
302 303 android:layout_width="match_parent"
303 304 android:layout_height="?android:actionBarSize"
304 305 android:gravity="center_vertical"
... ...