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,7 +5,6 @@ | ||
| 5 | <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> | 5 | <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> |
| 6 | <module fileurl="file://$PROJECT_DIR$/mvpsdk/mvpsdk.iml" filepath="$PROJECT_DIR$/mvpsdk/mvpsdk.iml" /> | 6 | <module fileurl="file://$PROJECT_DIR$/mvpsdk/mvpsdk.iml" filepath="$PROJECT_DIR$/mvpsdk/mvpsdk.iml" /> |
| 7 | <module fileurl="file://E:\parentwork\parentWorkHolper.iml" filepath="E:\parentwork\parentWorkHolper.iml" /> | 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 | <module fileurl="file://$PROJECT_DIR$/parentwork.iml" filepath="$PROJECT_DIR$/parentwork.iml" /> | 8 | <module fileurl="file://$PROJECT_DIR$/parentwork.iml" filepath="$PROJECT_DIR$/parentwork.iml" /> |
| 10 | <module fileurl="file://F:\parentWorkHolper\parentwork.iml" filepath="F:\parentWorkHolper\parentwork.iml" /> | 9 | <module fileurl="file://F:\parentWorkHolper\parentwork.iml" filepath="F:\parentWorkHolper\parentwork.iml" /> |
| 11 | <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" /> | 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,10 +69,7 @@ | ||
| 69 | <!-- 家长慧测试APPkey --> | 69 | <!-- 家长慧测试APPkey --> |
| 70 | <meta-data | 70 | <meta-data |
| 71 | android:name="com.netease.nim.appKey" | 71 | android:name="com.netease.nim.appKey" |
| 72 | - | ||
| 73 | android:value="330158c080acdf4dc1092d6a74576c2c" /> | 72 | android:value="330158c080acdf4dc1092d6a74576c2c" /> |
| 74 | - | ||
| 75 | - | ||
| 76 | <meta-data | 73 | <meta-data |
| 77 | android:name="android.max_aspect" | 74 | android:name="android.max_aspect" |
| 78 | android:value="2.1" /> | 75 | android:value="2.1" /> |
| @@ -125,7 +122,14 @@ | @@ -125,7 +122,14 @@ | ||
| 125 | <category android:name="android.intent.category.LAUNCHER" /> | 122 | <category android:name="android.intent.category.LAUNCHER" /> |
| 126 | </intent-filter> | 123 | </intent-filter> |
| 127 | </activity> | 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 | <activity | 133 | <activity |
| 130 | android:name=".ui.activity.MyChildActivity" | 134 | android:name=".ui.activity.MyChildActivity" |
| 131 | android:screenOrientation="portrait" /> | 135 | android:screenOrientation="portrait" /> |
| @@ -136,9 +140,7 @@ | @@ -136,9 +140,7 @@ | ||
| 136 | <activity | 140 | <activity |
| 137 | android:name=".ui.MainActivity" | 141 | android:name=".ui.MainActivity" |
| 138 | android:launchMode="singleInstance" | 142 | android:launchMode="singleInstance" |
| 139 | - android:screenOrientation="portrait" | ||
| 140 | - | ||
| 141 | - android:windowSoftInputMode="adjustPan|stateAlwaysHidden" /> | 143 | + android:screenOrientation="portrait"/> |
| 142 | 144 | ||
| 143 | <activity | 145 | <activity |
| 144 | android:name=".ui.activity.ChildDetialActivity" | 146 | android:name=".ui.activity.ChildDetialActivity" |
| @@ -158,21 +160,17 @@ | @@ -158,21 +160,17 @@ | ||
| 158 | android:name=".ui.activity.LoginAndRegistActivity" | 160 | android:name=".ui.activity.LoginAndRegistActivity" |
| 159 | android:screenOrientation="portrait" | 161 | android:screenOrientation="portrait" |
| 160 | android:windowSoftInputMode="adjustPan|stateHidden" /> | 162 | android:windowSoftInputMode="adjustPan|stateHidden" /> |
| 161 | - | ||
| 162 | <activity | 163 | <activity |
| 163 | android:name=".ui.activity.PersonInfoActivity" | 164 | android:name=".ui.activity.PersonInfoActivity" |
| 164 | android:launchMode="singleInstance" | 165 | android:launchMode="singleInstance" |
| 165 | android:screenOrientation="portrait" | 166 | android:screenOrientation="portrait" |
| 166 | android:windowSoftInputMode="adjustPan|stateHidden" /> | 167 | android:windowSoftInputMode="adjustPan|stateHidden" /> |
| 167 | - | ||
| 168 | <activity | 168 | <activity |
| 169 | android:name=".ui.activity.binding.CheckInfoActivity" | 169 | android:name=".ui.activity.binding.CheckInfoActivity" |
| 170 | android:launchMode="singleInstance" | 170 | android:launchMode="singleInstance" |
| 171 | android:screenOrientation="portrait" | 171 | android:screenOrientation="portrait" |
| 172 | - | ||
| 173 | android:windowSoftInputMode="adjustPan|stateHidden" /> | 172 | android:windowSoftInputMode="adjustPan|stateHidden" /> |
| 174 | 173 | ||
| 175 | - | ||
| 176 | <activity | 174 | <activity |
| 177 | android:name=".ui.activity.binding.InviteCodeActivity" | 175 | android:name=".ui.activity.binding.InviteCodeActivity" |
| 178 | android:launchMode="singleInstance" | 176 | android:launchMode="singleInstance" |
| @@ -182,20 +180,19 @@ | @@ -182,20 +180,19 @@ | ||
| 182 | android:launchMode="singleInstance" | 180 | android:launchMode="singleInstance" |
| 183 | android:screenOrientation="portrait"/> | 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 | <activity | 188 | <activity |
| 191 | android:name=".ui.activity.orderdetail.OrderDetailActivity" | 189 | android:name=".ui.activity.orderdetail.OrderDetailActivity" |
| 192 | - android:launchMode="singleInstance"/> | 190 | + android:launchMode="singleInstance" /> |
| 193 | 191 | ||
| 194 | <service | 192 | <service |
| 195 | android:name=".ui.service.BadgeIntentService" | 193 | android:name=".ui.service.BadgeIntentService" |
| 196 | android:exported="false"> | 194 | android:exported="false"> |
| 197 | </service> | 195 | </service> |
| 198 | - | ||
| 199 | </application> | 196 | </application> |
| 200 | 197 | ||
| 201 | </manifest> | 198 | </manifest> |
| 202 | \ No newline at end of file | 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,7 +38,10 @@ public class MyConsultAdapter extends BaseRecyclerViewAdapter<ChannelContextBean | ||
| 38 | super.onAttachedToRecyclerView(recyclerView); | 38 | super.onAttachedToRecyclerView(recyclerView); |
| 39 | LinearLayoutManager layoutManager = new LinearLayoutManager(mContext); | 39 | LinearLayoutManager layoutManager = new LinearLayoutManager(mContext); |
| 40 | layoutManager.setOrientation(LinearLayoutManager.VERTICAL); | 40 | layoutManager.setOrientation(LinearLayoutManager.VERTICAL); |
| 41 | + layoutManager.setSmoothScrollbarEnabled(true); | ||
| 42 | + layoutManager.setAutoMeasureEnabled(true); | ||
| 41 | recyclerView.setLayoutManager(layoutManager); | 43 | recyclerView.setLayoutManager(layoutManager); |
| 44 | + recyclerView.setHasFixedSize(true); | ||
| 42 | } | 45 | } |
| 43 | 46 | ||
| 44 | @Override | 47 | @Override |
| @@ -83,7 +86,7 @@ public class MyConsultAdapter extends BaseRecyclerViewAdapter<ChannelContextBean | @@ -83,7 +86,7 @@ public class MyConsultAdapter extends BaseRecyclerViewAdapter<ChannelContextBean | ||
| 83 | normal_content.setVisibility(View.VISIBLE); | 86 | normal_content.setVisibility(View.VISIBLE); |
| 84 | tvConsultTitle.setText(object.getTitle()); | 87 | tvConsultTitle.setText(object.getTitle()); |
| 85 | tvConsultContent.setText(object.getContent()); | 88 | tvConsultContent.setText(object.getContent()); |
| 86 | - tvPingLunNums.setText("评论:"+object.getTalkNum()+""); | 89 | + tvPingLunNums.setText("浏览量:"+object.getLookNum()+""); |
| 87 | tvZhuanFaNums.setText("转发:"+object.getForwardingNum()+""); | 90 | tvZhuanFaNums.setText("转发:"+object.getForwardingNum()+""); |
| 88 | GlideUtils.showImg(mContext,iv_consult,object.getImage()); | 91 | GlideUtils.showImg(mContext,iv_consult,object.getImage()); |
| 89 | normal_content.setOnClickListener(new View.OnClickListener() { | 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,7 +16,15 @@ public class ChannelContextBean implements Serializable{ | ||
| 16 | private int talkNum; | 16 | private int talkNum; |
| 17 | private int orderById; | 17 | private int orderById; |
| 18 | private int isAds; | 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 | public int getId() { | 29 | public int getId() { |
| 22 | return id; | 30 | return id; |
| @@ -92,17 +100,18 @@ public class ChannelContextBean implements Serializable{ | @@ -92,17 +100,18 @@ public class ChannelContextBean implements Serializable{ | ||
| 92 | 100 | ||
| 93 | @Override | 101 | @Override |
| 94 | public String toString() { | 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 | ", isAds=" + isAds + | 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
| @@ -56,7 +56,6 @@ public class PHMessage { | @@ -56,7 +56,6 @@ public class PHMessage { | ||
| 56 | public PHMessage() { | 56 | public PHMessage() { |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | - | ||
| 60 | @Keep | 59 | @Keep |
| 61 | public static long findUnreadNotificationCountBySessionType(Collection<Integer> types) { | 60 | public static long findUnreadNotificationCountBySessionType(Collection<Integer> types) { |
| 62 | PHMessageDao dao = AppContext.getInstance().getDaoSession().getPHMessageDao(); | 61 | PHMessageDao dao = AppContext.getInstance().getDaoSession().getPHMessageDao(); |
app/src/main/java/com/shunzhi/parent/manager/MessageManager.java
| @@ -79,9 +79,9 @@ public class MessageManager { | @@ -79,9 +79,9 @@ public class MessageManager { | ||
| 79 | public void onEvent(StatusCode statusCode) { | 79 | public void onEvent(StatusCode statusCode) { |
| 80 | if (statusCode == StatusCode.KICKOUT) { | 80 | if (statusCode == StatusCode.KICKOUT) { |
| 81 | Context context = AppContext.getInstance(); | 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 | }, true); | 87 | }, true); |
| @@ -107,6 +107,7 @@ public class MessageManager { | @@ -107,6 +107,7 @@ public class MessageManager { | ||
| 107 | message.setDate(new Date(customNotification.getTime())); | 107 | message.setDate(new Date(customNotification.getTime())); |
| 108 | message.setMessageId(uuid); | 108 | message.setMessageId(uuid); |
| 109 | message.setSessionId(session.getSessionId()); | 109 | message.setSessionId(session.getSessionId()); |
| 110 | + message.setExValue(customNotification.getContent()); | ||
| 110 | message.setSessionType(session.getSessionType()); | 111 | message.setSessionType(session.getSessionType()); |
| 111 | Long id = messageDao.insert(message); | 112 | Long id = messageDao.insert(message); |
| 112 | notifyNotification(uuid, id, "收到一条作业通知"); | 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,13 +103,14 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. | ||
| 103 | if (index == i) fragmentTransaction.show(fragments[index]); | 103 | if (index == i) fragmentTransaction.show(fragments[index]); |
| 104 | else fragmentTransaction.hide(fragments[i]); | 104 | else fragmentTransaction.hide(fragments[i]); |
| 105 | } | 105 | } |
| 106 | + if (index==CONSULT_INDEX)consultFragment.refresh(); | ||
| 106 | fragmentTransaction.commit(); | 107 | fragmentTransaction.commit(); |
| 107 | } | 108 | } |
| 108 | 109 | ||
| 109 | @Override | 110 | @Override |
| 110 | protected void onNewIntent(Intent intent) { | 111 | protected void onNewIntent(Intent intent) { |
| 111 | super.onNewIntent(intent); | 112 | super.onNewIntent(intent); |
| 112 | - handIntent(intent); | 113 | +// handIntent(intent); |
| 113 | } | 114 | } |
| 114 | 115 | ||
| 115 | private void handIntent(Intent intent) { | 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,12 +52,9 @@ public class WebViewActivity extends BaseCompatActivity { | ||
| 52 | context.startActivity(intent); | 52 | context.startActivity(intent); |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | - | ||
| 56 | @Override | 55 | @Override |
| 57 | protected void initView(Bundle savedInstanceState) { | 56 | protected void initView(Bundle savedInstanceState) { |
| 58 | 57 | ||
| 59 | -// binding_success = findViewById(R.id.binding_success); | ||
| 60 | - | ||
| 61 | binding_success = findViewById(R.id.binding_success1); | 58 | binding_success = findViewById(R.id.binding_success1); |
| 62 | 59 | ||
| 63 | binding_success2 = findViewById(R.id.binding_success2); | 60 | binding_success2 = findViewById(R.id.binding_success2); |
| @@ -67,7 +64,6 @@ public class WebViewActivity extends BaseCompatActivity { | @@ -67,7 +64,6 @@ public class WebViewActivity extends BaseCompatActivity { | ||
| 67 | zuoye = findViewById(R.id.zuoye); | 64 | zuoye = findViewById(R.id.zuoye); |
| 68 | title_web = findViewById(R.id.title_web); | 65 | title_web = findViewById(R.id.title_web); |
| 69 | 66 | ||
| 70 | - | ||
| 71 | close_btn_right.setOnClickListener(new View.OnClickListener() { | 67 | close_btn_right.setOnClickListener(new View.OnClickListener() { |
| 72 | @Override | 68 | @Override |
| 73 | public void onClick(View v) { | 69 | public void onClick(View v) { |
| @@ -86,11 +82,8 @@ public class WebViewActivity extends BaseCompatActivity { | @@ -86,11 +82,8 @@ public class WebViewActivity extends BaseCompatActivity { | ||
| 86 | } | 82 | } |
| 87 | }); | 83 | }); |
| 88 | 84 | ||
| 89 | - | ||
| 90 | nesteScrollWebView = findViewById(R.id.nesteScrollWebView); | 85 | nesteScrollWebView = findViewById(R.id.nesteScrollWebView); |
| 91 | 86 | ||
| 92 | -// nesteScrollWebView = findViewById(R.id.webView); | ||
| 93 | - | ||
| 94 | pvWeb = findViewById(R.id.pb_web); | 87 | pvWeb = findViewById(R.id.pb_web); |
| 95 | type = getIntent().getIntExtra("type", 0); | 88 | type = getIntent().getIntExtra("type", 0); |
| 96 | if (type == AppConfig.BINDING_SUCCESS_HEZUO) { | 89 | if (type == AppConfig.BINDING_SUCCESS_HEZUO) { |
| @@ -126,7 +119,7 @@ public class WebViewActivity extends BaseCompatActivity { | @@ -126,7 +119,7 @@ public class WebViewActivity extends BaseCompatActivity { | ||
| 126 | initWebView(); | 119 | initWebView(); |
| 127 | initWebSetting(nesteScrollWebView.getSettings()); | 120 | initWebSetting(nesteScrollWebView.getSettings()); |
| 128 | nesteScrollWebView.loadUrl(getIntent().getStringExtra("url")); | 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 | @Override | 125 | @Override |
| @@ -140,7 +133,7 @@ public class WebViewActivity extends BaseCompatActivity { | @@ -140,7 +133,7 @@ public class WebViewActivity extends BaseCompatActivity { | ||
| 140 | nesteScrollWebView.goBack(); | 133 | nesteScrollWebView.goBack(); |
| 141 | } else { | 134 | } else { |
| 142 | super.onBackPressedSupport(); | 135 | super.onBackPressedSupport(); |
| 143 | - if(type!=-1&&type!= AppConfig.ORDER_CENTER) { | 136 | + if (type != -1 && type != AppConfig.ORDER_CENTER) { |
| 144 | startActivity(new Intent().setClass(this, MainActivity.class)); | 137 | startActivity(new Intent().setClass(this, MainActivity.class)); |
| 145 | } | 138 | } |
| 146 | } | 139 | } |
| @@ -187,8 +180,10 @@ public class WebViewActivity extends BaseCompatActivity { | @@ -187,8 +180,10 @@ public class WebViewActivity extends BaseCompatActivity { | ||
| 187 | nesteScrollWebView.addJavascriptInterface(new SupportJavascriptInterface(this), | 180 | nesteScrollWebView.addJavascriptInterface(new SupportJavascriptInterface(this), |
| 188 | "imagelistner"); | 181 | "imagelistner"); |
| 189 | nesteScrollWebView.setWebViewClient(new WebViewClient() { | 182 | nesteScrollWebView.setWebViewClient(new WebViewClient() { |
| 183 | + | ||
| 190 | @Override | 184 | @Override |
| 191 | public boolean shouldOverrideUrlLoading(WebView view, String url) { | 185 | public boolean shouldOverrideUrlLoading(WebView view, String url) { |
| 186 | +// Log.d("66666","shouldOverrideUrlLoading="+url); | ||
| 192 | if (url.startsWith("http")) view.loadUrl(url); | 187 | if (url.startsWith("http")) view.loadUrl(url); |
| 193 | // if (url.contains("platformapi/startapp")) { | 188 | // if (url.contains("platformapi/startapp")) { |
| 194 | // startAlipayActivity(url); | 189 | // startAlipayActivity(url); |
| @@ -221,9 +216,6 @@ public class WebViewActivity extends BaseCompatActivity { | @@ -221,9 +216,6 @@ public class WebViewActivity extends BaseCompatActivity { | ||
| 221 | 216 | ||
| 222 | @Override | 217 | @Override |
| 223 | public void onPageStarted(WebView view, String url, Bitmap favicon) { | 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 | super.onPageStarted(view, url, favicon); | 219 | super.onPageStarted(view, url, favicon); |
| 228 | } | 220 | } |
| 229 | 221 | ||
| @@ -245,6 +237,14 @@ public class WebViewActivity extends BaseCompatActivity { | @@ -245,6 +237,14 @@ public class WebViewActivity extends BaseCompatActivity { | ||
| 245 | }); | 237 | }); |
| 246 | 238 | ||
| 247 | nesteScrollWebView.setWebChromeClient(new WebChromeClient() { | 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 | @Override | 248 | @Override |
| 249 | public void onProgressChanged(WebView view, int newProgress) { | 249 | public void onProgressChanged(WebView view, int newProgress) { |
| 250 | if (newProgress == 100) { | 250 | if (newProgress == 100) { |
| @@ -255,26 +255,19 @@ public class WebViewActivity extends BaseCompatActivity { | @@ -255,26 +255,19 @@ public class WebViewActivity extends BaseCompatActivity { | ||
| 255 | } | 255 | } |
| 256 | } | 256 | } |
| 257 | }); | 257 | }); |
| 258 | + | ||
| 258 | nesteScrollWebView.setOnLongClickListener(new View.OnLongClickListener() { | 259 | nesteScrollWebView.setOnLongClickListener(new View.OnLongClickListener() { |
| 259 | @Override | 260 | @Override |
| 260 | public boolean onLongClick(View v) { | 261 | public boolean onLongClick(View v) { |
| 261 | WebView.HitTestResult result = ((WebView) v).getHitTestResult(); | 262 | WebView.HitTestResult result = ((WebView) v).getHitTestResult(); |
| 262 | if (null == result) | 263 | if (null == result) |
| 263 | return false; | 264 | return false; |
| 264 | - | ||
| 265 | -// mPresenter.imageLongClicked(result); | ||
| 266 | -// mImgurl = result.getExtra(); | ||
| 267 | - | ||
| 268 | return true; | 265 | return true; |
| 269 | } | 266 | } |
| 270 | }); | 267 | }); |
| 271 | 268 | ||
| 272 | -// nswvDetailContent.setOnTouchListener(WebViewOnTouchListener); | ||
| 273 | } | 269 | } |
| 274 | 270 | ||
| 275 | - | ||
| 276 | - | ||
| 277 | - | ||
| 278 | /** | 271 | /** |
| 279 | * 初始化WebSetting | 272 | * 初始化WebSetting |
| 280 | * | 273 | * |
| @@ -288,9 +281,9 @@ public class WebViewActivity extends BaseCompatActivity { | @@ -288,9 +281,9 @@ public class WebViewActivity extends BaseCompatActivity { | ||
| 288 | // 是否应该支持使用其屏幕缩放控件和手势缩放 | 281 | // 是否应该支持使用其屏幕缩放控件和手势缩放 |
| 289 | settings.setSupportZoom(true); | 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 | settings.setAppCacheEnabled(true); | 288 | settings.setAppCacheEnabled(true); |
| 296 | // 排版适应屏幕,只显示一列 | 289 | // 排版适应屏幕,只显示一列 |
| @@ -315,19 +308,6 @@ public class WebViewActivity extends BaseCompatActivity { | @@ -315,19 +308,6 @@ public class WebViewActivity extends BaseCompatActivity { | ||
| 315 | settings.setCacheMode(WebSettings.LOAD_CACHE_ONLY); | 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,19 +175,19 @@ public class OrderDetailActivity extends BaseMVPCompatActivity<OrderDetailContra | ||
| 175 | switch (object.payState){ | 175 | switch (object.payState){ |
| 176 | case 0://待支付 | 176 | case 0://待支付 |
| 177 | tvPayState.setText("待支付"); | 177 | tvPayState.setText("待支付"); |
| 178 | - ivState.setBackgroundColor(getResources().getColor(R.color.md_red_500)); | 178 | + ivState.setImageDrawable(getResources().getDrawable(R.drawable.order_wait)); |
| 179 | break; | 179 | break; |
| 180 | case 1://支付成功 | 180 | case 1://支付成功 |
| 181 | tvPayState.setText("支付成功"); | 181 | tvPayState.setText("支付成功"); |
| 182 | - ivState.setImageDrawable(getResources().getDrawable(R.drawable.success)); | 182 | + ivState.setImageDrawable(getResources().getDrawable(R.drawable.order_success)); |
| 183 | break; | 183 | break; |
| 184 | case 2://交易关闭 | 184 | case 2://交易关闭 |
| 185 | tvPayState.setText("交易关闭"); | 185 | tvPayState.setText("交易关闭"); |
| 186 | - ivState.setBackgroundColor(getResources().getColor(R.color.gray)); | 186 | + ivState.setImageDrawable(getResources().getDrawable(R.drawable.wait_fail)); |
| 187 | break; | 187 | break; |
| 188 | case 3: | 188 | case 3: |
| 189 | tvPayState.setText("支付失败"); | 189 | tvPayState.setText("支付失败"); |
| 190 | - ivState.setImageDrawable(getResources().getDrawable(R.drawable.close)); | 190 | + ivState.setImageDrawable(getResources().getDrawable(R.drawable.wait_fail)); |
| 191 | break; | 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,7 +33,6 @@ import java.util.List; | ||
| 33 | import me.leefeng.citypicker.CityPicker; | 33 | import me.leefeng.citypicker.CityPicker; |
| 34 | import me.leefeng.citypicker.CityPickerListener; | 34 | import me.leefeng.citypicker.CityPickerListener; |
| 35 | 35 | ||
| 36 | - | ||
| 37 | public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingPresenter, CepingContract.ICePingModel> implements CepingContract.ICePingView | 36 | public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingPresenter, CepingContract.ICePingModel> implements CepingContract.ICePingView |
| 38 | , View.OnClickListener, CityPickerListener { | 37 | , View.OnClickListener, CityPickerListener { |
| 39 | 38 | ||
| @@ -63,6 +62,7 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | @@ -63,6 +62,7 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | ||
| 63 | textAndImg_zxlx = view.findViewById(R.id.textAndImg_zxlx); | 62 | textAndImg_zxlx = view.findViewById(R.id.textAndImg_zxlx); |
| 64 | layout_control = view.findViewById(R.id.layout_control); | 63 | layout_control = view.findViewById(R.id.layout_control); |
| 65 | floatingActionButton = view.findViewById(R.id.floatingActionButton); | 64 | floatingActionButton = view.findViewById(R.id.floatingActionButton); |
| 65 | + | ||
| 66 | tvCourse1 = view.findViewById(R.id.tvCourse1); | 66 | tvCourse1 = view.findViewById(R.id.tvCourse1); |
| 67 | tvCourse2 = view.findViewById(R.id.tvCourse2); | 67 | tvCourse2 = view.findViewById(R.id.tvCourse2); |
| 68 | tvCourse3 = view.findViewById(R.id.tvCourse3); | 68 | tvCourse3 = view.findViewById(R.id.tvCourse3); |
| @@ -70,7 +70,7 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | @@ -70,7 +70,7 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | ||
| 70 | ivCourse2 = view.findViewById(R.id.ivCourse2); | 70 | ivCourse2 = view.findViewById(R.id.ivCourse2); |
| 71 | ivCourse3 = view.findViewById(R.id.ivCourse3); | 71 | ivCourse3 = view.findViewById(R.id.ivCourse3); |
| 72 | 72 | ||
| 73 | - addTools(); | 73 | + addTools(AppContext.getInstance().district); |
| 74 | 74 | ||
| 75 | textAndImg_xqjc.setTextColor(R.color.white); | 75 | textAndImg_xqjc.setTextColor(R.color.white); |
| 76 | textAndImg_xqjc.setText("学情检测"); | 76 | textAndImg_xqjc.setText("学情检测"); |
| @@ -93,19 +93,16 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | @@ -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 | layout_control.measure(0, 0); | 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 | @Override | 102 | @Override |
| 103 | public void onResume() { | 103 | public void onResume() { |
| 104 | super.onResume(); | 104 | super.onResume(); |
| 105 | -// if (!tvLocalAddress.getText().toString().equals(AppContext.getInstance().cityName)){ | ||
| 106 | tvLocalAddress.setText(AppContext.getInstance().district); | 105 | tvLocalAddress.setText(AppContext.getInstance().district); |
| 107 | -// addTools(); | ||
| 108 | -// } | ||
| 109 | } | 106 | } |
| 110 | 107 | ||
| 111 | private void initListeners(View view) { | 108 | private void initListeners(View view) { |
| @@ -154,13 +151,13 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | @@ -154,13 +151,13 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | ||
| 154 | else cityPicker.show(); | 151 | else cityPicker.show(); |
| 155 | break; | 152 | break; |
| 156 | case R.id.ivCamera: | 153 | case R.id.ivCamera: |
| 157 | - ToastUtils.showToast("功能暂未上线"); | 154 | + ToastUtils.showToast("功能暂不开放"); |
| 158 | break; | 155 | break; |
| 159 | case R.id.textAndImg_xqjc: | 156 | case R.id.textAndImg_xqjc: |
| 160 | - ToastUtils.showToast("功能暂未上线"); | 157 | + ToastUtils.showToast("功能暂不开放"); |
| 161 | break; | 158 | break; |
| 162 | case R.id.textAndImg_zxlx: | 159 | case R.id.textAndImg_zxlx: |
| 163 | - ToastUtils.showToast("功能暂未上线"); | 160 | + ToastUtils.showToast("功能暂不开放"); |
| 164 | break; | 161 | break; |
| 165 | default: | 162 | default: |
| 166 | break; | 163 | break; |
| @@ -186,7 +183,8 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | @@ -186,7 +183,8 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | ||
| 186 | @Override | 183 | @Override |
| 187 | public void getCity(String name) { | 184 | public void getCity(String name) { |
| 188 | tvLocalAddress.setText(name.split(" ")[2]); | 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 | AppContext.getInstance().cityName = name.split(" ")[1]; | 188 | AppContext.getInstance().cityName = name.split(" ")[1]; |
| 191 | AppContext.getInstance().district = name.split(" ")[2]; | 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,6 +7,7 @@ import android.content.IntentFilter; | ||
| 7 | import android.os.Bundle; | 7 | import android.os.Bundle; |
| 8 | import android.support.annotation.NonNull; | 8 | import android.support.annotation.NonNull; |
| 9 | import android.support.annotation.Nullable; | 9 | import android.support.annotation.Nullable; |
| 10 | +import android.support.v4.widget.NestedScrollView; | ||
| 10 | import android.support.v7.widget.LinearLayoutManager; | 11 | import android.support.v7.widget.LinearLayoutManager; |
| 11 | import android.text.TextUtils; | 12 | import android.text.TextUtils; |
| 12 | import android.view.View; | 13 | import android.view.View; |
| @@ -70,6 +71,7 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | @@ -70,6 +71,7 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
| 70 | int pageIndex = 1; | 71 | int pageIndex = 1; |
| 71 | boolean first = true; | 72 | boolean first = true; |
| 72 | 73 | ||
| 74 | + | ||
| 73 | @Override | 75 | @Override |
| 74 | public int getLayoutId() { | 76 | public int getLayoutId() { |
| 75 | return R.layout.fragment_zi_xun; | 77 | return R.layout.fragment_zi_xun; |
| @@ -100,7 +102,8 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | @@ -100,7 +102,8 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
| 100 | } | 102 | } |
| 101 | 103 | ||
| 102 | private void initRecycler() { | 104 | private void initRecycler() { |
| 103 | - recycler_context.setLayoutManager(new LinearLayoutManager(getActivity())); | 105 | + |
| 106 | + recycler_context.setPullRefreshEnabled(false); | ||
| 104 | recycler_context.setLoadingListener(new XRecyclerView.LoadingListener() { | 107 | recycler_context.setLoadingListener(new XRecyclerView.LoadingListener() { |
| 105 | @Override | 108 | @Override |
| 106 | public void onRefresh() { | 109 | public void onRefresh() { |
| @@ -272,4 +275,11 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | @@ -272,4 +275,11 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
| 272 | AppContext.getInstance().cityName = name.split(" ")[1]; | 275 | AppContext.getInstance().cityName = name.split(" ")[1]; |
| 273 | AppContext.getInstance().district = name.split(" ")[2]; | 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,7 +110,6 @@ public class StartFragment extends BaseMVPCompatFragment<ConsultContract.Consult | ||
| 110 | 110 | ||
| 111 | private void initBannes(List<GuangGaoBean> guangGaoBeanList) { | 111 | private void initBannes(List<GuangGaoBean> guangGaoBeanList) { |
| 112 | try { | 112 | try { |
| 113 | - Log.d("66666","initBannes"+guangGaoBeanList); | ||
| 114 | if (isQidong) { | 113 | if (isQidong) { |
| 115 | String fileUrl = "", describe = ""; | 114 | String fileUrl = "", describe = ""; |
| 116 | for (int i = 0; i < guangGaoBeanList.size(); i++) { | 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,15 +216,15 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment<ConsultOneCon | ||
| 216 | tv_grally_title = itemView.findViewById(R.id.tv_grally_title); | 216 | tv_grally_title = itemView.findViewById(R.id.tv_grally_title); |
| 217 | frame_root = itemView.findViewById(R.id.frame_root); | 217 | frame_root = itemView.findViewById(R.id.frame_root); |
| 218 | FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(-1, -1); | 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 | frame_root.setLayoutParams(params); | 221 | frame_root.setLayoutParams(params); |
| 222 | } | 222 | } |
| 223 | 223 | ||
| 224 | @Override | 224 | @Override |
| 225 | public void onBindViewHolder(final GuangGaoBean object, final int position) { | 225 | public void onBindViewHolder(final GuangGaoBean object, final int position) { |
| 226 | GlideUtils.showImg(mContext, iv_grally, object.fileSrc); | 226 | GlideUtils.showImg(mContext, iv_grally, object.fileSrc); |
| 227 | - tv_grally_title.setText(object.describe + ""); | 227 | + tv_grally_title.setText(object.describe.trim() + ""); |
| 228 | iv_grally.setOnClickListener(new View.OnClickListener() { | 228 | iv_grally.setOnClickListener(new View.OnClickListener() { |
| 229 | @Override | 229 | @Override |
| 230 | public void onClick(View v) { | 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,13 +26,18 @@ | ||
| 26 | android:textSize="@dimen/textSize16" /> | 26 | android:textSize="@dimen/textSize16" /> |
| 27 | <TextView | 27 | <TextView |
| 28 | android:id="@+id/title_web" | 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 | android:layout_width="wrap_content" | 32 | android:layout_width="wrap_content" |
| 30 | android:layout_height="wrap_content" | 33 | android:layout_height="wrap_content" |
| 31 | android:text="" | 34 | android:text="" |
| 32 | android:textSize="@dimen/txtsize_title" | 35 | android:textSize="@dimen/txtsize_title" |
| 36 | + android:gravity="center" | ||
| 37 | + android:ellipsize="end" | ||
| 33 | android:layout_centerInParent="true" | 38 | android:layout_centerInParent="true" |
| 34 | android:visibility="gone" | 39 | android:visibility="gone" |
| 35 | - android:textColor="@color/textColor" | 40 | + android:textColor="@color/white" |
| 36 | 41 | ||
| 37 | /> | 42 | /> |
| 38 | <ImageView | 43 | <ImageView |
app/src/main/res/layout/fragment_consult_one_level.xml
| @@ -4,17 +4,12 @@ | @@ -4,17 +4,12 @@ | ||
| 4 | android:layout_height="match_parent" | 4 | android:layout_height="match_parent" |
| 5 | android:orientation="vertical" | 5 | android:orientation="vertical" |
| 6 | android:background="@color/bgColor" | 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 | tools:context="com.shunzhi.parent.ui.fragment.consult.ConsultOneLevelFragment"> | 7 | tools:context="com.shunzhi.parent.ui.fragment.consult.ConsultOneLevelFragment"> |
| 11 | 8 | ||
| 12 | <android.support.v7.widget.RecyclerView | 9 | <android.support.v7.widget.RecyclerView |
| 13 | android:id="@+id/recyclerViewGrally" | 10 | android:id="@+id/recyclerViewGrally" |
| 14 | android:layout_width="match_parent" | 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 | ></android.support.v7.widget.RecyclerView> | 13 | ></android.support.v7.widget.RecyclerView> |
| 19 | 14 | ||
| 20 | <include layout="@layout/layout_textandimgshow"/> | 15 | <include layout="@layout/layout_textandimgshow"/> |
| @@ -22,8 +17,9 @@ | @@ -22,8 +17,9 @@ | ||
| 22 | <com.jcodecraeer.xrecyclerview.XRecyclerView | 17 | <com.jcodecraeer.xrecyclerview.XRecyclerView |
| 23 | android:layout_marginTop="@dimen/size_dp_10" | 18 | android:layout_marginTop="@dimen/size_dp_10" |
| 24 | android:layout_width="match_parent" | 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 | android:id="@+id/recyclerViewConsultOne" | 23 | android:id="@+id/recyclerViewConsultOne" |
| 28 | ></com.jcodecraeer.xrecyclerview.XRecyclerView> | 24 | ></com.jcodecraeer.xrecyclerview.XRecyclerView> |
| 29 | 25 |
app/src/main/res/layout/fragment_zi_xun.xml
| @@ -6,79 +6,88 @@ | @@ -6,79 +6,88 @@ | ||
| 6 | android:orientation="vertical" | 6 | android:orientation="vertical" |
| 7 | tools:context="com.shunzhi.parent.ui.fragment.ConsultFragment"> | 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 | android:layout_width="match_parent" | 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 | <LinearLayout | 16 | <LinearLayout |
| 39 | android:layout_width="match_parent" | 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 | android:layout_width="match_parent" | 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 | </LinearLayout> | 93 | </LinearLayout> |
app/src/main/res/layout/layout_consult_content.xml
| @@ -72,6 +72,7 @@ | @@ -72,6 +72,7 @@ | ||
| 72 | android:layout_alignParentRight="true" | 72 | android:layout_alignParentRight="true" |
| 73 | android:layout_centerVertical="true" | 73 | android:layout_centerVertical="true" |
| 74 | android:text="转发:50" | 74 | android:text="转发:50" |
| 75 | + android:visibility="gone" | ||
| 75 | android:textSize="@dimen/textSize14" /> | 76 | android:textSize="@dimen/textSize14" /> |
| 76 | </RelativeLayout> | 77 | </RelativeLayout> |
| 77 | </FrameLayout> | 78 | </FrameLayout> |
app/src/main/res/layout/layout_textandimgshow.xml
| @@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
| 3 | android:layout_width="match_parent" | 3 | android:layout_width="match_parent" |
| 4 | android:layout_height="wrap_content" | 4 | android:layout_height="wrap_content" |
| 5 | android:orientation="horizontal" | 5 | android:orientation="horizontal" |
| 6 | + android:layout_margin="@dimen/size_dp_10" | ||
| 6 | android:background="@drawable/report_white" | 7 | android:background="@drawable/report_white" |
| 7 | android:scrollbars="none"> | 8 | android:scrollbars="none"> |
| 8 | 9 |
app/src/main/res/layout/text_and_img_show.xml
| @@ -16,8 +16,9 @@ | @@ -16,8 +16,9 @@ | ||
| 16 | 16 | ||
| 17 | <ImageView | 17 | <ImageView |
| 18 | android:id="@+id/image" | 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 | android:scaleType="fitXY" | 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,6 +24,8 @@ public class CacheInterceptor implements Interceptor { | ||
| 24 | 24 | ||
| 25 | @Override | 25 | @Override |
| 26 | public Response intercept(Chain chain) throws IOException { | 26 | public Response intercept(Chain chain) throws IOException { |
| 27 | + try { | ||
| 28 | + | ||
| 27 | Request request = chain.request(); | 29 | Request request = chain.request(); |
| 28 | if (NetworkConnectionUtils.isNetworkConnected(AppUtils.getContext())) { | 30 | if (NetworkConnectionUtils.isNetworkConnected(AppUtils.getContext())) { |
| 29 | // 有网络时, 缓存1小时 | 31 | // 有网络时, 缓存1小时 |
| @@ -55,7 +57,10 @@ public class CacheInterceptor implements Interceptor { | @@ -55,7 +57,10 @@ public class CacheInterceptor implements Interceptor { | ||
| 55 | .header("Cache-Control", "public, only-if-cached, max-stale=" + maxStale) | 57 | .header("Cache-Control", "public, only-if-cached, max-stale=" + maxStale) |
| 56 | .build(); | 58 | .build(); |
| 57 | } | 59 | } |
| 58 | - | 60 | + }catch (Exception e){ |
| 61 | + e.printStackTrace(); | ||
| 62 | + return null; | ||
| 63 | + } | ||
| 59 | // Request request = chain.request(); | 64 | // Request request = chain.request(); |
| 60 | // if (!NetworkConnectionUtils.isConnected(AppUtils.getContext())) { | 65 | // if (!NetworkConnectionUtils.isConnected(AppUtils.getContext())) { |
| 61 | // request = request.newBuilder() | 66 | // request = request.newBuilder() |