Commit 6b5379b86ba3b5cf849281afc4fa5f79f66c683a

Authored by 陶汉栋
1 parent b8df71fe

no message

app/src/main/AndroidManifest.xml
@@ -112,7 +112,7 @@ @@ -112,7 +112,7 @@
112 android:name="com.amap.api.v2.apikey" 112 android:name="com.amap.api.v2.apikey"
113 android:value="1d130afb822d8a1019e6592cbaf10bcc"/> 113 android:value="1d130afb822d8a1019e6592cbaf10bcc"/>
114 114
115 - <activity android:name=".ui.MainActivity" 115 + <activity android:name=".ui.activity.StartActivity"
116 android:windowSoftInputMode="adjustPan|stateAlwaysHidden"> 116 android:windowSoftInputMode="adjustPan|stateAlwaysHidden">
117 <intent-filter> 117 <intent-filter>
118 <action android:name="android.intent.action.MAIN"/> 118 <action android:name="android.intent.action.MAIN"/>
@@ -130,7 +130,7 @@ @@ -130,7 +130,7 @@
130 <activity android:name=".ui.activity.consult.ConsultOneLevelActivity"/> 130 <activity android:name=".ui.activity.consult.ConsultOneLevelActivity"/>
131 <!-- <activity android:name=".ui.activity.LoginAndRegistActivity" /> --> 131 <!-- <activity android:name=".ui.activity.LoginAndRegistActivity" /> -->
132 <activity 132 <activity
133 - android:name=".ui.activity.StartActivity" 133 + android:name=".ui.MainActivity"
134 android:screenOrientation="portrait"/> 134 android:screenOrientation="portrait"/>
135 <activity 135 <activity
136 android:name=".ui.activity.ChildDetialActivity" 136 android:name=".ui.activity.ChildDetialActivity"
@@ -143,7 +143,7 @@ @@ -143,7 +143,7 @@
143 android:name=".ui.activity.binding.SelectSchoolActivity" 143 android:name=".ui.activity.binding.SelectSchoolActivity"
144 android:screenOrientation="portrait" 144 android:screenOrientation="portrait"
145 android:windowSoftInputMode="adjustPan|stateHidden"/> 145 android:windowSoftInputMode="adjustPan|stateHidden"/>
146 - android:windowSoftInputMode="adjustPan|stateHidden" /> 146 +
147 <activity android:name=".ui.activity.LoginAndRegistActivity" 147 <activity android:name=".ui.activity.LoginAndRegistActivity"
148 android:screenOrientation="portrait" 148 android:screenOrientation="portrait"
149 /> 149 />
app/src/main/java/com/shunzhi/parent/presenter/ceping/CePingPresenter.java
@@ -41,6 +41,7 @@ public class CePingPresenter extends CepingContract.CePingPresenter { @@ -41,6 +41,7 @@ public class CePingPresenter extends CepingContract.CePingPresenter {
41 mRxManager.register(mIModel.getTools(areaName).subscribe(new Consumer<JsonObject>() { 41 mRxManager.register(mIModel.getTools(areaName).subscribe(new Consumer<JsonObject>() {
42 @Override 42 @Override
43 public void accept(JsonObject jsonObject) throws Exception { 43 public void accept(JsonObject jsonObject) throws Exception {
  44 +
44 if (jsonObject.get("status").getAsString().equals("1")){ 45 if (jsonObject.get("status").getAsString().equals("1")){
45 JsonArray jsonArray=jsonObject.getAsJsonArray("data"); 46 JsonArray jsonArray=jsonObject.getAsJsonArray("data");
46 layout_control.removeAllViews(); 47 layout_control.removeAllViews();
app/src/main/java/com/shunzhi/parent/presenter/consult/ConsultPresenter.java
@@ -68,6 +68,7 @@ public class ConsultPresenter extends ConsultContract.ConsultPresenter { @@ -68,6 +68,7 @@ public class ConsultPresenter extends ConsultContract.ConsultPresenter {
68 mRxManager.register(mIModel.getBanners(position, areaName).subscribe(new Consumer<JsonObject>() { 68 mRxManager.register(mIModel.getBanners(position, areaName).subscribe(new Consumer<JsonObject>() {
69 @Override 69 @Override
70 public void accept(JsonObject jsonObject) throws Exception { 70 public void accept(JsonObject jsonObject) throws Exception {
  71 + Log.d("666666","getBanners="+jsonObject.toString());
71 if (jsonObject.get("status").getAsString().equals("1")) { 72 if (jsonObject.get("status").getAsString().equals("1")) {
72 JsonArray jsonArray = jsonObject.getAsJsonArray("data"); 73 JsonArray jsonArray = jsonObject.getAsJsonArray("data");
73 List<GuangGaoBean> guangGaoBeanList = new ArrayList<>(); 74 List<GuangGaoBean> guangGaoBeanList = new ArrayList<>();
app/src/main/java/com/shunzhi/parent/ui/activity/mywebview/WebViewActivity.java
@@ -4,6 +4,7 @@ import android.content.Context; @@ -4,6 +4,7 @@ import android.content.Context;
4 import android.content.Intent; 4 import android.content.Intent;
5 import android.graphics.Bitmap; 5 import android.graphics.Bitmap;
6 import android.os.Bundle; 6 import android.os.Bundle;
  7 +import android.util.Log;
7 import android.view.View; 8 import android.view.View;
8 import android.webkit.JavascriptInterface; 9 import android.webkit.JavascriptInterface;
9 import android.webkit.WebChromeClient; 10 import android.webkit.WebChromeClient;
@@ -26,8 +27,8 @@ public class WebViewActivity extends BaseCompatActivity { @@ -26,8 +27,8 @@ public class WebViewActivity extends BaseCompatActivity {
26 27
27 NestedScrollWebView nesteScrollWebView; 28 NestedScrollWebView nesteScrollWebView;
28 LinearLayout binding_success, binding_success2; 29 LinearLayout binding_success, binding_success2;
29 - ImageView close;  
30 - TextView tv_info,zuoye,title_web; 30 +// ImageView close;
  31 + TextView tv_info,zuoye,title_web,close_btn;
31 32
32 int type; 33 int type;
33 34
@@ -48,13 +49,13 @@ public class WebViewActivity extends BaseCompatActivity { @@ -48,13 +49,13 @@ public class WebViewActivity extends BaseCompatActivity {
48 binding_success=findViewById(R.id.binding_success1); 49 binding_success=findViewById(R.id.binding_success1);
49 50
50 binding_success2=findViewById(R.id.binding_success2); 51 binding_success2=findViewById(R.id.binding_success2);
51 - close = findViewById(R.id.close_btn); 52 + close_btn = findViewById(R.id.close_btn);
52 tv_info = findViewById(R.id.tv_info); 53 tv_info = findViewById(R.id.tv_info);
53 zuoye = findViewById(R.id.zuoye); 54 zuoye = findViewById(R.id.zuoye);
54 title_web = findViewById(R.id.title_web); 55 title_web = findViewById(R.id.title_web);
55 56
56 57
57 - close.setOnClickListener(new View.OnClickListener() { 58 + close_btn.setOnClickListener(new View.OnClickListener() {
58 @Override 59 @Override
59 public void onClick(View v) { 60 public void onClick(View v) {
60 onBackPressedSupport(); 61 onBackPressedSupport();
@@ -178,8 +179,8 @@ public class WebViewActivity extends BaseCompatActivity { @@ -178,8 +179,8 @@ public class WebViewActivity extends BaseCompatActivity {
178 @Override 179 @Override
179 public void onPageStarted(WebView view, String url, Bitmap favicon) { 180 public void onPageStarted(WebView view, String url, Bitmap favicon) {
180 // Log.d("666666","onPageStartedurl="+url); 181 // Log.d("666666","onPageStartedurl="+url);
181 - if (url.startsWith("http"))view.loadUrl(url);  
182 - view.getSettings().setJavaScriptEnabled(true); 182 +// if (url.startsWith("http"))view.loadUrl(url);
  183 +// view.getSettings().setJavaScriptEnabled(true);
183 super.onPageStarted(view, url, favicon); 184 super.onPageStarted(view, url, favicon);
184 } 185 }
185 186
app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java
@@ -27,6 +27,7 @@ import com.shunzhi.parent.bean.channel.ChannelContextBean; @@ -27,6 +27,7 @@ import com.shunzhi.parent.bean.channel.ChannelContextBean;
27 import com.shunzhi.parent.contract.consult.ConsultContract; 27 import com.shunzhi.parent.contract.consult.ConsultContract;
28 import com.shunzhi.parent.presenter.consult.ConsultPresenter; 28 import com.shunzhi.parent.presenter.consult.ConsultPresenter;
29 import com.shunzhi.parent.ui.activity.consult.ConsultOneLevelActivity; 29 import com.shunzhi.parent.ui.activity.consult.ConsultOneLevelActivity;
  30 +import com.shunzhi.parent.ui.activity.mywebview.WebViewActivity;
30 import com.shunzhi.parent.util.AttrsUtils; 31 import com.shunzhi.parent.util.AttrsUtils;
31 import com.shunzhi.parent.views.TextAndImgShowView; 32 import com.shunzhi.parent.views.TextAndImgShowView;
32 import com.stx.xhb.xbanner.XBanner; 33 import com.stx.xhb.xbanner.XBanner;
@@ -114,6 +115,13 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu @@ -114,6 +115,13 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu
114 } 115 }
115 }); 116 });
116 117
  118 + xBanner.setOnItemClickListener(new XBanner.OnItemClickListener() {
  119 + @Override
  120 + public void onItemClick(XBanner banner, int position) {
  121 + WebViewActivity.getInstance(getContext(),imgesUrl.get(position),-1);
  122 + }
  123 + });
  124 +
117 } 125 }
118 126
119 @NonNull 127 @NonNull
app/src/main/java/com/shunzhi/parent/ui/fragment/ReportFragment.java
@@ -36,7 +36,7 @@ public class ReportFragment extends BaseMVPCompatFragment&lt;ReportContract.ReportP @@ -36,7 +36,7 @@ public class ReportFragment extends BaseMVPCompatFragment&lt;ReportContract.ReportP
36 36
37 MaterialCalendarView calendarView_month_mode; 37 MaterialCalendarView calendarView_month_mode;
38 38
39 - TextView tvDate,tvShaiXuan; 39 + TextView tvDate,tvShaiXuan,tvNoData;
40 40
41 ShaiXuanPop shaiXuanPop=null; 41 ShaiXuanPop shaiXuanPop=null;
42 42
@@ -57,6 +57,7 @@ public class ReportFragment extends BaseMVPCompatFragment&lt;ReportContract.ReportP @@ -57,6 +57,7 @@ public class ReportFragment extends BaseMVPCompatFragment&lt;ReportContract.ReportP
57 calendarView_month_mode = view.findViewById(R.id.calendarView_month_mode); 57 calendarView_month_mode = view.findViewById(R.id.calendarView_month_mode);
58 tvDate = view.findViewById(R.id.tvDate); 58 tvDate = view.findViewById(R.id.tvDate);
59 tvShaiXuan=view.findViewById(R.id.tvShaiXuan); 59 tvShaiXuan=view.findViewById(R.id.tvShaiXuan);
  60 + tvNoData=view.findViewById(R.id.tvNoData);
60 61
61 LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity()); 62 LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
62 layoutManager.setOrientation(LinearLayoutManager.VERTICAL); 63 layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
@@ -117,6 +118,7 @@ public class ReportFragment extends BaseMVPCompatFragment&lt;ReportContract.ReportP @@ -117,6 +118,7 @@ public class ReportFragment extends BaseMVPCompatFragment&lt;ReportContract.ReportP
117 @Override 118 @Override
118 public void showReports(List<String> stringList) { 119 public void showReports(List<String> stringList) {
119 if (null!=shaiXuanPop){ 120 if (null!=shaiXuanPop){
  121 + if (stringList.size()>0)tvNoData.setVisibility(View.GONE);
120 shaiXuanPop.setDatas(stringList); 122 shaiXuanPop.setDatas(stringList);
121 shaiXuanPop.show(tvShaiXuan); 123 shaiXuanPop.show(tvShaiXuan);
122 } 124 }
app/src/main/java/com/shunzhi/parent/ui/fragment/StartFragment.java
@@ -7,11 +7,13 @@ import android.support.v4.view.ViewPager; @@ -7,11 +7,13 @@ import android.support.v4.view.ViewPager;
7 import android.text.TextUtils; 7 import android.text.TextUtils;
8 import android.view.View; 8 import android.view.View;
9 import android.widget.ImageView; 9 import android.widget.ImageView;
  10 +import android.widget.TextView;
10 11
11 import com.bumptech.glide.Glide; 12 import com.bumptech.glide.Glide;
12 import com.share.mvpsdk.base.BasePresenter; 13 import com.share.mvpsdk.base.BasePresenter;
13 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; 14 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment;
14 import com.shunzhi.parent.AppConfig; 15 import com.shunzhi.parent.AppConfig;
  16 +import com.shunzhi.parent.AppContext;
15 import com.shunzhi.parent.R; 17 import com.shunzhi.parent.R;
16 import com.shunzhi.parent.bean.GuangGaoBean; 18 import com.shunzhi.parent.bean.GuangGaoBean;
17 import com.shunzhi.parent.bean.channel.ChannelBean; 19 import com.shunzhi.parent.bean.channel.ChannelBean;
@@ -29,6 +31,8 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult @@ -29,6 +31,8 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult
29 31
30 XBanner xBanner; 32 XBanner xBanner;
31 33
  34 + TextView tvJump;
  35 +
32 @Override 36 @Override
33 public int getLayoutId() { 37 public int getLayoutId() {
34 return R.layout.fragment_start; 38 return R.layout.fragment_start;
@@ -36,11 +40,23 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult @@ -36,11 +40,23 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult
36 40
37 @Override 41 @Override
38 public void initUI(View view, @Nullable Bundle savedInstanceState) { 42 public void initUI(View view, @Nullable Bundle savedInstanceState) {
  43 +
39 xBanner = view.findViewById(R.id.xBanner); 44 xBanner = view.findViewById(R.id.xBanner);
  45 + tvJump=view.findViewById(R.id.tvJump);
  46 +
40 if (!TextUtils.isEmpty(AppConfig.getAppConfig(getContext()).get(AppConfig.APP_IS_START))) { 47 if (!TextUtils.isEmpty(AppConfig.getAppConfig(getContext()).get(AppConfig.APP_IS_START))) {
41 - mPresenter.getBanners("0","杭州"); 48 + mPresenter.getBanners("0", "余杭区");
42 AppConfig.getAppConfig(getContext()).set(AppConfig.APP_IS_START, "1"); 49 AppConfig.getAppConfig(getContext()).set(AppConfig.APP_IS_START, "1");
43 - } else mPresenter.getBanners("1","杭州"); 50 + } else mPresenter.getBanners("1","余杭区");
  51 +
  52 +
  53 + tvJump.setOnClickListener(new View.OnClickListener() {
  54 + @Override
  55 + public void onClick(View view) {
  56 + startNewActivity(MainActivity.class);
  57 + }
  58 + });
  59 +
44 } 60 }
45 61
46 @NonNull 62 @NonNull
app/src/main/res/drawable/rudiobtn_unclick.xml
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android"> 2 <shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
3 <stroke android:color="#00000000" android:width="1dp"/> 3 <stroke android:color="#00000000" android:width="1dp"/>
4 - <solid android:color="#D2D2D2" /> 4 + <solid android:color="@color/xueqing_blue" />
5 <corners android:radius="5dp"/> 5 <corners android:radius="5dp"/>
6 </shape> 6 </shape>
7 \ No newline at end of file 7 \ No newline at end of file
app/src/main/res/layout/fragment_login_and_regist.xml
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 xmlns:tools="http://schemas.android.com/tools" 3 xmlns:tools="http://schemas.android.com/tools"
4 android:layout_width="match_parent" 4 android:layout_width="match_parent"
5 android:layout_height="match_parent" 5 android:layout_height="match_parent"
  6 + android:background="@color/white"
6 tools:context="com.shunzhi.parent.ui.fragment.loginandregistfragment.LoginAndRegistFragment"> 7 tools:context="com.shunzhi.parent.ui.fragment.loginandregistfragment.LoginAndRegistFragment">
7 8
8 9
@@ -59,6 +60,7 @@ @@ -59,6 +60,7 @@
59 android:text="" 60 android:text=""
60 android:maxLength="11" 61 android:maxLength="11"
61 android:textColorHint="@color/hintTextColor" 62 android:textColorHint="@color/hintTextColor"
  63 + android:textColor="@color/textColor"
62 android:textSize="@dimen/sp_16" /> 64 android:textSize="@dimen/sp_16" />
63 65
64 <TextView 66 <TextView
@@ -86,6 +88,7 @@ @@ -86,6 +88,7 @@
86 android:background="@null" 88 android:background="@null"
87 android:hint="请输入验证码" 89 android:hint="请输入验证码"
88 android:textColorHint="@color/hintTextColor" 90 android:textColorHint="@color/hintTextColor"
  91 + android:textColor="@color/textColor"
89 android:textSize="@dimen/sp_16" /> 92 android:textSize="@dimen/sp_16" />
90 93
91 <TextView 94 <TextView
app/src/main/res/layout/fragment_mine.xml
@@ -99,7 +99,7 @@ @@ -99,7 +99,7 @@
99 <LinearLayout 99 <LinearLayout
100 android:layout_width="match_parent" 100 android:layout_width="match_parent"
101 android:gravity="center_vertical" 101 android:gravity="center_vertical"
102 - android:layout_height="40dp"> 102 + android:layout_height="?android:actionBarSize">
103 103
104 <TextView 104 <TextView
105 android:layout_width="25dp" 105 android:layout_width="25dp"
@@ -136,7 +136,7 @@ @@ -136,7 +136,7 @@
136 <LinearLayout 136 <LinearLayout
137 android:id="@+id/layout_orderDetail" 137 android:id="@+id/layout_orderDetail"
138 android:layout_width="match_parent" 138 android:layout_width="match_parent"
139 - android:layout_height="40dp" 139 + android:layout_height="?android:actionBarSize"
140 android:gravity="center_vertical" 140 android:gravity="center_vertical"
141 141
142 > 142 >
@@ -167,7 +167,7 @@ @@ -167,7 +167,7 @@
167 <LinearLayout 167 <LinearLayout
168 android:id="@+id/layout_order" 168 android:id="@+id/layout_order"
169 android:layout_width="match_parent" 169 android:layout_width="match_parent"
170 - android:layout_height="40dp" 170 + android:layout_height="?android:actionBarSize"
171 android:gravity="center_vertical" 171 android:gravity="center_vertical"
172 > 172 >
173 173
@@ -197,7 +197,7 @@ @@ -197,7 +197,7 @@
197 <LinearLayout 197 <LinearLayout
198 android:id="@+id/childlayout" 198 android:id="@+id/childlayout"
199 android:layout_width="match_parent" 199 android:layout_width="match_parent"
200 - android:layout_height="40dp" 200 + android:layout_height="?android:actionBarSize"
201 android:gravity="center_vertical" 201 android:gravity="center_vertical"
202 > 202 >
203 203
app/src/main/res/layout/fragment_report.xml
@@ -46,6 +46,17 @@ @@ -46,6 +46,17 @@
46 android:textSize="@dimen/textSize16" /> 46 android:textSize="@dimen/textSize16" />
47 </LinearLayout> 47 </LinearLayout>
48 48
  49 + <TextView
  50 + android:layout_width="match_parent"
  51 + android:layout_height="match_parent"
  52 + android:textSize="@dimen/size_dp_16"
  53 + android:textColor="@color/xueqing_blue"
  54 + android:text="没有绑定孩子,\n请去个人中心绑定孩子"
  55 + android:gravity="center"
  56 + android:lineSpacingExtra="@dimen/size_dp_5"
  57 + android:id="@+id/tvNoData"
  58 + />
  59 +
49 <LinearLayout 60 <LinearLayout
50 android:layout_width="match_parent" 61 android:layout_width="match_parent"
51 android:layout_height="match_parent" 62 android:layout_height="match_parent"
app/src/main/res/layout/fragment_start.xml
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 xmlns:tools="http://schemas.android.com/tools" 2 xmlns:tools="http://schemas.android.com/tools"
3 android:layout_width="match_parent" 3 android:layout_width="match_parent"
4 android:layout_height="match_parent" 4 android:layout_height="match_parent"
  5 + android:background="@color/bgColor"
5 tools:context="com.shunzhi.parent.ui.fragment.StartFragment"> 6 tools:context="com.shunzhi.parent.ui.fragment.StartFragment">
6 7
7 <com.stx.xhb.xbanner.XBanner 8 <com.stx.xhb.xbanner.XBanner
@@ -9,4 +10,17 @@ @@ -9,4 +10,17 @@
9 android:layout_height="match_parent" 10 android:layout_height="match_parent"
10 android:id="@+id/xBanner" 11 android:id="@+id/xBanner"
11 ></com.stx.xhb.xbanner.XBanner> 12 ></com.stx.xhb.xbanner.XBanner>
  13 +
  14 + <TextView
  15 + android:id="@+id/tvJump"
  16 + android:layout_width="wrap_content"
  17 + android:layout_height="wrap_content"
  18 + android:text="跳过"
  19 + android:textColor="@color/white"
  20 + android:textSize="@dimen/size_dp_16"
  21 + android:padding="@dimen/size_dp_10"
  22 + android:layout_gravity="right"
  23 + android:layout_margin="@dimen/size_dp_10"
  24 + android:background="@drawable/shape_xueqing_radius8"
  25 + />
12 </FrameLayout> 26 </FrameLayout>