Commit d7705eadded73e7562b40862e1db4c3b10102099
1 parent
5f67acc0
Exists in
yxb_dev
and in
2 other branches
no message
Showing
10 changed files
with
39 additions
and
156 deletions
Show diff stats
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<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 | |
| ... | ... | @@ -117,7 +121,7 @@ public class WebViewActivity extends BaseCompatActivity { |
| 117 | 121 | |
| 118 | 122 | @Override |
| 119 | 123 | protected int getLayoutId() { |
| 120 | - return R.layout.activity_webview; | |
| 124 | + return R.layout.activity_web_view; | |
| 121 | 125 | } |
| 122 | 126 | |
| 123 | 127 | @Override | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
| ... | ... | @@ -16,7 +16,6 @@ import com.makeramen.roundedimageview.RoundedImageView; |
| 16 | 16 | import com.share.mvpsdk.base.BasePresenter; |
| 17 | 17 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; |
| 18 | 18 | import com.share.mvpsdk.utils.CacheUtils; |
| 19 | -import com.share.mvpsdk.utils.ToastUtils; | |
| 20 | 19 | import com.shunzhi.parent.AppConfig; |
| 21 | 20 | import com.shunzhi.parent.AppContext; |
| 22 | 21 | import com.shunzhi.parent.R; |
| ... | ... | @@ -29,13 +28,11 @@ import com.shunzhi.parent.ui.activity.PersonInfoActivity; |
| 29 | 28 | import com.shunzhi.parent.ui.activity.mywebview.WebViewActivity; |
| 30 | 29 | import com.shunzhi.parent.ui.activity.orderdetail.OrderDetailActivity; |
| 31 | 30 | |
| 32 | -import static java.util.ResourceBundle.clearCache; | |
| 33 | - | |
| 34 | 31 | public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract.LoginPresenter, LoginAndRegisterContract.ILoginModel> |
| 35 | 32 | implements MineContract.IMineView, View.OnClickListener { |
| 36 | - LinearLayout childlayout, personinfo, layout_orderDetail, layout_order,layout_cache; | |
| 33 | + LinearLayout childlayout, personinfo, layout_orderDetail, layout_order, layout_cache, layout_about; | |
| 37 | 34 | RoundedImageView user_photo; |
| 38 | - TextView user_name, user_mobile, tvExit,binding_state; | |
| 35 | + TextView user_name, user_mobile, tvExit, binding_state; | |
| 39 | 36 | |
| 40 | 37 | @NonNull |
| 41 | 38 | @Override |
| ... | ... | @@ -54,7 +51,9 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract |
| 54 | 51 | personinfo = view.findViewById(R.id.personinfo); |
| 55 | 52 | layout_order = view.findViewById(R.id.layout_order); |
| 56 | 53 | layout_orderDetail = view.findViewById(R.id.layout_orderDetail); |
| 57 | - layout_cache=view.findViewById(R.id.layout_cache); | |
| 54 | + layout_cache = view.findViewById(R.id.layout_cache); | |
| 55 | + layout_about = view.findViewById(R.id.layout_about); | |
| 56 | + layout_about.setOnClickListener(this); | |
| 58 | 57 | layout_cache.setOnClickListener(this); |
| 59 | 58 | childlayout.setOnClickListener(this); |
| 60 | 59 | personinfo.setOnClickListener(this); |
| ... | ... | @@ -65,17 +64,17 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract |
| 65 | 64 | user_mobile = view.findViewById(R.id.user_mobile); |
| 66 | 65 | tvExit = view.findViewById(R.id.tvExit); |
| 67 | 66 | tvExit.setOnClickListener(this); |
| 68 | - binding_state=view.findViewById(R.id.binding_state); | |
| 69 | - if(AppConfig.ISBINDING){ | |
| 67 | + binding_state = view.findViewById(R.id.binding_state); | |
| 68 | + if (AppConfig.ISBINDING) { | |
| 70 | 69 | binding_state.setText(""); |
| 71 | 70 | } |
| 72 | 71 | |
| 73 | 72 | } |
| 74 | 73 | |
| 75 | - private void setPersonInfo() { | |
| 74 | + private void setPersonInfo() { | |
| 76 | 75 | if (AppConfig.ISLOGIN) { |
| 77 | 76 | String url = AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_IMAGE); |
| 78 | - ToastUtils.showToast(url); | |
| 77 | +// ToastUtils.showToast(url); | |
| 79 | 78 | if (!TextUtils.isEmpty(url)) { |
| 80 | 79 | Glide.with(getActivity()).load(url).asBitmap().error(R.drawable.test).centerCrop().into(user_photo); |
| 81 | 80 | } else { |
| ... | ... | @@ -119,6 +118,9 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract |
| 119 | 118 | case R.id.layout_cache: |
| 120 | 119 | clearMyCache(); |
| 121 | 120 | break; |
| 121 | + case R.id.layout_about: | |
| 122 | + WebViewActivity.getInstance(getActivity(),AppConfig.BASE_URL_ORDER+"About.html",-1); | |
| 123 | + break; | |
| 122 | 124 | default: |
| 123 | 125 | break; |
| 124 | 126 | } |
| ... | ... | @@ -126,9 +128,9 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract |
| 126 | 128 | |
| 127 | 129 | private void clearMyCache() { |
| 128 | 130 | |
| 129 | - AlertDialog.Builder builder=new AlertDialog.Builder(getActivity()); | |
| 131 | + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); | |
| 130 | 132 | try { |
| 131 | - builder.setMessage("清理缓存"+CacheUtils.getCacheSize(getActivity())+"") | |
| 133 | + builder.setMessage("清理缓存" + CacheUtils.getCacheSize(getActivity()) + "") | |
| 132 | 134 | .setPositiveButton("取消", new DialogInterface.OnClickListener() { |
| 133 | 135 | @Override |
| 134 | 136 | 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" | ... | ... |