Commit e456fe36aae2c52f112e2d8cddb86eefec900d0a
Exists in
yxb_dev
and in
2 other branches
Merge branch 'developer' into yxb_dev
# Conflicts: # .idea/modules.xml
Showing
24 changed files
with
179 additions
and
165 deletions
Show diff stats
.idea/modules.xml
... | ... | @@ -5,7 +5,6 @@ |
5 | 5 | <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> |
6 | 6 | <module fileurl="file://$PROJECT_DIR$/mvpsdk/mvpsdk.iml" filepath="$PROJECT_DIR$/mvpsdk/mvpsdk.iml" /> |
7 | 7 | <module fileurl="file://E:\parentwork\parentWorkHolper.iml" filepath="E:\parentwork\parentWorkHolper.iml" /> |
8 | - <module fileurl="file://F:\parentwork\parentWorkHolper.iml" filepath="F:\parentwork\parentWorkHolper.iml" /> | |
9 | 8 | <module fileurl="file://$PROJECT_DIR$/parentwork.iml" filepath="$PROJECT_DIR$/parentwork.iml" /> |
10 | 9 | <module fileurl="file://F:\parentWorkHolper\parentwork.iml" filepath="F:\parentWorkHolper\parentwork.iml" /> |
11 | 10 | <module fileurl="file://$PROJECT_DIR$/roundedimageview-2.2.1/roundedimageview-2.2.1.iml" filepath="$PROJECT_DIR$/roundedimageview-2.2.1/roundedimageview-2.2.1.iml" /> | ... | ... |
app/src/main/AndroidManifest.xml
... | ... | @@ -69,10 +69,7 @@ |
69 | 69 | <!-- 家长慧测试APPkey --> |
70 | 70 | <meta-data |
71 | 71 | android:name="com.netease.nim.appKey" |
72 | - | |
73 | 72 | android:value="330158c080acdf4dc1092d6a74576c2c" /> |
74 | - | |
75 | - | |
76 | 73 | <meta-data |
77 | 74 | android:name="android.max_aspect" |
78 | 75 | android:value="2.1" /> |
... | ... | @@ -125,7 +122,14 @@ |
125 | 122 | <category android:name="android.intent.category.LAUNCHER" /> |
126 | 123 | </intent-filter> |
127 | 124 | </activity> |
128 | - | |
125 | + <!--<activity--> | |
126 | + <!--android:name=".ui.MainActivity"--> | |
127 | + <!--android:screenOrientation="portrait"--> | |
128 | + <!--android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />--> | |
129 | + <!-- <activity --> | |
130 | + <!-- android:name=".ui.MainActivity" --> | |
131 | + <!-- android:screenOrientation="portrait" --> | |
132 | + <!-- android:windowSoftInputMode="adjustPan|stateAlwaysHidden" /> --> | |
129 | 133 | <activity |
130 | 134 | android:name=".ui.activity.MyChildActivity" |
131 | 135 | android:screenOrientation="portrait" /> |
... | ... | @@ -136,9 +140,7 @@ |
136 | 140 | <activity |
137 | 141 | android:name=".ui.MainActivity" |
138 | 142 | android:launchMode="singleInstance" |
139 | - android:screenOrientation="portrait" | |
140 | - | |
141 | - android:windowSoftInputMode="adjustPan|stateAlwaysHidden" /> | |
143 | + android:screenOrientation="portrait"/> | |
142 | 144 | |
143 | 145 | <activity |
144 | 146 | android:name=".ui.activity.ChildDetialActivity" |
... | ... | @@ -158,21 +160,17 @@ |
158 | 160 | android:name=".ui.activity.LoginAndRegistActivity" |
159 | 161 | android:screenOrientation="portrait" |
160 | 162 | android:windowSoftInputMode="adjustPan|stateHidden" /> |
161 | - | |
162 | 163 | <activity |
163 | 164 | android:name=".ui.activity.PersonInfoActivity" |
164 | 165 | android:launchMode="singleInstance" |
165 | 166 | android:screenOrientation="portrait" |
166 | 167 | android:windowSoftInputMode="adjustPan|stateHidden" /> |
167 | - | |
168 | 168 | <activity |
169 | 169 | android:name=".ui.activity.binding.CheckInfoActivity" |
170 | 170 | android:launchMode="singleInstance" |
171 | 171 | android:screenOrientation="portrait" |
172 | - | |
173 | 172 | android:windowSoftInputMode="adjustPan|stateHidden" /> |
174 | 173 | |
175 | - | |
176 | 174 | <activity |
177 | 175 | android:name=".ui.activity.binding.InviteCodeActivity" |
178 | 176 | android:launchMode="singleInstance" |
... | ... | @@ -182,20 +180,19 @@ |
182 | 180 | android:launchMode="singleInstance" |
183 | 181 | android:screenOrientation="portrait"/> |
184 | 182 | |
183 | + <activity | |
184 | + android:name=".ui.activity.consult.ConsultTwoLevelActivity" | |
185 | + android:launchMode="singleInstance" | |
186 | + android:windowSoftInputMode="adjustPan|stateAlwaysHidden" /> | |
185 | 187 | |
186 | - | |
187 | - <activity android:name=".ui.activity.consult.ConsultTwoLevelActivity" | |
188 | - android:windowSoftInputMode="adjustPan|stateAlwaysHidden" | |
189 | - android:launchMode="singleInstance"/> | |
190 | 188 | <activity |
191 | 189 | android:name=".ui.activity.orderdetail.OrderDetailActivity" |
192 | - android:launchMode="singleInstance"/> | |
190 | + android:launchMode="singleInstance" /> | |
193 | 191 | |
194 | 192 | <service |
195 | 193 | android:name=".ui.service.BadgeIntentService" |
196 | 194 | android:exported="false"> |
197 | 195 | </service> |
198 | - | |
199 | 196 | </application> |
200 | 197 | |
201 | 198 | </manifest> |
202 | 199 | \ No newline at end of file | ... | ... |
app/src/main/java/com/shunzhi/parent/adapter/MyConsultAdapter.java
... | ... | @@ -38,7 +38,10 @@ public class MyConsultAdapter extends BaseRecyclerViewAdapter<ChannelContextBean |
38 | 38 | super.onAttachedToRecyclerView(recyclerView); |
39 | 39 | LinearLayoutManager layoutManager = new LinearLayoutManager(mContext); |
40 | 40 | layoutManager.setOrientation(LinearLayoutManager.VERTICAL); |
41 | + layoutManager.setSmoothScrollbarEnabled(true); | |
42 | + layoutManager.setAutoMeasureEnabled(true); | |
41 | 43 | recyclerView.setLayoutManager(layoutManager); |
44 | + recyclerView.setHasFixedSize(true); | |
42 | 45 | } |
43 | 46 | |
44 | 47 | @Override |
... | ... | @@ -83,7 +86,7 @@ public class MyConsultAdapter extends BaseRecyclerViewAdapter<ChannelContextBean |
83 | 86 | normal_content.setVisibility(View.VISIBLE); |
84 | 87 | tvConsultTitle.setText(object.getTitle()); |
85 | 88 | tvConsultContent.setText(object.getContent()); |
86 | - tvPingLunNums.setText("评论:"+object.getTalkNum()+""); | |
89 | + tvPingLunNums.setText("浏览量:"+object.getLookNum()+""); | |
87 | 90 | tvZhuanFaNums.setText("转发:"+object.getForwardingNum()+""); |
88 | 91 | GlideUtils.showImg(mContext,iv_consult,object.getImage()); |
89 | 92 | normal_content.setOnClickListener(new View.OnClickListener() { | ... | ... |
app/src/main/java/com/shunzhi/parent/bean/channel/ChannelContextBean.java
... | ... | @@ -16,7 +16,15 @@ public class ChannelContextBean implements Serializable{ |
16 | 16 | private int talkNum; |
17 | 17 | private int orderById; |
18 | 18 | private int isAds; |
19 | + private int lookNum; | |
19 | 20 | |
21 | + public int getLookNum() { | |
22 | + return lookNum; | |
23 | + } | |
24 | + | |
25 | + public void setLookNum(int lookNum) { | |
26 | + this.lookNum = lookNum; | |
27 | + } | |
20 | 28 | |
21 | 29 | public int getId() { |
22 | 30 | return id; |
... | ... | @@ -92,17 +100,18 @@ public class ChannelContextBean implements Serializable{ |
92 | 100 | |
93 | 101 | @Override |
94 | 102 | public String toString() { |
95 | - return "ChannelContextBean:{" + | |
96 | - ",id='" + id + '\'' + | |
97 | - ",image='" + image + '\'' + | |
98 | - ",title='" + title + '\'' + | |
99 | - ",url='" + url + '\'' + | |
100 | - ",content='" + content + '\'' + | |
101 | - ",forwardingNum='" + forwardingNum + '\'' + | |
102 | - ",talkNum='" + talkNum + '\'' + | |
103 | - ",orderById='" + orderById + '\'' + | |
103 | + return "ChannelContextBean{" + | |
104 | + "id=" + id + | |
105 | + ", image='" + image + '\'' + | |
106 | + ", title='" + title + '\'' + | |
107 | + ", url='" + url + '\'' + | |
108 | + ", content='" + content + '\'' + | |
109 | + ", forwardingNum=" + forwardingNum + | |
110 | + ", talkNum=" + talkNum + | |
111 | + ", orderById=" + orderById + | |
104 | 112 | ", isAds=" + isAds + |
105 | - "}"; | |
113 | + ", lookNum=" + lookNum + | |
114 | + '}'; | |
106 | 115 | } |
107 | 116 | |
108 | 117 | } | ... | ... |
app/src/main/java/com/shunzhi/parent/bean/message/PHMessage.java
app/src/main/java/com/shunzhi/parent/manager/MessageManager.java
... | ... | @@ -79,9 +79,9 @@ public class MessageManager { |
79 | 79 | public void onEvent(StatusCode statusCode) { |
80 | 80 | if (statusCode == StatusCode.KICKOUT) { |
81 | 81 | Context context = AppContext.getInstance(); |
82 | - Intent i = new Intent(context, LoginAndRegistActivity.class); | |
83 | - i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); | |
84 | - context.startActivity(i); | |
82 | +// Intent i = new Intent(context, LoginAndRegistActivity.class); | |
83 | +// i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); | |
84 | +// context.startActivity(i); | |
85 | 85 | } |
86 | 86 | } |
87 | 87 | }, true); |
... | ... | @@ -107,6 +107,7 @@ public class MessageManager { |
107 | 107 | message.setDate(new Date(customNotification.getTime())); |
108 | 108 | message.setMessageId(uuid); |
109 | 109 | message.setSessionId(session.getSessionId()); |
110 | + message.setExValue(customNotification.getContent()); | |
110 | 111 | message.setSessionType(session.getSessionType()); |
111 | 112 | Long id = messageDao.insert(message); |
112 | 113 | notifyNotification(uuid, id, "收到一条作业通知"); | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/MainActivity.java
... | ... | @@ -103,13 +103,14 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. |
103 | 103 | if (index == i) fragmentTransaction.show(fragments[index]); |
104 | 104 | else fragmentTransaction.hide(fragments[i]); |
105 | 105 | } |
106 | + if (index==CONSULT_INDEX)consultFragment.refresh(); | |
106 | 107 | fragmentTransaction.commit(); |
107 | 108 | } |
108 | 109 | |
109 | 110 | @Override |
110 | 111 | protected void onNewIntent(Intent intent) { |
111 | 112 | super.onNewIntent(intent); |
112 | - handIntent(intent); | |
113 | +// handIntent(intent); | |
113 | 114 | } |
114 | 115 | |
115 | 116 | private void handIntent(Intent intent) { | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/activity/mywebview/WebViewActivity.java
... | ... | @@ -52,12 +52,9 @@ public class WebViewActivity extends BaseCompatActivity { |
52 | 52 | context.startActivity(intent); |
53 | 53 | } |
54 | 54 | |
55 | - | |
56 | 55 | @Override |
57 | 56 | protected void initView(Bundle savedInstanceState) { |
58 | 57 | |
59 | -// binding_success = findViewById(R.id.binding_success); | |
60 | - | |
61 | 58 | binding_success = findViewById(R.id.binding_success1); |
62 | 59 | |
63 | 60 | binding_success2 = findViewById(R.id.binding_success2); |
... | ... | @@ -67,7 +64,6 @@ public class WebViewActivity extends BaseCompatActivity { |
67 | 64 | zuoye = findViewById(R.id.zuoye); |
68 | 65 | title_web = findViewById(R.id.title_web); |
69 | 66 | |
70 | - | |
71 | 67 | close_btn_right.setOnClickListener(new View.OnClickListener() { |
72 | 68 | @Override |
73 | 69 | public void onClick(View v) { |
... | ... | @@ -86,11 +82,8 @@ public class WebViewActivity extends BaseCompatActivity { |
86 | 82 | } |
87 | 83 | }); |
88 | 84 | |
89 | - | |
90 | 85 | nesteScrollWebView = findViewById(R.id.nesteScrollWebView); |
91 | 86 | |
92 | -// nesteScrollWebView = findViewById(R.id.webView); | |
93 | - | |
94 | 87 | pvWeb = findViewById(R.id.pb_web); |
95 | 88 | type = getIntent().getIntExtra("type", 0); |
96 | 89 | if (type == AppConfig.BINDING_SUCCESS_HEZUO) { |
... | ... | @@ -126,7 +119,7 @@ public class WebViewActivity extends BaseCompatActivity { |
126 | 119 | initWebView(); |
127 | 120 | initWebSetting(nesteScrollWebView.getSettings()); |
128 | 121 | nesteScrollWebView.loadUrl(getIntent().getStringExtra("url")); |
129 | - Log.d("66666","getIntent().getStringExtra(\"url\")="+getIntent().getStringExtra("url")); | |
122 | +// Log.d("66666","getIntent().getStringExtra(\"url\")="+getIntent().getStringExtra("url")); | |
130 | 123 | } |
131 | 124 | |
132 | 125 | @Override |
... | ... | @@ -140,7 +133,7 @@ public class WebViewActivity extends BaseCompatActivity { |
140 | 133 | nesteScrollWebView.goBack(); |
141 | 134 | } else { |
142 | 135 | super.onBackPressedSupport(); |
143 | - if(type!=-1&&type!= AppConfig.ORDER_CENTER) { | |
136 | + if (type != -1 && type != AppConfig.ORDER_CENTER) { | |
144 | 137 | startActivity(new Intent().setClass(this, MainActivity.class)); |
145 | 138 | } |
146 | 139 | } |
... | ... | @@ -187,8 +180,10 @@ public class WebViewActivity extends BaseCompatActivity { |
187 | 180 | nesteScrollWebView.addJavascriptInterface(new SupportJavascriptInterface(this), |
188 | 181 | "imagelistner"); |
189 | 182 | nesteScrollWebView.setWebViewClient(new WebViewClient() { |
183 | + | |
190 | 184 | @Override |
191 | 185 | public boolean shouldOverrideUrlLoading(WebView view, String url) { |
186 | +// Log.d("66666","shouldOverrideUrlLoading="+url); | |
192 | 187 | if (url.startsWith("http")) view.loadUrl(url); |
193 | 188 | // if (url.contains("platformapi/startapp")) { |
194 | 189 | // startAlipayActivity(url); |
... | ... | @@ -221,9 +216,6 @@ public class WebViewActivity extends BaseCompatActivity { |
221 | 216 | |
222 | 217 | @Override |
223 | 218 | public void onPageStarted(WebView view, String url, Bitmap favicon) { |
224 | -// Log.d("666666","onPageStartedurl="+url); | |
225 | -// if (url.startsWith("http"))view.loadUrl(url); | |
226 | -// view.getSettings().setJavaScriptEnabled(true); | |
227 | 219 | super.onPageStarted(view, url, favicon); |
228 | 220 | } |
229 | 221 | |
... | ... | @@ -245,6 +237,14 @@ public class WebViewActivity extends BaseCompatActivity { |
245 | 237 | }); |
246 | 238 | |
247 | 239 | nesteScrollWebView.setWebChromeClient(new WebChromeClient() { |
240 | + | |
241 | + @Override | |
242 | + public void onReceivedTitle(WebView view, String title) { | |
243 | + super.onReceivedTitle(view, title); | |
244 | + | |
245 | + if (null != title) title_web.setText(title); | |
246 | + } | |
247 | + | |
248 | 248 | @Override |
249 | 249 | public void onProgressChanged(WebView view, int newProgress) { |
250 | 250 | if (newProgress == 100) { |
... | ... | @@ -255,26 +255,19 @@ public class WebViewActivity extends BaseCompatActivity { |
255 | 255 | } |
256 | 256 | } |
257 | 257 | }); |
258 | + | |
258 | 259 | nesteScrollWebView.setOnLongClickListener(new View.OnLongClickListener() { |
259 | 260 | @Override |
260 | 261 | public boolean onLongClick(View v) { |
261 | 262 | WebView.HitTestResult result = ((WebView) v).getHitTestResult(); |
262 | 263 | if (null == result) |
263 | 264 | return false; |
264 | - | |
265 | -// mPresenter.imageLongClicked(result); | |
266 | -// mImgurl = result.getExtra(); | |
267 | - | |
268 | 265 | return true; |
269 | 266 | } |
270 | 267 | }); |
271 | 268 | |
272 | -// nswvDetailContent.setOnTouchListener(WebViewOnTouchListener); | |
273 | 269 | } |
274 | 270 | |
275 | - | |
276 | - | |
277 | - | |
278 | 271 | /** |
279 | 272 | * 初始化WebSetting |
280 | 273 | * |
... | ... | @@ -288,9 +281,9 @@ public class WebViewActivity extends BaseCompatActivity { |
288 | 281 | // 是否应该支持使用其屏幕缩放控件和手势缩放 |
289 | 282 | settings.setSupportZoom(true); |
290 | 283 | // //是否支持手势缩放控制 |
291 | - // settings.setBuiltInZoomControls(true); | |
284 | + settings.setBuiltInZoomControls(true); | |
292 | 285 | // 是否隐藏原生的缩放控件 |
293 | - // settings.setDisplayZoomControls(false); | |
286 | + settings.setDisplayZoomControls(false); | |
294 | 287 | // 启动应用缓存 |
295 | 288 | settings.setAppCacheEnabled(true); |
296 | 289 | // 排版适应屏幕,只显示一列 |
... | ... | @@ -315,19 +308,6 @@ public class WebViewActivity extends BaseCompatActivity { |
315 | 308 | settings.setCacheMode(WebSettings.LOAD_CACHE_ONLY); |
316 | 309 | } |
317 | 310 | |
318 | - // settings.setBlockNetworkImage(false); | |
319 | - // settings.setAppCacheEnabled(true); | |
320 | - // settings.setDomStorageEnabled(true); | |
321 | - // settings.setDatabaseEnabled(true); | |
322 | - // if (NetworkConnectionUtils.isConnected(mContext)) { | |
323 | - // settings.setCacheMode(WebSettings.LOAD_DEFAULT); | |
324 | - // } else { | |
325 | - // settings.setCacheMode(WebSettings.LOAD_CACHE_ONLY); | |
326 | - // } | |
327 | - // settings.setJavaScriptEnabled(true); | |
328 | - // settings.setLoadWithOverviewMode(true); | |
329 | - // settings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN); | |
330 | - // settings.setSupportZoom(true); | |
331 | 311 | } |
332 | 312 | |
333 | 313 | } | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/activity/orderdetail/OrderDetailActivity.java
... | ... | @@ -175,19 +175,19 @@ public class OrderDetailActivity extends BaseMVPCompatActivity<OrderDetailContra |
175 | 175 | switch (object.payState){ |
176 | 176 | case 0://待支付 |
177 | 177 | tvPayState.setText("待支付"); |
178 | - ivState.setBackgroundColor(getResources().getColor(R.color.md_red_500)); | |
178 | + ivState.setImageDrawable(getResources().getDrawable(R.drawable.order_wait)); | |
179 | 179 | break; |
180 | 180 | case 1://支付成功 |
181 | 181 | tvPayState.setText("支付成功"); |
182 | - ivState.setImageDrawable(getResources().getDrawable(R.drawable.success)); | |
182 | + ivState.setImageDrawable(getResources().getDrawable(R.drawable.order_success)); | |
183 | 183 | break; |
184 | 184 | case 2://交易关闭 |
185 | 185 | tvPayState.setText("交易关闭"); |
186 | - ivState.setBackgroundColor(getResources().getColor(R.color.gray)); | |
186 | + ivState.setImageDrawable(getResources().getDrawable(R.drawable.wait_fail)); | |
187 | 187 | break; |
188 | 188 | case 3: |
189 | 189 | tvPayState.setText("支付失败"); |
190 | - ivState.setImageDrawable(getResources().getDrawable(R.drawable.close)); | |
190 | + ivState.setImageDrawable(getResources().getDrawable(R.drawable.wait_fail)); | |
191 | 191 | break; |
192 | 192 | } |
193 | 193 | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/CePingFragment.java
... | ... | @@ -33,7 +33,6 @@ import java.util.List; |
33 | 33 | import me.leefeng.citypicker.CityPicker; |
34 | 34 | import me.leefeng.citypicker.CityPickerListener; |
35 | 35 | |
36 | - | |
37 | 36 | public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingPresenter, CepingContract.ICePingModel> implements CepingContract.ICePingView |
38 | 37 | , View.OnClickListener, CityPickerListener { |
39 | 38 | |
... | ... | @@ -63,6 +62,7 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP |
63 | 62 | textAndImg_zxlx = view.findViewById(R.id.textAndImg_zxlx); |
64 | 63 | layout_control = view.findViewById(R.id.layout_control); |
65 | 64 | floatingActionButton = view.findViewById(R.id.floatingActionButton); |
65 | + | |
66 | 66 | tvCourse1 = view.findViewById(R.id.tvCourse1); |
67 | 67 | tvCourse2 = view.findViewById(R.id.tvCourse2); |
68 | 68 | tvCourse3 = view.findViewById(R.id.tvCourse3); |
... | ... | @@ -70,7 +70,7 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP |
70 | 70 | ivCourse2 = view.findViewById(R.id.ivCourse2); |
71 | 71 | ivCourse3 = view.findViewById(R.id.ivCourse3); |
72 | 72 | |
73 | - addTools(); | |
73 | + addTools(AppContext.getInstance().district); | |
74 | 74 | |
75 | 75 | textAndImg_xqjc.setTextColor(R.color.white); |
76 | 76 | textAndImg_xqjc.setText("学情检测"); |
... | ... | @@ -93,19 +93,16 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP |
93 | 93 | }); |
94 | 94 | } |
95 | 95 | |
96 | - private void addTools() { | |
96 | + private void addTools(String districtName) { | |
97 | 97 | layout_control.measure(0, 0); |
98 | - mPresenter.getTools(layout_control, AppContext.getInstance().district); | |
98 | + mPresenter.getTools(layout_control,districtName ); | |
99 | 99 | |
100 | 100 | } |
101 | 101 | |
102 | 102 | @Override |
103 | 103 | public void onResume() { |
104 | 104 | super.onResume(); |
105 | -// if (!tvLocalAddress.getText().toString().equals(AppContext.getInstance().cityName)){ | |
106 | 105 | tvLocalAddress.setText(AppContext.getInstance().district); |
107 | -// addTools(); | |
108 | -// } | |
109 | 106 | } |
110 | 107 | |
111 | 108 | private void initListeners(View view) { |
... | ... | @@ -154,13 +151,13 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP |
154 | 151 | else cityPicker.show(); |
155 | 152 | break; |
156 | 153 | case R.id.ivCamera: |
157 | - ToastUtils.showToast("功能暂未上线"); | |
154 | + ToastUtils.showToast("功能暂不开放"); | |
158 | 155 | break; |
159 | 156 | case R.id.textAndImg_xqjc: |
160 | - ToastUtils.showToast("功能暂未上线"); | |
157 | + ToastUtils.showToast("功能暂不开放"); | |
161 | 158 | break; |
162 | 159 | case R.id.textAndImg_zxlx: |
163 | - ToastUtils.showToast("功能暂未上线"); | |
160 | + ToastUtils.showToast("功能暂不开放"); | |
164 | 161 | break; |
165 | 162 | default: |
166 | 163 | break; |
... | ... | @@ -186,7 +183,8 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP |
186 | 183 | @Override |
187 | 184 | public void getCity(String name) { |
188 | 185 | tvLocalAddress.setText(name.split(" ")[2]); |
189 | - mPresenter.getTools(layout_control, name.split(" ")[2]); | |
186 | + addTools(name.split(" ")[2]); | |
187 | +// mPresenter.getTools(layout_control, name.split(" ")[2]); | |
190 | 188 | AppContext.getInstance().cityName = name.split(" ")[1]; |
191 | 189 | AppContext.getInstance().district = name.split(" ")[2]; |
192 | 190 | } | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java
... | ... | @@ -7,6 +7,7 @@ import android.content.IntentFilter; |
7 | 7 | import android.os.Bundle; |
8 | 8 | import android.support.annotation.NonNull; |
9 | 9 | import android.support.annotation.Nullable; |
10 | +import android.support.v4.widget.NestedScrollView; | |
10 | 11 | import android.support.v7.widget.LinearLayoutManager; |
11 | 12 | import android.text.TextUtils; |
12 | 13 | import android.view.View; |
... | ... | @@ -70,6 +71,7 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu |
70 | 71 | int pageIndex = 1; |
71 | 72 | boolean first = true; |
72 | 73 | |
74 | + | |
73 | 75 | @Override |
74 | 76 | public int getLayoutId() { |
75 | 77 | return R.layout.fragment_zi_xun; |
... | ... | @@ -100,7 +102,8 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu |
100 | 102 | } |
101 | 103 | |
102 | 104 | private void initRecycler() { |
103 | - recycler_context.setLayoutManager(new LinearLayoutManager(getActivity())); | |
105 | + | |
106 | + recycler_context.setPullRefreshEnabled(false); | |
104 | 107 | recycler_context.setLoadingListener(new XRecyclerView.LoadingListener() { |
105 | 108 | @Override |
106 | 109 | public void onRefresh() { |
... | ... | @@ -272,4 +275,11 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu |
272 | 275 | AppContext.getInstance().cityName = name.split(" ")[1]; |
273 | 276 | AppContext.getInstance().district = name.split(" ")[2]; |
274 | 277 | } |
278 | + | |
279 | + public void refresh() { | |
280 | + first=true; | |
281 | + tvLocalAddress.setText(AppContext.getInstance().district); | |
282 | + mPresenter.getContextChannel(AppContext.getInstance().district,0,1,pageIndex); | |
283 | + mPresenter.getBanners("2", AppContext.getInstance().district); | |
284 | + } | |
275 | 285 | } | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/StartFragment.java
... | ... | @@ -110,7 +110,6 @@ public class StartFragment extends BaseMVPCompatFragment<ConsultContract.Consult |
110 | 110 | |
111 | 111 | private void initBannes(List<GuangGaoBean> guangGaoBeanList) { |
112 | 112 | try { |
113 | - Log.d("66666","initBannes"+guangGaoBeanList); | |
114 | 113 | if (isQidong) { |
115 | 114 | String fileUrl = "", describe = ""; |
116 | 115 | for (int i = 0; i < guangGaoBeanList.size(); i++) { | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/consult/ConsultOneLevelFragment.java
... | ... | @@ -216,15 +216,15 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment<ConsultOneCon |
216 | 216 | tv_grally_title = itemView.findViewById(R.id.tv_grally_title); |
217 | 217 | frame_root = itemView.findViewById(R.id.frame_root); |
218 | 218 | FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(-1, -1); |
219 | - params.width = DisplayUtils.getScreenWidthPixels(getActivity()) - 100; | |
220 | - params.setMargins(10, 0, 10, 0); | |
219 | +// params.width = DisplayUtils.getScreenWidthPixels(getActivity()) - 100; | |
220 | +// params.setMargins(10, 0, 10, 0); | |
221 | 221 | frame_root.setLayoutParams(params); |
222 | 222 | } |
223 | 223 | |
224 | 224 | @Override |
225 | 225 | public void onBindViewHolder(final GuangGaoBean object, final int position) { |
226 | 226 | GlideUtils.showImg(mContext, iv_grally, object.fileSrc); |
227 | - tv_grally_title.setText(object.describe + ""); | |
227 | + tv_grally_title.setText(object.describe.trim() + ""); | |
228 | 228 | iv_grally.setOnClickListener(new View.OnClickListener() { |
229 | 229 | @Override |
230 | 230 | public void onClick(View v) { | ... | ... |
1.49 KB
1.4 KB
649 Bytes
1.49 KB
app/src/main/res/layout/activity_web_view.xml
... | ... | @@ -26,13 +26,18 @@ |
26 | 26 | android:textSize="@dimen/textSize16" /> |
27 | 27 | <TextView |
28 | 28 | android:id="@+id/title_web" |
29 | + android:singleLine="true" | |
30 | + android:layout_toRightOf="@+id/close_btn" | |
31 | + android:layout_toLeftOf="@+id/close_btn_right" | |
29 | 32 | android:layout_width="wrap_content" |
30 | 33 | android:layout_height="wrap_content" |
31 | 34 | android:text="" |
32 | 35 | android:textSize="@dimen/txtsize_title" |
36 | + android:gravity="center" | |
37 | + android:ellipsize="end" | |
33 | 38 | android:layout_centerInParent="true" |
34 | 39 | android:visibility="gone" |
35 | - android:textColor="@color/textColor" | |
40 | + android:textColor="@color/white" | |
36 | 41 | |
37 | 42 | /> |
38 | 43 | <ImageView | ... | ... |
app/src/main/res/layout/fragment_consult_one_level.xml
... | ... | @@ -4,17 +4,12 @@ |
4 | 4 | android:layout_height="match_parent" |
5 | 5 | android:orientation="vertical" |
6 | 6 | android:background="@color/bgColor" |
7 | - android:paddingTop="@dimen/size_dp_10" | |
8 | - android:paddingRight="@dimen/size_dp_10" | |
9 | - android:paddingLeft="@dimen/size_dp_10" | |
10 | 7 | tools:context="com.shunzhi.parent.ui.fragment.consult.ConsultOneLevelFragment"> |
11 | 8 | |
12 | 9 | <android.support.v7.widget.RecyclerView |
13 | 10 | android:id="@+id/recyclerViewGrally" |
14 | 11 | android:layout_width="match_parent" |
15 | - android:layout_height="0dp" | |
16 | - android:layout_weight="1" | |
17 | - android:layout_marginBottom="@dimen/size_dp_10" | |
12 | + android:layout_height="150dp" | |
18 | 13 | ></android.support.v7.widget.RecyclerView> |
19 | 14 | |
20 | 15 | <include layout="@layout/layout_textandimgshow"/> |
... | ... | @@ -22,8 +17,9 @@ |
22 | 17 | <com.jcodecraeer.xrecyclerview.XRecyclerView |
23 | 18 | android:layout_marginTop="@dimen/size_dp_10" |
24 | 19 | android:layout_width="match_parent" |
25 | - android:layout_height="0dp" | |
26 | - android:layout_weight="3" | |
20 | + android:layout_height="match_parent" | |
21 | + android:layout_marginLeft="@dimen/size_dp_10" | |
22 | + android:layout_marginRight="@dimen/size_dp_10" | |
27 | 23 | android:id="@+id/recyclerViewConsultOne" |
28 | 24 | ></com.jcodecraeer.xrecyclerview.XRecyclerView> |
29 | 25 | ... | ... |
app/src/main/res/layout/fragment_zi_xun.xml
... | ... | @@ -6,79 +6,88 @@ |
6 | 6 | android:orientation="vertical" |
7 | 7 | tools:context="com.shunzhi.parent.ui.fragment.ConsultFragment"> |
8 | 8 | |
9 | - <include layout="@layout/layout_search"/> | |
9 | + <include layout="@layout/layout_search" /> | |
10 | 10 | |
11 | - <com.stx.xhb.xbanner.XBanner | |
12 | - android:id="@+id/xBanner" | |
11 | + <android.support.v4.widget.NestedScrollView | |
12 | + android:id="@+id/nesteScrollView" | |
13 | 13 | android:layout_width="match_parent" |
14 | - android:layout_height="0dp" | |
15 | - android:layout_weight="2"></com.stx.xhb.xbanner.XBanner> | |
14 | + android:layout_height="match_parent"> | |
16 | 15 | |
17 | - | |
18 | -<include layout="@layout/layout_textandimgshow" | |
19 | - /> | |
20 | - | |
21 | - | |
22 | - <LinearLayout | |
23 | - android:layout_width="match_parent" | |
24 | - android:layout_height="0dp" | |
25 | - android:paddingLeft="@dimen/size_dp_10" | |
26 | - android:paddingRight="@dimen/size_dp_10" | |
27 | - android:layout_weight="3" | |
28 | - android:orientation="vertical"> | |
29 | - | |
30 | - <TextView | |
31 | - android:layout_width="match_parent" | |
32 | - android:layout_height="wrap_content" | |
33 | - android:text="@string/consult_huati" | |
34 | - android:textColor="@color/xueqing_blue" | |
35 | - android:textSize="@dimen/textSize16" /> | |
36 | - | |
37 | - <!--<include layout="@layout/layout_consult_content"/>--> | |
38 | 16 | <LinearLayout |
39 | 17 | android:layout_width="match_parent" |
40 | - android:layout_height="wrap_content"> | |
18 | + android:layout_height="match_parent" | |
19 | + android:orientation="vertical"> | |
41 | 20 | |
42 | - <com.jcodecraeer.xrecyclerview.XRecyclerView | |
43 | - android:id="@+id/recycler_content" | |
21 | + | |
22 | + <com.stx.xhb.xbanner.XBanner | |
23 | + android:id="@+id/xBanner" | |
44 | 24 | android:layout_width="match_parent" |
45 | - android:layout_height="wrap_content"> | |
46 | - </com.jcodecraeer.xrecyclerview.XRecyclerView> | |
47 | - </LinearLayout> | |
48 | - </LinearLayout> | |
25 | + android:layout_height="150dp" | |
26 | + ></com.stx.xhb.xbanner.XBanner> | |
49 | 27 | |
50 | 28 | |
51 | - <FrameLayout | |
52 | - android:layout_width="match_parent" | |
53 | - android:visibility="gone" | |
54 | - android:layout_height="0dp" | |
55 | - android:layout_margin="@dimen/size_dp_10" | |
56 | - android:layout_weight="2"> | |
29 | + <include | |
30 | + layout="@layout/layout_textandimgshow" /> | |
57 | 31 | |
58 | - <cn.jzvd.JZVideoPlayerStandard | |
59 | - android:id="@+id/videoplayer" | |
60 | - android:layout_width="match_parent" | |
61 | - android:layout_height="match_parent" | |
62 | - ></cn.jzvd.JZVideoPlayerStandard> | |
63 | - | |
64 | - <TextView | |
65 | - android:id="@+id/tvVideoTitle" | |
66 | - style="@style/TextView_Wrap_16" | |
67 | - android:layout_gravity="bottom" | |
68 | - android:layout_margin="@dimen/size_dp_5" | |
69 | - android:text="视频:关于图形工具的使用" | |
70 | - android:textColor="@color/white" | |
71 | - android:textSize="@dimen/textSize14" /> | |
72 | - | |
73 | - <TextView | |
74 | - android:id="@+id/tvVideoPingluns" | |
75 | - style="@style/TextView_Wrap_16" | |
76 | - android:layout_gravity="right|bottom" | |
77 | - android:layout_margin="@dimen/size_dp_5" | |
78 | - android:text="评论:30" | |
79 | - android:textColor="@color/white" | |
80 | - android:textSize="@dimen/textSize14" /> | |
81 | - | |
82 | - </FrameLayout> | |
83 | 32 | |
33 | + <LinearLayout | |
34 | + android:layout_width="match_parent" | |
35 | + android:layout_height="0dp" | |
36 | + android:layout_weight="3" | |
37 | + android:orientation="vertical" | |
38 | + android:paddingLeft="@dimen/size_dp_10" | |
39 | + android:paddingRight="@dimen/size_dp_10"> | |
40 | + <TextView | |
41 | + android:layout_width="match_parent" | |
42 | + android:layout_height="wrap_content" | |
43 | + android:text="@string/consult_huati" | |
44 | + android:textColor="@color/xueqing_blue" | |
45 | + android:textSize="@dimen/textSize16" /> | |
46 | + | |
47 | + <!--<include layout="@layout/layout_consult_content"/>--> | |
48 | + <LinearLayout | |
49 | + android:layout_width="match_parent" | |
50 | + android:layout_height="wrap_content"> | |
51 | + | |
52 | + <com.jcodecraeer.xrecyclerview.XRecyclerView | |
53 | + android:id="@+id/recycler_content" | |
54 | + android:layout_width="match_parent" | |
55 | + android:layout_height="wrap_content"></com.jcodecraeer.xrecyclerview.XRecyclerView> | |
56 | + </LinearLayout> | |
57 | + </LinearLayout> | |
58 | + | |
59 | + | |
60 | + <FrameLayout | |
61 | + android:layout_width="match_parent" | |
62 | + android:layout_height="0dp" | |
63 | + android:layout_margin="@dimen/size_dp_10" | |
64 | + android:layout_weight="2" | |
65 | + android:visibility="gone"> | |
66 | + | |
67 | + <cn.jzvd.JZVideoPlayerStandard | |
68 | + android:id="@+id/videoplayer" | |
69 | + android:layout_width="match_parent" | |
70 | + android:layout_height="match_parent"></cn.jzvd.JZVideoPlayerStandard> | |
71 | + | |
72 | + <TextView | |
73 | + android:id="@+id/tvVideoTitle" | |
74 | + style="@style/TextView_Wrap_16" | |
75 | + android:layout_gravity="bottom" | |
76 | + android:layout_margin="@dimen/size_dp_5" | |
77 | + android:text="视频:关于图形工具的使用" | |
78 | + android:textColor="@color/white" | |
79 | + android:textSize="@dimen/textSize14" /> | |
80 | + | |
81 | + <TextView | |
82 | + android:id="@+id/tvVideoPingluns" | |
83 | + style="@style/TextView_Wrap_16" | |
84 | + android:layout_gravity="right|bottom" | |
85 | + android:layout_margin="@dimen/size_dp_5" | |
86 | + android:text="评论:30" | |
87 | + android:textColor="@color/white" | |
88 | + android:textSize="@dimen/textSize14" /> | |
89 | + | |
90 | + </FrameLayout> | |
91 | + </LinearLayout> | |
92 | + </android.support.v4.widget.NestedScrollView> | |
84 | 93 | </LinearLayout> | ... | ... |
app/src/main/res/layout/layout_consult_content.xml
app/src/main/res/layout/layout_textandimgshow.xml
app/src/main/res/layout/text_and_img_show.xml
... | ... | @@ -16,8 +16,9 @@ |
16 | 16 | |
17 | 17 | <ImageView |
18 | 18 | android:id="@+id/image" |
19 | - android:layout_width="@dimen/size_dp_50" | |
20 | - android:layout_height="@dimen/size_dp_50" | |
19 | + android:layout_width="wrap_content" | |
20 | + android:layout_height="wrap_content" | |
21 | + android:src="@drawable/zczx" | |
21 | 22 | android:scaleType="fitXY" |
22 | 23 | /> |
23 | 24 | ... | ... |
mvpsdk/src/main/java/com/share/mvpsdk/helper/okhttp/CacheInterceptor.java
... | ... | @@ -24,6 +24,8 @@ public class CacheInterceptor implements Interceptor { |
24 | 24 | |
25 | 25 | @Override |
26 | 26 | public Response intercept(Chain chain) throws IOException { |
27 | + try { | |
28 | + | |
27 | 29 | Request request = chain.request(); |
28 | 30 | if (NetworkConnectionUtils.isNetworkConnected(AppUtils.getContext())) { |
29 | 31 | // 有网络时, 缓存1小时 |
... | ... | @@ -55,7 +57,10 @@ public class CacheInterceptor implements Interceptor { |
55 | 57 | .header("Cache-Control", "public, only-if-cached, max-stale=" + maxStale) |
56 | 58 | .build(); |
57 | 59 | } |
58 | - | |
60 | + }catch (Exception e){ | |
61 | + e.printStackTrace(); | |
62 | + return null; | |
63 | + } | |
59 | 64 | // Request request = chain.request(); |
60 | 65 | // if (!NetworkConnectionUtils.isConnected(AppUtils.getContext())) { |
61 | 66 | // request = request.newBuilder() | ... | ... |