Commit f62d7dcc7b3e383cd1faebcbac48aca2709b65da
1 parent
d25fb468
Exists in
yxb_dev
and in
1 other branch
no message
Showing
15 changed files
with
110 additions
and
99 deletions
 
Show diff stats
.idea/misc.xml
| ... | ... | @@ -24,7 +24,7 @@ | 
| 24 | 24 | </value> | 
| 25 | 25 | </option> | 
| 26 | 26 | </component> | 
| 27 | - <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK"> | |
| 27 | + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK"> | |
| 28 | 28 | <output url="file://$PROJECT_DIR$/build/classes" /> | 
| 29 | 29 | </component> | 
| 30 | 30 | <component name="ProjectType"> | ... | ... | 
app/build.gradle
| ... | ... | @@ -16,8 +16,8 @@ android { | 
| 16 | 16 | applicationId "com.shunzhi.parent" | 
| 17 | 17 | minSdkVersion 16 | 
| 18 | 18 | targetSdkVersion 26 | 
| 19 | - versionCode 102 | |
| 20 | - versionName "1.0.2" | |
| 19 | + versionCode 104 | |
| 20 | + versionName "1.0.4" | |
| 21 | 21 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | 
| 22 | 22 | javaCompileOptions { | 
| 23 | 23 | annotationProcessorOptions { | ... | ... | 
app/src/main/java/com/shunzhi/parent/contract/loginandregister/LoginAndRegisterContract.java
app/src/main/java/com/shunzhi/parent/presenter/loginandregister/LoginAndRegisterPresenter.java
| ... | ... | @@ -50,7 +50,7 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | 
| 50 | 50 | @Override | 
| 51 | 51 | public void accept(JsonObject jsonObject) throws Exception { | 
| 52 | 52 | try { | 
| 53 | -// Log.d("66666","jsonObject="+jsonObject); | |
| 53 | +// Log.d("66666","getLoginResult="+jsonObject); | |
| 54 | 54 | if (jsonObject != null && !TextUtils.isEmpty(jsonObject.get("access_token").getAsString())) { | 
| 55 | 55 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.ACCESS_TOKEN, jsonObject.get("access_token").getAsString()); | 
| 56 | 56 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, loginName); | 
| ... | ... | @@ -62,6 +62,7 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | 
| 62 | 62 | } | 
| 63 | 63 | } catch (Exception e) { | 
| 64 | 64 | e.printStackTrace(); | 
| 65 | + getUserInfo(loginName, -1, "登录失败"); | |
| 65 | 66 | ToastUtils.showToast("登录失败:" + e.toString()); | 
| 66 | 67 | } | 
| 67 | 68 | } | 
| ... | ... | @@ -106,7 +107,7 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | 
| 106 | 107 | //TODO 注册成功返回 | 
| 107 | 108 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, adminName); | 
| 108 | 109 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_PWD, password); | 
| 109 | - mIView.getUserInfo(1); | |
| 110 | + mIView.getUserInfo(1,""); | |
| 110 | 111 | } | 
| 111 | 112 | }, new Consumer<Throwable>() { | 
| 112 | 113 | @Override | 
| ... | ... | @@ -157,7 +158,7 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | 
| 157 | 158 | mRxManager.register(mIModel.getUserInfo(mobile, school_id, captcha).subscribe(new Consumer<UserInfo>() { | 
| 158 | 159 | @Override | 
| 159 | 160 | public void accept(UserInfo userInfo) throws Exception { | 
| 160 | - Log.d("77777","userInfo="+userInfo); | |
| 161 | +// Log.d("77777","userInfo="+userInfo); | |
| 161 | 162 | if (userInfo != null) { | 
| 162 | 163 | CurrentBean currentBean = userInfo.getData(); | 
| 163 | 164 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, currentBean.getMobile()); | 
| ... | ... | @@ -180,7 +181,7 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | 
| 180 | 181 | |
| 181 | 182 | } else { | 
| 182 | 183 | LoginAndRegistFragment.progressDialog.dismiss(); | 
| 183 | - ToastUtils.showToast("错误"); | |
| 184 | + ToastUtils.showToast(userInfo.getMessage()); | |
| 184 | 185 | } | 
| 185 | 186 | } | 
| 186 | 187 | }, new Consumer<Throwable>() { | 
| ... | ... | @@ -208,10 +209,12 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | 
| 208 | 209 | mRxManager.register(mIModel.nimLoginResult(account, password).subscribe(new Consumer<NIMLoginResultBean>() { | 
| 209 | 210 | @Override | 
| 210 | 211 | public void accept(NIMLoginResultBean bean) throws Exception { | 
| 211 | - Log.d("77777","NIMLoginResultBean="+bean); | |
| 212 | +// Log.d("77777","NIMLoginResultBean="+bean); | |
| 212 | 213 | if (bean.isSuccess()) { | 
| 213 | 214 | AppConfig.ISLOGIN = true; | 
| 214 | - mIView.getUserInfo(0); | |
| 215 | + mIView.getUserInfo(0,""); | |
| 216 | + }else { | |
| 217 | + mIView.getUserInfo(-1,"通讯登录失败:"+bean.getResultCode()); | |
| 215 | 218 | } | 
| 216 | 219 | } | 
| 217 | 220 | })); | 
| ... | ... | @@ -222,12 +225,13 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | 
| 222 | 225 | @Override | 
| 223 | 226 | public void accept(JsonObject jsonObject) throws Exception { | 
| 224 | 227 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, adminName); | 
| 225 | - mIView.getUserInfo(2); | |
| 228 | + mIView.getUserInfo(2,""); | |
| 226 | 229 | } | 
| 227 | 230 | }, new Consumer<Throwable>() { | 
| 228 | 231 | @Override | 
| 229 | 232 | public void accept(Throwable throwable) throws Exception { | 
| 230 | - OkHttpExceptionUtil.handOkHttpException((HttpException) throwable); | |
| 233 | + mIView.getUserInfo(-1,throwable.getMessage()); | |
| 234 | +// OkHttpExceptionUtil.handOkHttpException((HttpException) throwable); | |
| 231 | 235 | } | 
| 232 | 236 | })); | 
| 233 | 237 | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/MainActivity.java
| ... | ... | @@ -16,6 +16,7 @@ import com.shunzhi.parent.R; | 
| 16 | 16 | import com.shunzhi.parent.bean.message.PHMessage; | 
| 17 | 17 | import com.shunzhi.parent.bean.message.PHMessageDao; | 
| 18 | 18 | import com.shunzhi.parent.manager.MessageManager; | 
| 19 | +import com.shunzhi.parent.manager.UpdateManager; | |
| 19 | 20 | import com.shunzhi.parent.ui.fragment.ConsultFragment; | 
| 20 | 21 | import com.shunzhi.parent.ui.fragment.MineFragment; | 
| 21 | 22 | import com.shunzhi.parent.ui.fragment.ReportFragment; | 
| ... | ... | @@ -45,7 +46,7 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. | 
| 45 | 46 | PermissionUtils.requestMultiPermissions(this, this); | 
| 46 | 47 | bottom_navigationView = findViewById(R.id.bottom_navigationView); | 
| 47 | 48 | BottomNavigationViewHelper.disableShiftMode(bottom_navigationView); | 
| 48 | - | |
| 49 | + UpdateManager.getInstance().setContext(this).isUpdate(false); | |
| 49 | 50 | bottom_navigationView.setSelectedItemId(R.id.bottom_navigationView); | 
| 50 | 51 | bottom_navigationView.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() { | 
| 51 | 52 | @Override | 
| ... | ... | @@ -105,6 +106,7 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. | 
| 105 | 106 | else fragmentTransaction.hide(fragments[i]); | 
| 106 | 107 | } | 
| 107 | 108 | if (index == CONSULT_INDEX) consultFragment.refresh(); | 
| 109 | + if (index==REPORT_INDEX)reportFragment.refreshChild(); | |
| 108 | 110 | // else if (index == CEPING_INDEX) cePingFragment.refresh(); | 
| 109 | 111 | fragmentTransaction.commit(); | 
| 110 | 112 | } | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/activity/mywebview/WebViewActivity.java
| ... | ... | @@ -101,7 +101,7 @@ public class WebViewActivity extends BaseCompatActivity { | 
| 101 | 101 | if (token != null && !"".equals(token) && !TextUtils.isEmpty(token)) { | 
| 102 | 102 | url = url + "&Token=" + token; | 
| 103 | 103 | } | 
| 104 | - Log.d("66666","url="+url); | |
| 104 | +// Log.d("66666","url="+url); | |
| 105 | 105 | if (type == AppConfig.BINDING_SUCCESS_HEZUO) { | 
| 106 | 106 | binding_success.setVisibility(View.VISIBLE); | 
| 107 | 107 | binding_success2.setVisibility(View.GONE); | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java
| ... | ... | @@ -101,8 +101,6 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | 
| 101 | 101 | videoplayer.replayTextView.setVisibility(View.GONE); | 
| 102 | 102 | videoplayer.backButton.setVisibility(View.GONE); | 
| 103 | 103 | |
| 104 | - mPresenter.getBanners("2", AppContext.getInstance().district); | |
| 105 | - | |
| 106 | 104 | initBroadCast(); | 
| 107 | 105 | |
| 108 | 106 | initListeners(); | 
| ... | ... | @@ -114,6 +112,9 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | 
| 114 | 112 | // ToastUtils.showToast("scrollX="+nesteScrollView.getMeasuredHeight()+"scrollY="+scrollY+"oldScrollX="+oldScrollX+"oldScrollY="+oldScrollY+"layout_consult="+layout_consult.getMeasuredHeight()); | 
| 115 | 113 | } | 
| 116 | 114 | }); | 
| 115 | + | |
| 116 | + mPresenter.getBanners("2", AppContext.getInstance().district); | |
| 117 | + | |
| 117 | 118 | } | 
| 118 | 119 | |
| 119 | 120 | private void initRecycler() { | 
| ... | ... | @@ -213,7 +214,6 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | 
| 213 | 214 | |
| 214 | 215 | } | 
| 215 | 216 | |
| 216 | - | |
| 217 | 217 | private BroadcastReceiver broadcastReceiver = new BroadcastReceiver() { | 
| 218 | 218 | @Override | 
| 219 | 219 | public void onReceive(Context context, Intent intent) { | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/fragment/ReportFragment.java
| ... | ... | @@ -15,6 +15,7 @@ import android.text.Spannable; | 
| 15 | 15 | import android.text.SpannableString; | 
| 16 | 16 | import android.text.TextUtils; | 
| 17 | 17 | import android.text.style.ForegroundColorSpan; | 
| 18 | +import android.util.Log; | |
| 18 | 19 | import android.view.Menu; | 
| 19 | 20 | import android.view.MenuItem; | 
| 20 | 21 | import android.view.View; | 
| ... | ... | @@ -43,14 +44,12 @@ public class ReportFragment extends BaseMVPCompatFragment<MyChildContract.MyChil | 
| 43 | 44 | implements MyChildContract.IMyChildView, View.OnClickListener { | 
| 44 | 45 | ViewPager viewPager; | 
| 45 | 46 | |
| 46 | - TextView tvDate, tvShaiXuan, tvNoData, tvName; | |
| 47 | + TextView tvDate, tvShaiXuan, tvName; | |
| 47 | 48 | |
| 48 | 49 | MyFragmentAdapter myFragmentAdapter = null; | 
| 49 | 50 | |
| 50 | 51 | TabLayout tabLayout; | 
| 51 | 52 | |
| 52 | - RelativeLayout rl_noData; | |
| 53 | - | |
| 54 | 53 | ChengZhangFragment chengZhangFragment1 = null, chengZhangFragment2 = null;//成长、报告页面 | 
| 55 | 54 | |
| 56 | 55 | ShaiXuanPop shaiXuanPop = null; | 
| ... | ... | @@ -70,10 +69,7 @@ public class ReportFragment extends BaseMVPCompatFragment<MyChildContract.MyChil | 
| 70 | 69 | tvDate = view.findViewById(R.id.tvDate); | 
| 71 | 70 | tvName = view.findViewById(R.id.tvName); | 
| 72 | 71 | tvShaiXuan = view.findViewById(R.id.tvShaiXuan); | 
| 73 | - tvNoData = view.findViewById(R.id.tvNoData); | |
| 74 | - setTextColor(); | |
| 75 | 72 | tabLayout = view.findViewById(R.id.tabLayout); | 
| 76 | - rl_noData = view.findViewById(R.id.rl_noData); | |
| 77 | 73 | tvName.setOnClickListener(this); | 
| 78 | 74 | tvName.setEllipsize(TextUtils.TruncateAt.END); | 
| 79 | 75 | tvShaiXuan.setOnClickListener(this); | 
| ... | ... | @@ -100,21 +96,14 @@ public class ReportFragment extends BaseMVPCompatFragment<MyChildContract.MyChil | 
| 100 | 96 | |
| 101 | 97 | } | 
| 102 | 98 | }); | 
| 103 | - | |
| 104 | - } | |
| 105 | - | |
| 106 | - private void setTextColor() { | |
| 107 | - String text="如需使用该模块,请先前往\n个人中心—我的孩子\n绑定孩子账号"; | |
| 108 | - Spannable span = new SpannableString(text); | |
| 109 | - span.setSpan(new ForegroundColorSpan(getResources().getColor(R.color.xueqing_blue)),13,22,Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); | |
| 110 | - tvNoData.setText(span); | |
| 99 | + //在viewpager初始化之后加载 | |
| 100 | + mPresenter.loadChildList(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.LOGIN_NAME), 0, ""); | |
| 111 | 101 | } | 
| 112 | 102 | |
| 113 | 103 | |
| 114 | 104 | @Override | 
| 115 | 105 | public void onResume() { | 
| 116 | 106 | super.onResume(); | 
| 117 | - mPresenter.loadChildList(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.LOGIN_NAME), 0, ""); | |
| 118 | 107 | } | 
| 119 | 108 | |
| 120 | 109 | @Override | 
| ... | ... | @@ -122,7 +111,7 @@ public class ReportFragment extends BaseMVPCompatFragment<MyChildContract.MyChil | 
| 122 | 111 | switch (view.getId()) { | 
| 123 | 112 | case R.id.tvShaiXuan: | 
| 124 | 113 | if (null == shaiXuanPop) shaiXuanPop = new ShaiXuanPop(getActivity()); | 
| 125 | - chengZhangFragment2.showShaixuan(handler); | |
| 114 | + if (null!=chengZhangFragment2)chengZhangFragment2.showShaixuan(handler); | |
| 126 | 115 | break; | 
| 127 | 116 | case R.id.tvName: | 
| 128 | 117 | showChildName(); | 
| ... | ... | @@ -130,6 +119,10 @@ public class ReportFragment extends BaseMVPCompatFragment<MyChildContract.MyChil | 
| 130 | 119 | } | 
| 131 | 120 | } | 
| 132 | 121 | |
| 122 | + public void refreshChild(){ | |
| 123 | + mPresenter.loadChildList(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.LOGIN_NAME), 0, ""); | |
| 124 | + } | |
| 125 | + | |
| 133 | 126 | private void showChildName() { | 
| 134 | 127 | childMenu.show(); | 
| 135 | 128 | } | 
| ... | ... | @@ -188,11 +181,8 @@ public class ReportFragment extends BaseMVPCompatFragment<MyChildContract.MyChil | 
| 188 | 181 | childlist.addAll(list); | 
| 189 | 182 | |
| 190 | 183 | if (childlist == null || childlist.size() == 0) { | 
| 191 | - rl_noData.setVisibility(View.VISIBLE); | |
| 192 | - viewPager.setVisibility(View.GONE); | |
| 193 | - }else{ | |
| 194 | - rl_noData.setVisibility(View.GONE); | |
| 195 | - viewPager.setVisibility(View.VISIBLE); | |
| 184 | + if(null!=chengZhangFragment1)chengZhangFragment1.showNoData(); | |
| 185 | + if(null!=chengZhangFragment2)chengZhangFragment2.showNoData(); | |
| 196 | 186 | } | 
| 197 | 187 | if (TextUtils.isEmpty(currChildStr)) { | 
| 198 | 188 | if (childlist != null && childlist.size() > 0) { | 
| ... | ... | @@ -229,8 +219,8 @@ public class ReportFragment extends BaseMVPCompatFragment<MyChildContract.MyChil | 
| 229 | 219 | @Override | 
| 230 | 220 | public void showError(String error) { | 
| 231 | 221 | if (error.equals("访问的接口要求登录")) { | 
| 232 | - rl_noData.setVisibility(View.VISIBLE); | |
| 233 | - viewPager.setVisibility(View.GONE); | |
| 222 | + if(null!=chengZhangFragment1)chengZhangFragment1.showNoData(); | |
| 223 | + if(null!=chengZhangFragment2)chengZhangFragment2.showNoData(); | |
| 234 | 224 | } | 
| 235 | 225 | } | 
| 236 | 226 | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/fragment/loginandregistfragment/LoginAndRegistFragment.java
| ... | ... | @@ -139,7 +139,7 @@ public class LoginAndRegistFragment extends BaseMVPCompatFragment<LoginAndRegist | 
| 139 | 139 | |
| 140 | 140 | |
| 141 | 141 | @Override | 
| 142 | - public void getUserInfo(int type) { | |
| 142 | + public void getUserInfo(int type,String message) { | |
| 143 | 143 | progressDialog.dismiss(); | 
| 144 | 144 | if (type == 0) { | 
| 145 | 145 | startActivity(new Intent().setClass(getActivity(), MainActivity.class)); | 
| ... | ... | @@ -177,7 +177,7 @@ public class LoginAndRegistFragment extends BaseMVPCompatFragment<LoginAndRegist | 
| 177 | 177 | startActivity(new Intent().putExtra("type", "登录").setClass(getActivity(), LoginAndRegistActivity.class)); | 
| 178 | 178 | phoneNumber.setText(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.LOGIN_NAME)); | 
| 179 | 179 | password.setFocusable(true); | 
| 180 | - } | |
| 180 | + }else ToastUtils.showToast(message); | |
| 181 | 181 | |
| 182 | 182 | |
| 183 | 183 | } | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/fragment/report/ChengZhangFragment.java
| ... | ... | @@ -22,6 +22,8 @@ import android.widget.TextView; | 
| 22 | 22 | |
| 23 | 23 | import com.amy.monthweek.materialcalendarview.MonthWeekMaterialCalendarView; | 
| 24 | 24 | import com.google.gson.Gson; | 
| 25 | +import com.netease.nimlib.sdk.NIMClient; | |
| 26 | +import com.netease.nimlib.sdk.mixpush.NIMPushClient; | |
| 25 | 27 | import com.prolificinteractive.materialcalendarview.CalendarDay; | 
| 26 | 28 | import com.prolificinteractive.materialcalendarview.MaterialCalendarView; | 
| 27 | 29 | import com.share.mvpsdk.base.BasePresenter; | 
| ... | ... | @@ -83,6 +85,8 @@ public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.Rep | 
| 83 | 85 | |
| 84 | 86 | RelativeLayout rl_noData; | 
| 85 | 87 | |
| 88 | + TextView tvNoData; | |
| 89 | + | |
| 86 | 90 | @Override | 
| 87 | 91 | public int getLayoutId() { | 
| 88 | 92 | return R.layout.fragment_cheng_zhang; | 
| ... | ... | @@ -96,10 +100,10 @@ public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.Rep | 
| 96 | 100 | layout_kaoqin = view.findViewById(R.id.layout_kaoqin); | 
| 97 | 101 | layout_buka = view.findViewById(R.id.layout_buka); | 
| 98 | 102 | layout_qingjia = view.findViewById(R.id.layout_qingjia); | 
| 103 | + tvNoData=view.findViewById(R.id.tvNoData); | |
| 99 | 104 | calendarView_month_mode = view.findViewById(R.id.calendarView_month_mode); | 
| 100 | 105 | monthWeekMaterialCalendarView = view.findViewById(R.id.slidelayout); | 
| 101 | 106 | layout_chengzhang = view.findViewById(R.id.layout_chengzhang); | 
| 102 | - | |
| 103 | 107 | layout_kaoqin.setOnClickListener(this); | 
| 104 | 108 | layout_buka.setOnClickListener(this); | 
| 105 | 109 | layout_qingjia.setOnClickListener(this); | 
| ... | ... | @@ -180,10 +184,28 @@ public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.Rep | 
| 180 | 184 | |
| 181 | 185 | @Override | 
| 182 | 186 | public void onClick(View view) { | 
| 187 | + | |
| 188 | + switch (view.getId()) { | |
| 189 | + | |
| 190 | + case R.id.layout_kaoqin: | |
| 191 | +// ApplySigninActivity.getInstance(getActivity(), jsonStr); | |
| 192 | + showOrderPopu(); | |
| 193 | + break; | |
| 194 | + case R.id.layout_buka: | |
| 195 | +// ApplyReplaceCardActivity.getInstance(getActivity(), jsonStr); | |
| 196 | + showOrderPopu(); | |
| 197 | + break; | |
| 198 | + case R.id.layout_qingjia: | |
| 199 | + ToastUtils.showToast("正在努力开发中,敬请期待"); | |
| 200 | + break; | |
| 201 | + } | |
| 202 | + } | |
| 203 | + | |
| 204 | + private void showOrderPopu(){ | |
| 183 | 205 | if (childBean.getCount() == 0) { | 
| 184 | 206 | final PopupWindow popupWindow = new PopupWindow(); | 
| 185 | - popupWindow.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT); | |
| 186 | - popupWindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT); | |
| 207 | + popupWindow.setWidth(ViewGroup.LayoutParams.MATCH_PARENT); | |
| 208 | + popupWindow.setHeight(ViewGroup.LayoutParams.MATCH_PARENT); | |
| 187 | 209 | backgroundAlpha(0.5f); | 
| 188 | 210 | View view1 = LayoutInflater.from(getActivity()).inflate(R.layout.dialog_view, null); | 
| 189 | 211 | TextView dialog_info = view1.findViewById(R.id.dialog_info); | 
| ... | ... | @@ -226,21 +248,7 @@ public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.Rep | 
| 226 | 248 | return; | 
| 227 | 249 | |
| 228 | 250 | } | 
| 229 | - | |
| 230 | - switch (view.getId()) { | |
| 231 | - | |
| 232 | - case R.id.layout_kaoqin: | |
| 233 | - ApplySigninActivity.getInstance(getActivity(), jsonStr); | |
| 234 | - break; | |
| 235 | - case R.id.layout_buka: | |
| 236 | - ApplyReplaceCardActivity.getInstance(getActivity(), jsonStr); | |
| 237 | - break; | |
| 238 | - case R.id.layout_qingjia: | |
| 239 | - ToastUtils.showToast("正在努力开发中,敬请期待"); | |
| 240 | - break; | |
| 241 | - } | |
| 242 | 251 | } | 
| 243 | - | |
| 244 | 252 | @NonNull | 
| 245 | 253 | @Override | 
| 246 | 254 | public BasePresenter initPresenter() { | 
| ... | ... | @@ -264,4 +272,24 @@ public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.Rep | 
| 264 | 272 | this.jsonStr = jsonStr; | 
| 265 | 273 | show(); | 
| 266 | 274 | } | 
| 275 | + | |
| 276 | + /** | |
| 277 | + * 显示没有数据 | |
| 278 | + */ | |
| 279 | + public void showNoData() { | |
| 280 | + if (type.equals(TYPE_REPORT)){ | |
| 281 | + tvNoData.setBackgroundDrawable(getResources().getDrawable(R.drawable.baogao_back)); | |
| 282 | + tvNoData.setText(""); | |
| 283 | + }else | |
| 284 | + setTextColor(); | |
| 285 | + | |
| 286 | + } | |
| 287 | + | |
| 288 | + private void setTextColor() { | |
| 289 | + String text="如需使用该模块,请先前往\n个人中心—我的孩子\n绑定孩子账号"; | |
| 290 | + Spannable span = new SpannableString(text); | |
| 291 | + span.setSpan(new ForegroundColorSpan(getResources().getColor(R.color.xueqing_blue)),13,22,Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); | |
| 292 | + tvNoData.setText(span); | |
| 293 | + } | |
| 294 | + | |
| 267 | 295 | } | ... | ... | 
app/src/main/res/layout/activity_apply_signin.xml
| ... | ... | @@ -5,6 +5,7 @@ | 
| 5 | 5 | android:layout_width="match_parent" | 
| 6 | 6 | android:layout_height="match_parent" | 
| 7 | 7 | android:orientation="vertical" | 
| 8 | + android:background="@color/bg_gray" | |
| 8 | 9 | tools:context="com.shunzhi.parent.ui.activity.apply.ApplySigninActivity"> | 
| 9 | 10 | |
| 10 | 11 | <include layout="@layout/top"/> | ... | ... | 
app/src/main/res/layout/dialog_view.xml
| 1 | 1 | <?xml version="1.0" encoding="utf-8"?> | 
| 2 | -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | - android:layout_width="260dp" | |
| 2 | +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | + android:layout_width="match_parent" | |
| 4 | + android:layout_gravity="center" | |
| 5 | + android:layout_height="match_parent" | |
| 6 | + android:background="#55555555" | |
| 7 | + android:orientation="vertical"> | |
| 8 | +<LinearLayout | |
| 4 | 9 | android:layout_gravity="center" | 
| 10 | + android:layout_width="260dp" | |
| 5 | 11 | android:layout_height="wrap_content" | 
| 6 | - android:background="#00000000" | |
| 7 | 12 | android:orientation="vertical"> | 
| 8 | - | |
| 9 | 13 | <TextView | 
| 10 | 14 | android:id="@+id/dialog_info" | 
| 11 | 15 | android:layout_width="260dp" | 
| ... | ... | @@ -42,6 +46,6 @@ | 
| 42 | 46 | android:background="@drawable/rudiobtn" | 
| 43 | 47 | android:text="确定" /> | 
| 44 | 48 | </LinearLayout> | 
| 45 | - | |
| 46 | - | |
| 47 | 49 | </LinearLayout> | 
| 50 | + | |
| 51 | +</FrameLayout> | ... | ... | 
app/src/main/res/layout/fragment_cheng_zhang.xml
| ... | ... | @@ -129,12 +129,12 @@ | 
| 129 | 129 | |
| 130 | 130 | <TextView | 
| 131 | 131 | android:id="@+id/tvNoData" | 
| 132 | - android:layout_width="wrap_content" | |
| 132 | + android:layout_width="match_parent" | |
| 133 | 133 | android:layout_height="wrap_content" | 
| 134 | - android:layout_centerInParent="true" | |
| 134 | + android:layout_marginTop="30px" | |
| 135 | + android:gravity="center" | |
| 135 | 136 | android:lineSpacingExtra="@dimen/size_dp_5" | 
| 136 | - android:background="@drawable/baogao_back" | |
| 137 | - android:textColor="@color/xueqing_blue" | |
| 137 | + android:text="如需使用该模块,请先前往\n个人中心—我的孩子\n绑定孩子账号" | |
| 138 | 138 | android:textSize="@dimen/size_dp_16" /> | 
| 139 | 139 | </RelativeLayout> | 
| 140 | 140 | ... | ... | 
app/src/main/res/layout/fragment_mine.xml
| ... | ... | @@ -57,7 +57,7 @@ | 
| 57 | 57 | android:layout_height="wrap_content" | 
| 58 | 58 | android:text="登录/注册" | 
| 59 | 59 | android:textColor="@color/white" | 
| 60 | - android:textSize="@dimen/txtsize_headline" /> | |
| 60 | + android:textSize="@dimen/txtsize_title" /> | |
| 61 | 61 | |
| 62 | 62 | <TextView | 
| 63 | 63 | android:id="@+id/user_mobile" | 
| ... | ... | @@ -81,13 +81,13 @@ | 
| 81 | 81 | </LinearLayout> | 
| 82 | 82 | </LinearLayout> | 
| 83 | 83 | <ScrollView | 
| 84 | + android:layout_margin="@dimen/dp_10" | |
| 84 | 85 | android:layout_width="match_parent" | 
| 85 | 86 | android:layout_height="match_parent"> | 
| 86 | 87 | <LinearLayout | 
| 87 | 88 | android:id="@+id/center_layout" | 
| 88 | 89 | android:layout_width="match_parent" | 
| 89 | 90 | android:layout_height="match_parent" | 
| 90 | - android:layout_margin="20dp" | |
| 91 | 91 | android:orientation="vertical"> | 
| 92 | 92 | |
| 93 | 93 | <LinearLayout | 
| ... | ... | @@ -116,7 +116,7 @@ | 
| 116 | 116 | android:layout_gravity="center_vertical" | 
| 117 | 117 | android:layout_weight="1" | 
| 118 | 118 | android:text="消息" | 
| 119 | - android:textSize="@dimen/txtsize_title" /> | |
| 119 | + android:textSize="@dimen/textSize14" /> | |
| 120 | 120 | |
| 121 | 121 | <TextView | 
| 122 | 122 | android:id="@+id/tvMessageCount" | 
| ... | ... | @@ -157,7 +157,7 @@ | 
| 157 | 157 | android:layout_gravity="center_vertical" | 
| 158 | 158 | android:layout_weight="1" | 
| 159 | 159 | android:text="订购详情" | 
| 160 | - android:textSize="@dimen/txtsize_title" /> | |
| 160 | + android:textSize="@dimen/textSize14" /> | |
| 161 | 161 | |
| 162 | 162 | </LinearLayout> | 
| 163 | 163 | |
| ... | ... | @@ -187,7 +187,7 @@ | 
| 187 | 187 | android:layout_gravity="center_vertical" | 
| 188 | 188 | android:layout_weight="1" | 
| 189 | 189 | android:text="订购中心" | 
| 190 | - android:textSize="@dimen/txtsize_title" /> | |
| 190 | + android:textSize="@dimen/textSize14" /> | |
| 191 | 191 | |
| 192 | 192 | </LinearLayout> | 
| 193 | 193 | |
| ... | ... | @@ -217,7 +217,7 @@ | 
| 217 | 217 | android:layout_gravity="center_vertical" | 
| 218 | 218 | android:layout_weight="1" | 
| 219 | 219 | android:text="我的孩子" | 
| 220 | - android:textSize="@dimen/txtsize_title" /> | |
| 220 | + android:textSize="@dimen/textSize14" /> | |
| 221 | 221 | |
| 222 | 222 | <TextView | 
| 223 | 223 | android:id="@+id/binding_state" | 
| ... | ... | @@ -225,7 +225,7 @@ | 
| 225 | 225 | android:layout_height="wrap_content" | 
| 226 | 226 | android:layout_gravity="center_vertical" | 
| 227 | 227 | android:text="未绑定" | 
| 228 | - android:textSize="@dimen/sp_18" | |
| 228 | + android:textSize="@dimen/textSize14" | |
| 229 | 229 | android:textColor="@color/textRed" | 
| 230 | 230 | /> | 
| 231 | 231 | </LinearLayout> | 
| ... | ... | @@ -260,7 +260,7 @@ | 
| 260 | 260 | android:layout_gravity="center_vertical" | 
| 261 | 261 | android:layout_weight="1" | 
| 262 | 262 | android:text="意见与反馈" | 
| 263 | - android:textSize="@dimen/txtsize_title" /> | |
| 263 | + android:textSize="@dimen/textSize14" /> | |
| 264 | 264 | |
| 265 | 265 | </LinearLayout> | 
| 266 | 266 | |
| ... | ... | @@ -292,7 +292,7 @@ | 
| 292 | 292 | android:layout_gravity="center_vertical" | 
| 293 | 293 | android:layout_weight="1" | 
| 294 | 294 | android:text="版本更新" | 
| 295 | - android:textSize="@dimen/txtsize_title" /> | |
| 295 | + android:textSize="@dimen/textSize14" /> | |
| 296 | 296 | |
| 297 | 297 | </LinearLayout> | 
| 298 | 298 | |
| ... | ... | @@ -324,7 +324,7 @@ | 
| 324 | 324 | android:layout_gravity="center_vertical" | 
| 325 | 325 | android:layout_weight="1" | 
| 326 | 326 | android:text="清除缓存" | 
| 327 | - android:textSize="@dimen/txtsize_title" /> | |
| 327 | + android:textSize="@dimen/textSize14" /> | |
| 328 | 328 | |
| 329 | 329 | </LinearLayout> | 
| 330 | 330 | |
| ... | ... | @@ -354,7 +354,7 @@ | 
| 354 | 354 | android:layout_gravity="center_vertical" | 
| 355 | 355 | android:layout_weight="1" | 
| 356 | 356 | android:text="关于" | 
| 357 | - android:textSize="@dimen/txtsize_title" /> | |
| 357 | + android:textSize="@dimen/textSize14" /> | |
| 358 | 358 | |
| 359 | 359 | </LinearLayout> | 
| 360 | 360 | </LinearLayout> | 
| ... | ... | @@ -367,11 +367,10 @@ | 
| 367 | 367 | android:gravity="center" | 
| 368 | 368 | android:layout_weight="1" | 
| 369 | 369 | android:layout_marginTop="@dimen/size_dp_15" | 
| 370 | - android:layout_marginBottom="@dimen/size_dp_15" | |
| 371 | 370 | android:background="@drawable/shape_xueqing_radius8" | 
| 372 | 371 | android:text="退出登录" | 
| 373 | 372 | android:textColor="@color/white" | 
| 374 | - android:textSize="@dimen/size_dp_16" /> | |
| 373 | + android:textSize="@dimen/textSize14" /> | |
| 375 | 374 | |
| 376 | 375 | <TextView | 
| 377 | 376 | android:id="@+id/testEnter" | ... | ... | 
app/src/main/res/layout/fragment_report.xml
| ... | ... | @@ -65,23 +65,6 @@ | 
| 65 | 65 | android:visibility="gone" /> | 
| 66 | 66 | </FrameLayout> | 
| 67 | 67 | |
| 68 | - <RelativeLayout | |
| 69 | - android:id="@+id/rl_noData" | |
| 70 | - android:layout_width="match_parent" | |
| 71 | - android:layout_height="match_parent" | |
| 72 | - android:background="@color/white" | |
| 73 | - android:visibility="gone"> | |
| 74 | - | |
| 75 | - <TextView | |
| 76 | - android:id="@+id/tvNoData" | |
| 77 | - android:layout_width="match_parent" | |
| 78 | - android:layout_height="wrap_content" | |
| 79 | - android:layout_marginTop="30px" | |
| 80 | - android:gravity="center" | |
| 81 | - android:lineSpacingExtra="@dimen/size_dp_5" | |
| 82 | - android:text="如需使用该模块,请先前往\n个人中心—我的孩子\n绑定孩子账号" | |
| 83 | - android:textSize="@dimen/size_dp_16" /> | |
| 84 | - </RelativeLayout> | |
| 85 | 68 | |
| 86 | 69 | <android.support.v4.view.ViewPager | 
| 87 | 70 | android:id="@+id/viewPager" | ... | ... |