Commit 6b5379b86ba3b5cf849281afc4fa5f79f66c683a
1 parent
b8df71fe
Exists in
yxb_dev
and in
2 other branches
no message
Showing
12 changed files
with
74 additions
and
17 deletions
Show diff stats
app/src/main/AndroidManifest.xml
... | ... | @@ -112,7 +112,7 @@ |
112 | 112 | android:name="com.amap.api.v2.apikey" |
113 | 113 | android:value="1d130afb822d8a1019e6592cbaf10bcc"/> |
114 | 114 | |
115 | - <activity android:name=".ui.MainActivity" | |
115 | + <activity android:name=".ui.activity.StartActivity" | |
116 | 116 | android:windowSoftInputMode="adjustPan|stateAlwaysHidden"> |
117 | 117 | <intent-filter> |
118 | 118 | <action android:name="android.intent.action.MAIN"/> |
... | ... | @@ -130,7 +130,7 @@ |
130 | 130 | <activity android:name=".ui.activity.consult.ConsultOneLevelActivity"/> |
131 | 131 | <!-- <activity android:name=".ui.activity.LoginAndRegistActivity" /> --> |
132 | 132 | <activity |
133 | - android:name=".ui.activity.StartActivity" | |
133 | + android:name=".ui.MainActivity" | |
134 | 134 | android:screenOrientation="portrait"/> |
135 | 135 | <activity |
136 | 136 | android:name=".ui.activity.ChildDetialActivity" |
... | ... | @@ -143,7 +143,7 @@ |
143 | 143 | android:name=".ui.activity.binding.SelectSchoolActivity" |
144 | 144 | android:screenOrientation="portrait" |
145 | 145 | android:windowSoftInputMode="adjustPan|stateHidden"/> |
146 | - android:windowSoftInputMode="adjustPan|stateHidden" /> | |
146 | + | |
147 | 147 | <activity android:name=".ui.activity.LoginAndRegistActivity" |
148 | 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 | 41 | mRxManager.register(mIModel.getTools(areaName).subscribe(new Consumer<JsonObject>() { |
42 | 42 | @Override |
43 | 43 | public void accept(JsonObject jsonObject) throws Exception { |
44 | + | |
44 | 45 | if (jsonObject.get("status").getAsString().equals("1")){ |
45 | 46 | JsonArray jsonArray=jsonObject.getAsJsonArray("data"); |
46 | 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 | 68 | mRxManager.register(mIModel.getBanners(position, areaName).subscribe(new Consumer<JsonObject>() { |
69 | 69 | @Override |
70 | 70 | public void accept(JsonObject jsonObject) throws Exception { |
71 | + Log.d("666666","getBanners="+jsonObject.toString()); | |
71 | 72 | if (jsonObject.get("status").getAsString().equals("1")) { |
72 | 73 | JsonArray jsonArray = jsonObject.getAsJsonArray("data"); |
73 | 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 | 4 | import android.content.Intent; |
5 | 5 | import android.graphics.Bitmap; |
6 | 6 | import android.os.Bundle; |
7 | +import android.util.Log; | |
7 | 8 | import android.view.View; |
8 | 9 | import android.webkit.JavascriptInterface; |
9 | 10 | import android.webkit.WebChromeClient; |
... | ... | @@ -26,8 +27,8 @@ public class WebViewActivity extends BaseCompatActivity { |
26 | 27 | |
27 | 28 | NestedScrollWebView nesteScrollWebView; |
28 | 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 | 33 | int type; |
33 | 34 | |
... | ... | @@ -48,13 +49,13 @@ public class WebViewActivity extends BaseCompatActivity { |
48 | 49 | binding_success=findViewById(R.id.binding_success1); |
49 | 50 | |
50 | 51 | binding_success2=findViewById(R.id.binding_success2); |
51 | - close = findViewById(R.id.close_btn); | |
52 | + close_btn = findViewById(R.id.close_btn); | |
52 | 53 | tv_info = findViewById(R.id.tv_info); |
53 | 54 | zuoye = findViewById(R.id.zuoye); |
54 | 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 | 59 | @Override |
59 | 60 | public void onClick(View v) { |
60 | 61 | onBackPressedSupport(); |
... | ... | @@ -178,8 +179,8 @@ public class WebViewActivity extends BaseCompatActivity { |
178 | 179 | @Override |
179 | 180 | public void onPageStarted(WebView view, String url, Bitmap favicon) { |
180 | 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 | 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 | 27 | import com.shunzhi.parent.contract.consult.ConsultContract; |
28 | 28 | import com.shunzhi.parent.presenter.consult.ConsultPresenter; |
29 | 29 | import com.shunzhi.parent.ui.activity.consult.ConsultOneLevelActivity; |
30 | +import com.shunzhi.parent.ui.activity.mywebview.WebViewActivity; | |
30 | 31 | import com.shunzhi.parent.util.AttrsUtils; |
31 | 32 | import com.shunzhi.parent.views.TextAndImgShowView; |
32 | 33 | import com.stx.xhb.xbanner.XBanner; |
... | ... | @@ -114,6 +115,13 @@ public class ConsultFragment extends BaseMVPCompatFragment<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 | 127 | @NonNull | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/ReportFragment.java
... | ... | @@ -36,7 +36,7 @@ public class ReportFragment extends BaseMVPCompatFragment<ReportContract.ReportP |
36 | 36 | |
37 | 37 | MaterialCalendarView calendarView_month_mode; |
38 | 38 | |
39 | - TextView tvDate,tvShaiXuan; | |
39 | + TextView tvDate,tvShaiXuan,tvNoData; | |
40 | 40 | |
41 | 41 | ShaiXuanPop shaiXuanPop=null; |
42 | 42 | |
... | ... | @@ -57,6 +57,7 @@ public class ReportFragment extends BaseMVPCompatFragment<ReportContract.ReportP |
57 | 57 | calendarView_month_mode = view.findViewById(R.id.calendarView_month_mode); |
58 | 58 | tvDate = view.findViewById(R.id.tvDate); |
59 | 59 | tvShaiXuan=view.findViewById(R.id.tvShaiXuan); |
60 | + tvNoData=view.findViewById(R.id.tvNoData); | |
60 | 61 | |
61 | 62 | LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity()); |
62 | 63 | layoutManager.setOrientation(LinearLayoutManager.VERTICAL); |
... | ... | @@ -117,6 +118,7 @@ public class ReportFragment extends BaseMVPCompatFragment<ReportContract.ReportP |
117 | 118 | @Override |
118 | 119 | public void showReports(List<String> stringList) { |
119 | 120 | if (null!=shaiXuanPop){ |
121 | + if (stringList.size()>0)tvNoData.setVisibility(View.GONE); | |
120 | 122 | shaiXuanPop.setDatas(stringList); |
121 | 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 | 7 | import android.text.TextUtils; |
8 | 8 | import android.view.View; |
9 | 9 | import android.widget.ImageView; |
10 | +import android.widget.TextView; | |
10 | 11 | |
11 | 12 | import com.bumptech.glide.Glide; |
12 | 13 | import com.share.mvpsdk.base.BasePresenter; |
13 | 14 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; |
14 | 15 | import com.shunzhi.parent.AppConfig; |
16 | +import com.shunzhi.parent.AppContext; | |
15 | 17 | import com.shunzhi.parent.R; |
16 | 18 | import com.shunzhi.parent.bean.GuangGaoBean; |
17 | 19 | import com.shunzhi.parent.bean.channel.ChannelBean; |
... | ... | @@ -29,6 +31,8 @@ public class StartFragment extends BaseMVPCompatFragment<ConsultContract.Consult |
29 | 31 | |
30 | 32 | XBanner xBanner; |
31 | 33 | |
34 | + TextView tvJump; | |
35 | + | |
32 | 36 | @Override |
33 | 37 | public int getLayoutId() { |
34 | 38 | return R.layout.fragment_start; |
... | ... | @@ -36,11 +40,23 @@ public class StartFragment extends BaseMVPCompatFragment<ConsultContract.Consult |
36 | 40 | |
37 | 41 | @Override |
38 | 42 | public void initUI(View view, @Nullable Bundle savedInstanceState) { |
43 | + | |
39 | 44 | xBanner = view.findViewById(R.id.xBanner); |
45 | + tvJump=view.findViewById(R.id.tvJump); | |
46 | + | |
40 | 47 | if (!TextUtils.isEmpty(AppConfig.getAppConfig(getContext()).get(AppConfig.APP_IS_START))) { |
41 | - mPresenter.getBanners("0","杭州"); | |
48 | + mPresenter.getBanners("0", "余杭区"); | |
42 | 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 | 62 | @NonNull | ... | ... |
app/src/main/res/drawable/rudiobtn_unclick.xml
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | 2 | <shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android"> |
3 | 3 | <stroke android:color="#00000000" android:width="1dp"/> |
4 | - <solid android:color="#D2D2D2" /> | |
4 | + <solid android:color="@color/xueqing_blue" /> | |
5 | 5 | <corners android:radius="5dp"/> |
6 | 6 | </shape> |
7 | 7 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/fragment_login_and_regist.xml
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | xmlns:tools="http://schemas.android.com/tools" |
4 | 4 | android:layout_width="match_parent" |
5 | 5 | android:layout_height="match_parent" |
6 | + android:background="@color/white" | |
6 | 7 | tools:context="com.shunzhi.parent.ui.fragment.loginandregistfragment.LoginAndRegistFragment"> |
7 | 8 | |
8 | 9 | |
... | ... | @@ -59,6 +60,7 @@ |
59 | 60 | android:text="" |
60 | 61 | android:maxLength="11" |
61 | 62 | android:textColorHint="@color/hintTextColor" |
63 | + android:textColor="@color/textColor" | |
62 | 64 | android:textSize="@dimen/sp_16" /> |
63 | 65 | |
64 | 66 | <TextView |
... | ... | @@ -86,6 +88,7 @@ |
86 | 88 | android:background="@null" |
87 | 89 | android:hint="请输入验证码" |
88 | 90 | android:textColorHint="@color/hintTextColor" |
91 | + android:textColor="@color/textColor" | |
89 | 92 | android:textSize="@dimen/sp_16" /> |
90 | 93 | |
91 | 94 | <TextView | ... | ... |
app/src/main/res/layout/fragment_mine.xml
... | ... | @@ -99,7 +99,7 @@ |
99 | 99 | <LinearLayout |
100 | 100 | android:layout_width="match_parent" |
101 | 101 | android:gravity="center_vertical" |
102 | - android:layout_height="40dp"> | |
102 | + android:layout_height="?android:actionBarSize"> | |
103 | 103 | |
104 | 104 | <TextView |
105 | 105 | android:layout_width="25dp" |
... | ... | @@ -136,7 +136,7 @@ |
136 | 136 | <LinearLayout |
137 | 137 | android:id="@+id/layout_orderDetail" |
138 | 138 | android:layout_width="match_parent" |
139 | - android:layout_height="40dp" | |
139 | + android:layout_height="?android:actionBarSize" | |
140 | 140 | android:gravity="center_vertical" |
141 | 141 | |
142 | 142 | > |
... | ... | @@ -167,7 +167,7 @@ |
167 | 167 | <LinearLayout |
168 | 168 | android:id="@+id/layout_order" |
169 | 169 | android:layout_width="match_parent" |
170 | - android:layout_height="40dp" | |
170 | + android:layout_height="?android:actionBarSize" | |
171 | 171 | android:gravity="center_vertical" |
172 | 172 | > |
173 | 173 | |
... | ... | @@ -197,7 +197,7 @@ |
197 | 197 | <LinearLayout |
198 | 198 | android:id="@+id/childlayout" |
199 | 199 | android:layout_width="match_parent" |
200 | - android:layout_height="40dp" | |
200 | + android:layout_height="?android:actionBarSize" | |
201 | 201 | android:gravity="center_vertical" |
202 | 202 | > |
203 | 203 | ... | ... |
app/src/main/res/layout/fragment_report.xml
... | ... | @@ -46,6 +46,17 @@ |
46 | 46 | android:textSize="@dimen/textSize16" /> |
47 | 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 | 60 | <LinearLayout |
50 | 61 | android:layout_width="match_parent" |
51 | 62 | android:layout_height="match_parent" | ... | ... |
app/src/main/res/layout/fragment_start.xml
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | xmlns:tools="http://schemas.android.com/tools" |
3 | 3 | android:layout_width="match_parent" |
4 | 4 | android:layout_height="match_parent" |
5 | + android:background="@color/bgColor" | |
5 | 6 | tools:context="com.shunzhi.parent.ui.fragment.StartFragment"> |
6 | 7 | |
7 | 8 | <com.stx.xhb.xbanner.XBanner |
... | ... | @@ -9,4 +10,17 @@ |
9 | 10 | android:layout_height="match_parent" |
10 | 11 | android:id="@+id/xBanner" |
11 | 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 | 26 | </FrameLayout> | ... | ... |