Commit 2a83582a6559c1f30c0d46d37e6f074c67698967

Authored by 姚旭斌
1 parent 7fa6a0f8

no message

app/src/main/java/com/shunzhi/parent/ui/activity/LoginAndRegistActivity.java
1 package com.shunzhi.parent.ui.activity; 1 package com.shunzhi.parent.ui.activity;
2 2
3 import android.os.Bundle; 3 import android.os.Bundle;
4 -import android.util.Log;  
5 4
6 import com.share.mvpsdk.base.activity.BaseCompatActivity; 5 import com.share.mvpsdk.base.activity.BaseCompatActivity;
7 import com.shunzhi.parent.R; 6 import com.shunzhi.parent.R;
@@ -19,9 +18,10 @@ public class LoginAndRegistActivity extends BaseCompatActivity { @@ -19,9 +18,10 @@ public class LoginAndRegistActivity extends BaseCompatActivity {
19 protected void initView(Bundle savedInstanceState) { 18 protected void initView(Bundle savedInstanceState) {
20 if (savedInstanceState == null) { 19 if (savedInstanceState == null) {
21 type = getIntent().getStringExtra("type"); 20 type = getIntent().getStringExtra("type");
22 - Log.e("aaa--==",type);  
23 - mFragments[0] = LoginAndRegistFragment.getInstance(type);  
24 - loadRootFragment(R.id.frame, mFragments[0]); 21 + if(type!=null) {
  22 + mFragments[0] = LoginAndRegistFragment.getInstance(type);
  23 + loadRootFragment(R.id.frame, mFragments[0]);
  24 + }
25 } else { 25 } else {
26 mFragments[0] = findFragment(LoginAndRegistFragment.class); 26 mFragments[0] = findFragment(LoginAndRegistFragment.class);
27 } 27 }
app/src/main/java/com/shunzhi/parent/ui/fragment/CePingFragment.java
@@ -13,7 +13,6 @@ import android.widget.ImageView; @@ -13,7 +13,6 @@ import android.widget.ImageView;
13 import android.widget.LinearLayout; 13 import android.widget.LinearLayout;
14 import android.widget.TextView; 14 import android.widget.TextView;
15 15
16 -import com.bumptech.glide.Glide;  
17 import com.share.mvpsdk.base.BasePresenter; 16 import com.share.mvpsdk.base.BasePresenter;
18 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; 17 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment;
19 import com.share.mvpsdk.utils.ToastUtils; 18 import com.share.mvpsdk.utils.ToastUtils;
@@ -74,11 +73,13 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP @@ -74,11 +73,13 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP
74 textAndImg_xqjc.setTextColor(R.color.white); 73 textAndImg_xqjc.setTextColor(R.color.white);
75 textAndImg_xqjc.setText("学情检测"); 74 textAndImg_xqjc.setText("学情检测");
76 textAndImg_xqjc.setImgs(R.drawable.xqjc, R.drawable.xqjc); 75 textAndImg_xqjc.setImgs(R.drawable.xqjc, R.drawable.xqjc);
  76 + textAndImg_xqjc.setOnClickListener(this);
77 textAndImg_xqjc.setSelect(true); 77 textAndImg_xqjc.setSelect(true);
78 78
79 textAndImg_zxlx.setText("专项训练"); 79 textAndImg_zxlx.setText("专项训练");
80 textAndImg_zxlx.setTextColor(R.color.white); 80 textAndImg_zxlx.setTextColor(R.color.white);
81 textAndImg_zxlx.setImgs(R.drawable.zxlx, R.drawable.zxlx); 81 textAndImg_zxlx.setImgs(R.drawable.zxlx, R.drawable.zxlx);
  82 + textAndImg_zxlx.setOnClickListener(this);
82 textAndImg_zxlx.setSelect(true); 83 textAndImg_zxlx.setSelect(true);
83 84
84 initListeners(view); 85 initListeners(view);
@@ -153,6 +154,14 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP @@ -153,6 +154,14 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP
153 case R.id.ivCamera: 154 case R.id.ivCamera:
154 ToastUtils.showToast("功能暂未上线"); 155 ToastUtils.showToast("功能暂未上线");
155 break; 156 break;
  157 + case R.id.textAndImg_xqjc:
  158 + ToastUtils.showToast("功能暂未上线");
  159 + break;
  160 + case R.id.textAndImg_zxlx:
  161 + ToastUtils.showToast("功能暂未上线");
  162 + break;
  163 + default:
  164 + break;
156 } 165 }
157 } 166 }
158 167
@@ -182,14 +191,17 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP @@ -182,14 +191,17 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP
182 191
183 @Override 192 @Override
184 public void showTools(List<ToolBean> toolBeanList) { 193 public void showTools(List<ToolBean> toolBeanList) {
  194 +
185 if (toolBeanList.size() > 0) { 195 if (toolBeanList.size() > 0) {
186 tvCourse1.setText(toolBeanList.get(0).toolName); 196 tvCourse1.setText(toolBeanList.get(0).toolName);
187 GlideUtils.showImg(getActivity(),ivCourse1,toolBeanList.get(0).toolImage); 197 GlideUtils.showImg(getActivity(),ivCourse1,toolBeanList.get(0).toolImage);
  198 +
188 tvCourse1.setTag(toolBeanList.get(0).toolUrl); 199 tvCourse1.setTag(toolBeanList.get(0).toolUrl);
189 } 200 }
190 201
191 if (toolBeanList.size() > 1) { 202 if (toolBeanList.size() > 1) {
192 tvCourse2.setText(toolBeanList.get(1).toolName); 203 tvCourse2.setText(toolBeanList.get(1).toolName);
  204 +
193 GlideUtils.showImg(getActivity(),ivCourse2,toolBeanList.get(1).toolImage); 205 GlideUtils.showImg(getActivity(),ivCourse2,toolBeanList.get(1).toolImage);
194 tvCourse2.setTag(toolBeanList.get(1).toolUrl); 206 tvCourse2.setTag(toolBeanList.get(1).toolUrl);
195 } 207 }
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
@@ -30,7 +30,7 @@ import com.shunzhi.parent.util.GlideUtils; @@ -30,7 +30,7 @@ import com.shunzhi.parent.util.GlideUtils;
30 30
31 public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract.LoginPresenter, LoginAndRegisterContract.ILoginModel> 31 public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract.LoginPresenter, LoginAndRegisterContract.ILoginModel>
32 implements MineContract.IMineView, View.OnClickListener { 32 implements MineContract.IMineView, View.OnClickListener {
33 - LinearLayout childlayout, personinfo, layout_orderDetail, layout_order, layout_cache, layout_about, layout_feedback; 33 + LinearLayout childlayout, personinfo, layout_orderDetail, layout_order, layout_cache, layout_about, layout_feedback,top_layout,layout_afterLogin;
34 RoundedImageView user_photo; 34 RoundedImageView user_photo;
35 TextView user_name, user_mobile, tvExit, binding_state; 35 TextView user_name, user_mobile, tvExit, binding_state;
36 36
@@ -48,6 +48,8 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract @@ -48,6 +48,8 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract
48 @Override 48 @Override
49 public void initUI(View view, @Nullable Bundle savedInstanceState) { 49 public void initUI(View view, @Nullable Bundle savedInstanceState) {
50 childlayout = view.findViewById(R.id.childlayout); 50 childlayout = view.findViewById(R.id.childlayout);
  51 + layout_afterLogin = view.findViewById(R.id.layout_afterLogin);
  52 + top_layout = view.findViewById(R.id.top_layout);
51 personinfo = view.findViewById(R.id.personinfo); 53 personinfo = view.findViewById(R.id.personinfo);
52 layout_order = view.findViewById(R.id.layout_order); 54 layout_order = view.findViewById(R.id.layout_order);
53 layout_orderDetail = view.findViewById(R.id.layout_orderDetail); 55 layout_orderDetail = view.findViewById(R.id.layout_orderDetail);
@@ -65,8 +67,10 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract @@ -65,8 +67,10 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract
65 user_name = view.findViewById(R.id.user_name); 67 user_name = view.findViewById(R.id.user_name);
66 user_mobile = view.findViewById(R.id.user_mobile); 68 user_mobile = view.findViewById(R.id.user_mobile);
67 tvExit = view.findViewById(R.id.tvExit); 69 tvExit = view.findViewById(R.id.tvExit);
  70 + tvExit.setVisibility(View.GONE);
68 tvExit.setOnClickListener(this); 71 tvExit.setOnClickListener(this);
69 binding_state = view.findViewById(R.id.binding_state); 72 binding_state = view.findViewById(R.id.binding_state);
  73 + layout_afterLogin.setVisibility(View.GONE);
70 if (AppConfig.ISBINDING) { 74 if (AppConfig.ISBINDING) {
71 binding_state.setText(""); 75 binding_state.setText("");
72 } 76 }
@@ -86,10 +90,15 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract @@ -86,10 +90,15 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract
86 user_photo.setOval(true); 90 user_photo.setOval(true);
87 user_name.setText(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_NAME)); 91 user_name.setText(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_NAME));
88 user_mobile.setText(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.LOGIN_NAME)); 92 user_mobile.setText(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.LOGIN_NAME));
  93 + top_layout.setBackgroundResource(R.drawable.backgroud_top);
89 user_mobile.setVisibility(View.VISIBLE); 94 user_mobile.setVisibility(View.VISIBLE);
  95 + layout_afterLogin.setVisibility(View.VISIBLE);
  96 + tvExit.setVisibility(View.VISIBLE);
90 } else { 97 } else {
91 user_name.setVisibility(View.VISIBLE); 98 user_name.setVisibility(View.VISIBLE);
92 user_mobile.setVisibility(View.GONE); 99 user_mobile.setVisibility(View.GONE);
  100 + layout_afterLogin.setVisibility(View.GONE);
  101 + tvExit.setVisibility(View.GONE);
93 } 102 }
94 } 103 }
95 104
app/src/main/res/drawable-xhdpi/xiaoxi.png 0 → 100644

516 Bytes

app/src/main/res/layout/fragment_mine.xml
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 android:paddingTop="20dp" 17 android:paddingTop="20dp"
18 android:layout_width="match_parent" 18 android:layout_width="match_parent"
19 android:layout_height="180dp" 19 android:layout_height="180dp"
20 - android:background="@drawable/backgroud_top" 20 + android:background="@color/back_top"
21 android:orientation="vertical"> 21 android:orientation="vertical">
22 22
23 <TextView 23 <TextView
@@ -91,6 +91,7 @@ @@ -91,6 +91,7 @@
91 android:orientation="vertical"> 91 android:orientation="vertical">
92 92
93 <LinearLayout 93 <LinearLayout
  94 + android:id="@+id/layout_afterLogin"
94 android:layout_width="match_parent" 95 android:layout_width="match_parent"
95 android:layout_height="wrap_content" 96 android:layout_height="wrap_content"
96 android:background="@color/white" 97 android:background="@color/white"
@@ -103,17 +104,17 @@ @@ -103,17 +104,17 @@
103 104
104 <TextView 105 <TextView
105 android:layout_width="25dp" 106 android:layout_width="25dp"
106 - android:layout_height="20dp" 107 + android:layout_height="30dp"
107 android:layout_marginLeft="15dp" 108 android:layout_marginLeft="15dp"
108 android:layout_marginRight="30dp" 109 android:layout_marginRight="30dp"
109 - android:background="@drawable/tiaoxing" /> 110 + android:background="@drawable/xiaoxi" />
110 111
111 <TextView 112 <TextView
112 android:layout_width="wrap_content" 113 android:layout_width="wrap_content"
113 android:layout_height="wrap_content" 114 android:layout_height="wrap_content"
114 android:layout_gravity="center_vertical" 115 android:layout_gravity="center_vertical"
115 android:layout_weight="1" 116 android:layout_weight="1"
116 - android:text="我的订阅消息" 117 + android:text="消息"
117 android:textSize="@dimen/txtsize_title" /> 118 android:textSize="@dimen/txtsize_title" />
118 119
119 <TextView 120 <TextView
app/src/main/res/layout/fragment_report.xml
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
22 android:drawablePadding="10dp" 22 android:drawablePadding="10dp"
23 android:drawableRight="@drawable/pull" 23 android:drawableRight="@drawable/pull"
24 android:text="" 24 android:text=""
  25 + android:visibility="gone"
25 android:textColor="@color/textColor" 26 android:textColor="@color/textColor"
26 android:textSize="@dimen/textSize16" /> 27 android:textSize="@dimen/textSize16" />
27 28
@@ -32,7 +33,7 @@ @@ -32,7 +33,7 @@
32 android:layout_weight="1" 33 android:layout_weight="1"
33 android:gravity="center_horizontal" 34 android:gravity="center_horizontal"
34 android:id="@+id/tvDate" 35 android:id="@+id/tvDate"
35 - android:text="2018年3月" 36 + android:text="报告"
36 android:textColor="@color/white" 37 android:textColor="@color/white"
37 android:textSize="@dimen/textSize18" /> 38 android:textSize="@dimen/textSize18" />
38 39
@@ -42,6 +43,7 @@ @@ -42,6 +43,7 @@
42 android:layout_height="wrap_content" 43 android:layout_height="wrap_content"
43 android:layout_gravity="center_vertical" 44 android:layout_gravity="center_vertical"
44 android:drawableRight="@drawable/screen" 45 android:drawableRight="@drawable/screen"
  46 + android:visibility="gone"
45 android:text="筛选" 47 android:text="筛选"
46 android:textColor="@color/textColor" 48 android:textColor="@color/textColor"
47 android:textSize="@dimen/textSize16" /> 49 android:textSize="@dimen/textSize16" />
@@ -52,7 +54,7 @@ @@ -52,7 +54,7 @@
52 android:layout_height="match_parent" 54 android:layout_height="match_parent"
53 android:textSize="@dimen/size_dp_16" 55 android:textSize="@dimen/size_dp_16"
54 android:textColor="@color/xueqing_blue" 56 android:textColor="@color/xueqing_blue"
55 - android:text="没有绑定孩子,\n请去个人中心绑定孩子" 57 + android:text="功能暂不开放"
56 android:gravity="center" 58 android:gravity="center"
57 android:lineSpacingExtra="@dimen/size_dp_5" 59 android:lineSpacingExtra="@dimen/size_dp_5"
58 android:id="@+id/tvNoData" 60 android:id="@+id/tvNoData"
@@ -61,6 +63,7 @@ @@ -61,6 +63,7 @@
61 <LinearLayout 63 <LinearLayout
62 android:layout_width="match_parent" 64 android:layout_width="match_parent"
63 android:layout_height="match_parent" 65 android:layout_height="match_parent"
  66 + android:visibility="gone"
64 android:orientation="vertical"> 67 android:orientation="vertical">
65 68
66 <!--<include layout="@layout/layout_week" /> android:layout_below="@+id/linearlayout"--> 69 <!--<include layout="@layout/layout_week" /> android:layout_below="@+id/linearlayout"-->