Showing
43 changed files
with
3563 additions
and
264 deletions
.idea/eclipseCodeFormatter.xml
deleted
100644 → 0
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<project version="4"> | ||
| 3 | - <component name="EclipseCodeFormatterProjectSettings"> | ||
| 4 | - <option name="projectSpecificProfile"> | ||
| 5 | - <ProjectSpecificProfile> | ||
| 6 | - <option name="formatter" value="ECLIPSE" /> | ||
| 7 | - <option name="importOrder" value="java;javax;org;android;androidx;com;" /> | ||
| 8 | - <option name="pathToConfigFileJava" value="$PROJECT_DIR$/config/CodeQuality/WonderTek_CodeFormatter_Convention_v1.0.xml" /> | ||
| 9 | - <option name="selectedJavaProfile" value="WonderTek_CodeFormatter_Convention_v1.0" /> | ||
| 10 | - </ProjectSpecificProfile> | ||
| 11 | - </option> | ||
| 12 | - </component> | ||
| 13 | -</project> |
| @@ -8,12 +8,15 @@ package com.wd.layoutdataimpl.model; | @@ -8,12 +8,15 @@ package com.wd.layoutdataimpl.model; | ||
| 8 | import android.text.TextUtils; | 8 | import android.text.TextUtils; |
| 9 | 9 | ||
| 10 | 10 | ||
| 11 | +import com.people.room.ChannelDbHelper; | ||
| 12 | +import com.wd.base.log.Logger; | ||
| 11 | import com.wd.capability.layout.ui.channel.vm.IChannelDataListener; | 13 | import com.wd.capability.layout.ui.channel.vm.IChannelDataListener; |
| 12 | import com.wd.capability.network.BaseObserver; | 14 | import com.wd.capability.network.BaseObserver; |
| 13 | import com.wd.capability.network.bean.MetaBean; | 15 | import com.wd.capability.network.bean.MetaBean; |
| 14 | import com.wd.capability.network.cachedata.CacheData; | 16 | import com.wd.capability.network.cachedata.CacheData; |
| 15 | import com.wd.common.api.RequestApi; | 17 | import com.wd.common.api.RequestApi; |
| 16 | import com.wd.capability.network.response.BaseResponse; | 18 | import com.wd.capability.network.response.BaseResponse; |
| 19 | +import com.wd.foundation.bean.response.ChannelBean; | ||
| 17 | import com.wd.foundation.wdkitcore.constant.BaseConstants; | 20 | import com.wd.foundation.wdkitcore.constant.BaseConstants; |
| 18 | import com.wd.foundation.bean.custom.SimpleTabBean; | 21 | import com.wd.foundation.bean.custom.SimpleTabBean; |
| 19 | import com.wd.foundation.bean.custom.comp.PageBean; | 22 | import com.wd.foundation.bean.custom.comp.PageBean; |
| @@ -22,10 +25,13 @@ import com.wd.capability.network.fetcher.BaseDataFetcher; | @@ -22,10 +25,13 @@ import com.wd.capability.network.fetcher.BaseDataFetcher; | ||
| 22 | import com.wd.foundation.wdkit.json.GsonUtils; | 25 | import com.wd.foundation.wdkit.json.GsonUtils; |
| 23 | import com.wd.foundation.wdkit.utils.SpUtils; | 26 | import com.wd.foundation.wdkit.utils.SpUtils; |
| 24 | import com.wd.foundation.wdkit.utils.ToastNightUtil; | 27 | import com.wd.foundation.wdkit.utils.ToastNightUtil; |
| 28 | +import com.wd.foundation.wdkitcore.tools.AppContext; | ||
| 25 | import com.wd.foundation.wdkitcore.tools.ArrayUtils; | 29 | import com.wd.foundation.wdkitcore.tools.ArrayUtils; |
| 30 | +import com.wd.foundation.wdkitcore.tools.JsonUtils; | ||
| 26 | import com.wd.foundation.wdkitcore.tools.StringUtils; | 31 | import com.wd.foundation.wdkitcore.tools.StringUtils; |
| 27 | 32 | ||
| 28 | import java.util.HashMap; | 33 | import java.util.HashMap; |
| 34 | +import java.util.List; | ||
| 29 | import java.util.Map; | 35 | import java.util.Map; |
| 30 | 36 | ||
| 31 | import io.reactivex.Observable; | 37 | import io.reactivex.Observable; |
| @@ -82,20 +88,20 @@ public class ChannelDataFetcherNews extends BaseDataFetcher<RequestApi> { | @@ -82,20 +88,20 @@ public class ChannelDataFetcherNews extends BaseDataFetcher<RequestApi> { | ||
| 82 | if (2 == dataType){ | 88 | if (2 == dataType){ |
| 83 | //新闻tab | 89 | //新闻tab |
| 84 | if (isNewsChannel){ | 90 | if (isNewsChannel){ |
| 85 | - String newsTabGroupMd5 = SpUtils.getBottomNavGroupDetailMd5(); | ||
| 86 | - //有数据,保存的md5不为空,并且和接口给的md5一致,不用再调接口 | ||
| 87 | - if (StringUtils.isBlank(BaseConstants.newsTabMd5)){ | ||
| 88 | -// Logger.e("newsTabMd5空的==不会调用"); | ||
| 89 | - return; | ||
| 90 | - } | ||
| 91 | -// Logger.e("newsTabMd5 调用== firstLocation="+firstLocation); | ||
| 92 | -// Logger.e("newsTabMd5 ==newsTabGroupMd5=="+newsTabGroupMd5); | ||
| 93 | - if (1 != firstLocation && StringUtils.isNotBlank(newsTabGroupMd5) | ||
| 94 | - && newsTabGroupMd5.equals(BaseConstants.newsTabMd5)) { | ||
| 95 | -// Logger.e("newsTabMd5不变==不会调用"); | ||
| 96 | - return; | ||
| 97 | - } | ||
| 98 | - SpUtils.saveBottomNavGroupDetailMd5(BaseConstants.newsTabMd5); | 91 | +// String newsTabGroupMd5 = SpUtils.getBottomNavGroupDetailMd5(); |
| 92 | +// //有数据,保存的md5不为空,并且和接口给的md5一致,不用再调接口 | ||
| 93 | +// if (StringUtils.isBlank(BaseConstants.newsTabMd5)){ | ||
| 94 | +//// Logger.e("newsTabMd5空的==不会调用"); | ||
| 95 | +// return; | ||
| 96 | +// } | ||
| 97 | +//// Logger.e("newsTabMd5 调用== firstLocation="+firstLocation); | ||
| 98 | +//// Logger.e("newsTabMd5 ==newsTabGroupMd5=="+newsTabGroupMd5); | ||
| 99 | +// if (1 != firstLocation && StringUtils.isNotBlank(newsTabGroupMd5) | ||
| 100 | +// && newsTabGroupMd5.equals(BaseConstants.newsTabMd5)) { | ||
| 101 | +//// Logger.e("newsTabMd5不变==不会调用"); | ||
| 102 | +// return; | ||
| 103 | +// } | ||
| 104 | +// SpUtils.saveBottomNavGroupDetailMd5(BaseConstants.newsTabMd5); | ||
| 99 | }else { | 105 | }else { |
| 100 | //如果不是新闻tab并且有缓存数据,不再进行接口请求 | 106 | //如果不是新闻tab并且有缓存数据,不再进行接口请求 |
| 101 | return; | 107 | return; |
| @@ -122,23 +128,24 @@ public class ChannelDataFetcherNews extends BaseDataFetcher<RequestApi> { | @@ -122,23 +128,24 @@ public class ChannelDataFetcherNews extends BaseDataFetcher<RequestApi> { | ||
| 122 | map.put("districtCode", SpUtils.getDistrictCode()); | 128 | map.put("districtCode", SpUtils.getDistrictCode()); |
| 123 | } | 129 | } |
| 124 | 130 | ||
| 125 | -// if (isNewsChannel && dataType != 1) { | ||
| 126 | -// List<ChannelBean> myChannelBeans = ChannelDbHelper.getInstance(AppContext.getContext()).searchAllSelectChannel(); | ||
| 127 | -// StringBuilder builder = new StringBuilder(); | ||
| 128 | -// int index = -1; | ||
| 129 | -// if (myChannelBeans != null && myChannelBeans.size() > 0) { | ||
| 130 | -// int size = myChannelBeans.size(); | ||
| 131 | -// for (ChannelBean myChannelBean : myChannelBeans) { | ||
| 132 | -// index = index + 1; | ||
| 133 | -// builder.append(myChannelBean.getChannelId()); | ||
| 134 | -// if (index != size - 1) { | ||
| 135 | -// builder.append(","); | ||
| 136 | -// } | ||
| 137 | -// } | ||
| 138 | -// //获取我的频道 | ||
| 139 | -// map.put("channelIds", builder.toString()); | ||
| 140 | -// } | ||
| 141 | -// } | 131 | + if (isNewsChannel && dataType != 1) { |
| 132 | + List<com.people.room.entity.ChannelBean> channelBeans = ChannelDbHelper.getInstance(AppContext.getContext()).searchAllSelectChannel(); | ||
| 133 | + List<ChannelBean> myChannelBeans = convertBeanList(channelBeans); | ||
| 134 | + StringBuilder builder = new StringBuilder(); | ||
| 135 | + int index = -1; | ||
| 136 | + if (myChannelBeans != null && myChannelBeans.size() > 0) { | ||
| 137 | + int size = myChannelBeans.size(); | ||
| 138 | + for (ChannelBean myChannelBean : myChannelBeans) { | ||
| 139 | + index = index + 1; | ||
| 140 | + builder.append(myChannelBean.getChannelId()); | ||
| 141 | + if (index != size - 1) { | ||
| 142 | + builder.append(","); | ||
| 143 | + } | ||
| 144 | + } | ||
| 145 | + //获取我的频道 | ||
| 146 | + map.put("channelIds", builder.toString()); | ||
| 147 | + } | ||
| 148 | + } | ||
| 142 | 149 | ||
| 143 | Observable<BaseResponse<PageTopNavBean>> groupDataObservable = getRetrofit().getTopNavDetail(map); | 150 | Observable<BaseResponse<PageTopNavBean>> groupDataObservable = getRetrofit().getTopNavDetail(map); |
| 144 | 151 | ||
| @@ -264,12 +271,13 @@ public class ChannelDataFetcherNews extends BaseDataFetcher<RequestApi> { | @@ -264,12 +271,13 @@ public class ChannelDataFetcherNews extends BaseDataFetcher<RequestApi> { | ||
| 264 | 271 | ||
| 265 | SimpleTabBean simpleTabBean = new SimpleTabBean(); | 272 | SimpleTabBean simpleTabBean = new SimpleTabBean(); |
| 266 | if (isUseCache) { | 273 | if (isUseCache) { |
| 267 | -// List<ChannelBean> myChannelList = ChannelDbHelper.getInstance(AppContext.getContext()).searchAllSelectChannel(); | ||
| 268 | -// if (myChannelList.size() > 0) { | ||
| 269 | -// simpleTabBean.setTopNavChannelList(myChannelList); | ||
| 270 | -// } else { | 274 | + List<com.people.room.entity.ChannelBean> channelList = ChannelDbHelper.getInstance(AppContext.getContext()).searchAllSelectChannel(); |
| 275 | + List<ChannelBean> myChannelList = convertBeanList(channelList); | ||
| 276 | + if (!myChannelList.isEmpty()) { | ||
| 277 | + simpleTabBean.setTopNavChannelList(myChannelList); | ||
| 278 | + } else { | ||
| 271 | simpleTabBean.setTopNavChannelList(bean.getTopNavChannelList()); | 279 | simpleTabBean.setTopNavChannelList(bean.getTopNavChannelList()); |
| 272 | -// } | 280 | + } |
| 273 | } else { | 281 | } else { |
| 274 | simpleTabBean.setTopNavChannelList(bean.getTopNavChannelList()); | 282 | simpleTabBean.setTopNavChannelList(bean.getTopNavChannelList()); |
| 275 | } | 283 | } |
| @@ -388,25 +396,51 @@ public class ChannelDataFetcherNews extends BaseDataFetcher<RequestApi> { | @@ -388,25 +396,51 @@ public class ChannelDataFetcherNews extends BaseDataFetcher<RequestApi> { | ||
| 388 | onTopNavDataSuccess(bean, false); | 396 | onTopNavDataSuccess(bean, false); |
| 389 | return; | 397 | return; |
| 390 | } | 398 | } |
| 391 | -// //获取本地数据库 | ||
| 392 | -// ChannelDbHelper helper = ChannelDbHelper.getInstance(AppContext.getContext()); | ||
| 393 | -// //预置数据 如果数据库已经有数据,则无需更新,数据库的数据和预置的一样 | ||
| 394 | -// if ("1".equals(type) && helper.hasData()) { | ||
| 395 | -// onTopNavDataSuccess(bean, true); | ||
| 396 | -// return; | ||
| 397 | -// } | ||
| 398 | -// //本地数据直接获取 | ||
| 399 | -// if ("2".equals(type)) { | ||
| 400 | -// if (!helper.hasData()) { | ||
| 401 | -// helper.save(bean.getTopNavChannelList()); | ||
| 402 | -// } | ||
| 403 | -// } else { | ||
| 404 | -// //清除本地数据 | ||
| 405 | -// helper.deleteAll(); | ||
| 406 | -// //4.保存数据到数据库 | ||
| 407 | -// helper.save(bean.getTopNavChannelList()); | ||
| 408 | -// | ||
| 409 | -// onTopNavDataSuccess(bean, true); | ||
| 410 | -// } | 399 | + //获取本地数据库 |
| 400 | + ChannelDbHelper helper = ChannelDbHelper.getInstance(AppContext.getContext()); | ||
| 401 | + //预置数据 如果数据库已经有数据,则无需更新,数据库的数据和预置的一样 | ||
| 402 | + if ("1".equals(type) && helper.hasData()) { | ||
| 403 | + onTopNavDataSuccess(bean, true); | ||
| 404 | + return; | ||
| 405 | + } | ||
| 406 | + List<ChannelBean> topNavChannelList = bean.getTopNavChannelList(); | ||
| 407 | + List<com.people.room.entity.ChannelBean> copyList = convertRoomList(topNavChannelList); | ||
| 408 | + //本地数据直接获取 | ||
| 409 | + if ("2".equals(type)) { | ||
| 410 | + if (!helper.hasData()) { | ||
| 411 | + helper.save(copyList); | ||
| 412 | + } | ||
| 413 | + } else { | ||
| 414 | + //清除本地数据 | ||
| 415 | + helper.deleteAll(); | ||
| 416 | + //4.保存数据到数据库 | ||
| 417 | + helper.save(copyList); | ||
| 418 | + | ||
| 419 | + onTopNavDataSuccess(bean, true); | ||
| 420 | + } | ||
| 421 | + } | ||
| 422 | + | ||
| 423 | + private List<com.people.room.entity.ChannelBean> convertRoomList(List<ChannelBean> topNavChannelList) { | ||
| 424 | + List<com.people.room.entity.ChannelBean> retList; | ||
| 425 | + try { | ||
| 426 | + String objectToJson = JsonUtils.convertObjectToJson(topNavChannelList); | ||
| 427 | + retList = JsonUtils.convertJsonArrayToObjList(objectToJson,com.people.room.entity.ChannelBean.class); | ||
| 428 | + } catch (Exception e) { | ||
| 429 | + throw new RuntimeException(e); | ||
| 430 | + } | ||
| 431 | + return retList; | ||
| 411 | } | 432 | } |
| 433 | + | ||
| 434 | + private List<ChannelBean> convertBeanList(List<com.people.room.entity.ChannelBean> channelList) { | ||
| 435 | + List<ChannelBean> retList; | ||
| 436 | + try { | ||
| 437 | + String objectToJson = JsonUtils.convertObjectToJson(channelList); | ||
| 438 | + retList = JsonUtils.convertJsonArrayToObjList(objectToJson,ChannelBean.class); | ||
| 439 | + } catch (Exception e) { | ||
| 440 | + throw new RuntimeException(e); | ||
| 441 | + } | ||
| 442 | + return retList; | ||
| 443 | + } | ||
| 444 | + | ||
| 445 | + | ||
| 412 | } | 446 | } |
| 1 | +{ | ||
| 2 | + "bottomNavList":[ | ||
| 3 | + { | ||
| 4 | + "backgroundUrl": "", | ||
| 5 | + "channelChooseActionUrl": "", | ||
| 6 | + "channelChooseCColor": "", | ||
| 7 | + "channelChooseColor": "", | ||
| 8 | + "channelMoreColor": "", | ||
| 9 | + "dropDownAnimationColor": null, | ||
| 10 | + "extraData": "{\"haveSearch\":\"1\",\"haveTopNav\":\"1\",\"leftIconurl\":\"\",\"rightIconUrl\":\"\"}", | ||
| 11 | + "homePageColor": "", | ||
| 12 | + "icon": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240516/image/display/921fd11c21b0441b91753710d9799947.png", | ||
| 13 | + "iconC": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240516/image/display/7e81da19ad394ded8fd18920b7a1276f.pag", | ||
| 14 | + "id": 201, | ||
| 15 | + "immersiveIconCUrl": "", | ||
| 16 | + "immersiveIconUrl": "", | ||
| 17 | + "immersiveNameCColor": "", | ||
| 18 | + "immersiveNameColor": "", | ||
| 19 | + "logoUrl": "", | ||
| 20 | + "morningAndEveningUrl": "", | ||
| 21 | + "name": "新闻", | ||
| 22 | + "nameCColor": "#ED2800", | ||
| 23 | + "nameColor": "#999999", | ||
| 24 | + "nightIconCUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240724/vod/display/b2609f02ce8048cdb8643f6620092a6c.pag", | ||
| 25 | + "nightIconUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240724/image/display/aa5fc4db41f6400c930e6af02fb52abb.png", | ||
| 26 | + "nightNameCColor": "#ED2800", | ||
| 27 | + "nightNameColor": "#999999", | ||
| 28 | + "noticeColor": "", | ||
| 29 | + "pageId": null, | ||
| 30 | + "pageType": null, | ||
| 31 | + "searchBothColor": "", | ||
| 32 | + "searchUrl": "", | ||
| 33 | + "sortValue": 1, | ||
| 34 | + "statusBarColor": null, | ||
| 35 | + "topStyle": "11", | ||
| 36 | + "type": "1" | ||
| 37 | + }, | ||
| 38 | + { | ||
| 39 | + "backgroundUrl": "", | ||
| 40 | + "channelChooseActionUrl": "", | ||
| 41 | + "channelChooseCColor": "", | ||
| 42 | + "channelChooseColor": "", | ||
| 43 | + "channelMoreColor": "", | ||
| 44 | + "dropDownAnimationColor": null, | ||
| 45 | + "extraData": "{\"haveSearch\":\"0\",\"haveTopNav\":\"1\",\"leftIconurl\":\"\",\"rightIconUrl\":\"\"}", | ||
| 46 | + "homePageColor": "", | ||
| 47 | + "icon": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240516/image/display/8a27e684b1204b209bf70b41e593ace3.png", | ||
| 48 | + "iconC": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240516/image/display/9075c365c1ee44a38d914728bf1ba49d.pag", | ||
| 49 | + "id": 202, | ||
| 50 | + "immersiveIconCUrl": "", | ||
| 51 | + "immersiveIconUrl": "", | ||
| 52 | + "immersiveNameCColor": "", | ||
| 53 | + "immersiveNameColor": "", | ||
| 54 | + "logoUrl": "", | ||
| 55 | + "morningAndEveningUrl": "", | ||
| 56 | + "name": "人民号", | ||
| 57 | + "nameCColor": "#ED2800", | ||
| 58 | + "nameColor": "#999999", | ||
| 59 | + "nightIconCUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240724/vod/display/c8fded2b47db4912b596bde55b66ba19.pag", | ||
| 60 | + "nightIconUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240724/image/display/344767225aa5417e9a4fd6dcfdca62d9.png", | ||
| 61 | + "nightNameCColor": "#ED2800", | ||
| 62 | + "nightNameColor": "#999999", | ||
| 63 | + "noticeColor": "", | ||
| 64 | + "pageId": null, | ||
| 65 | + "pageType": null, | ||
| 66 | + "searchBothColor": "", | ||
| 67 | + "searchUrl": "", | ||
| 68 | + "sortValue": 2, | ||
| 69 | + "statusBarColor": null, | ||
| 70 | + "topStyle": "12", | ||
| 71 | + "type": "1" | ||
| 72 | + }, | ||
| 73 | + { | ||
| 74 | + "backgroundUrl": "", | ||
| 75 | + "channelChooseActionUrl": "", | ||
| 76 | + "channelChooseCColor": "", | ||
| 77 | + "channelChooseColor": "", | ||
| 78 | + "channelMoreColor": "", | ||
| 79 | + "dropDownAnimationColor": null, | ||
| 80 | + "extraData": "{\"haveSearch\":\"1\",\"haveTopNav\":\"1\",\"leftIconurl\":\"\",\"rightIconUrl\":\"\"}", | ||
| 81 | + "homePageColor": "", | ||
| 82 | + "icon": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240516/image/display/85080ae1fc2243209e957408dae18cb6.png", | ||
| 83 | + "iconC": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240516/image/display/30f80c6e894f452da7f37b55c9f015e5.pag", | ||
| 84 | + "id": 203, | ||
| 85 | + "immersiveIconCUrl": "", | ||
| 86 | + "immersiveIconUrl": "", | ||
| 87 | + "immersiveNameCColor": "", | ||
| 88 | + "immersiveNameColor": "", | ||
| 89 | + "logoUrl": "", | ||
| 90 | + "morningAndEveningUrl": "", | ||
| 91 | + "name": "视频", | ||
| 92 | + "nameCColor": "#ED2800", | ||
| 93 | + "nameColor": "#999999", | ||
| 94 | + "nightIconCUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240724/vod/display/22c71b8d9be44c1d96fca177286698f8.pag", | ||
| 95 | + "nightIconUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240724/image/display/0a7a51b4875a4b7fb0fed0cca7414738.png", | ||
| 96 | + "nightNameCColor": "#ED2800", | ||
| 97 | + "nightNameColor": "#999999", | ||
| 98 | + "noticeColor": "", | ||
| 99 | + "pageId": null, | ||
| 100 | + "pageType": null, | ||
| 101 | + "searchBothColor": "", | ||
| 102 | + "searchUrl": "", | ||
| 103 | + "sortValue": 3, | ||
| 104 | + "statusBarColor": null, | ||
| 105 | + "topNavChannelList": [ | ||
| 106 | + { | ||
| 107 | + "channelId": 2060, | ||
| 108 | + "channelStrategy": 1, | ||
| 109 | + "channelStyle": 1, | ||
| 110 | + "channelType": 1, | ||
| 111 | + "defaultPermitted": 0, | ||
| 112 | + "delPermitted": 1, | ||
| 113 | + "fontCColor": "#FFFFFF", | ||
| 114 | + "fontColor": "#F9AB99", | ||
| 115 | + "headlinesOn": 0, | ||
| 116 | + "homeChannel": "0", | ||
| 117 | + "iconCUrl": "", | ||
| 118 | + "iconCUrlSize": "", | ||
| 119 | + "iconUrl": "", | ||
| 120 | + "iconUrlSize": "", | ||
| 121 | + "localChannel": "0", | ||
| 122 | + "moreChannel": "0", | ||
| 123 | + "movePermitted": 1, | ||
| 124 | + "myChannel": "0", | ||
| 125 | + "name": "视频", | ||
| 126 | + "num": 1, | ||
| 127 | + "pageId": 20070, | ||
| 128 | + "pageType": "", | ||
| 129 | + "underlineCColor": "" | ||
| 130 | + }, | ||
| 131 | + { | ||
| 132 | + "channelId": 2061, | ||
| 133 | + "channelStrategy": 2, | ||
| 134 | + "channelStyle": 3, | ||
| 135 | + "channelType": 1, | ||
| 136 | + "defaultPermitted": 0, | ||
| 137 | + "delPermitted": 1, | ||
| 138 | + "fontCColor": "#FFFFFF", | ||
| 139 | + "fontColor": "#F9AB99", | ||
| 140 | + "headlinesOn": 0, | ||
| 141 | + "homeChannel": "0", | ||
| 142 | + "iconCUrl": "", | ||
| 143 | + "iconCUrlSize": "", | ||
| 144 | + "iconUrl": "", | ||
| 145 | + "iconUrlSize": "", | ||
| 146 | + "localChannel": "0", | ||
| 147 | + "moreChannel": "0", | ||
| 148 | + "movePermitted": 1, | ||
| 149 | + "myChannel": "0", | ||
| 150 | + "name": "直播", | ||
| 151 | + "num": 2, | ||
| 152 | + "pageId": 20071, | ||
| 153 | + "pageType": "", | ||
| 154 | + "underlineCColor": "" | ||
| 155 | + } | ||
| 156 | + ], | ||
| 157 | + "topStyle": "13", | ||
| 158 | + "type": "1" | ||
| 159 | + }, | ||
| 160 | + { | ||
| 161 | + "backgroundUrl": "", | ||
| 162 | + "channelChooseActionUrl": "", | ||
| 163 | + "channelChooseCColor": "", | ||
| 164 | + "channelChooseColor": "", | ||
| 165 | + "channelMoreColor": "", | ||
| 166 | + "dropDownAnimationColor": null, | ||
| 167 | + "extraData": "{\"haveSearch\":\"1\",\"haveTopNav\":\"1\",\"leftIconurl\":\"\",\"rightIconUrl\":\"\"}", | ||
| 168 | + "homePageColor": "", | ||
| 169 | + "icon": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240516/image/display/d9ca281088e547739d5cb866ce4b9dd8.png", | ||
| 170 | + "iconC": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240516/image/display/eba2ce70b4cf411bbd402dc8c3d079e1.pag", | ||
| 171 | + "id": 204, | ||
| 172 | + "immersiveIconCUrl": "", | ||
| 173 | + "immersiveIconUrl": "", | ||
| 174 | + "immersiveNameCColor": "", | ||
| 175 | + "immersiveNameColor": "", | ||
| 176 | + "logoUrl": "", | ||
| 177 | + "morningAndEveningUrl": "", | ||
| 178 | + "name": "服务", | ||
| 179 | + "nameCColor": "#ED2800", | ||
| 180 | + "nameColor": "#999999", | ||
| 181 | + "nightIconCUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240724/vod/display/1ebdfbc313154574bd824b5d13550ade.pag", | ||
| 182 | + "nightIconUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240724/image/display/fab17ba083c141a7ad3788e4bfe35e84.png", | ||
| 183 | + "nightNameCColor": "#ED2800", | ||
| 184 | + "nightNameColor": "#999999", | ||
| 185 | + "noticeColor": "", | ||
| 186 | + "pageId": null, | ||
| 187 | + "pageType": null, | ||
| 188 | + "searchBothColor": "", | ||
| 189 | + "searchUrl": "", | ||
| 190 | + "sortValue": 4, | ||
| 191 | + "statusBarColor": null, | ||
| 192 | + "topStyle": "14", | ||
| 193 | + "type": "1" | ||
| 194 | + }, | ||
| 195 | + { | ||
| 196 | + "backgroundUrl": "", | ||
| 197 | + "channelChooseActionUrl": "", | ||
| 198 | + "channelChooseCColor": "", | ||
| 199 | + "channelChooseColor": "", | ||
| 200 | + "channelMoreColor": "", | ||
| 201 | + "dropDownAnimationColor": null, | ||
| 202 | + "extraData": "{\"haveSearch\":\"0\",\"haveTopNav\":\"0\"}", | ||
| 203 | + "homePageColor": "", | ||
| 204 | + "icon": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240516/image/display/8601cf94eecb418a8d467a50acc67416.png", | ||
| 205 | + "iconC": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240516/image/display/801f044aec0f4dc2ae9e85d382d85a34.pag", | ||
| 206 | + "id": 205, | ||
| 207 | + "immersiveIconCUrl": "https://cdnjdphoto.aikan.pdnews.cn/inen-20230403/image/display/9f22b579db15497797e8204b1ec12d14.png", | ||
| 208 | + "immersiveIconUrl": "https://cdnjdphoto.aikan.pdnews.cn/inen-20230403/image/display/5be23055a4dc4d869be2139e9deb7a55.png", | ||
| 209 | + "immersiveNameCColor": "#FFFFFF", | ||
| 210 | + "immersiveNameColor": "#6A6B75", | ||
| 211 | + "logoUrl": "", | ||
| 212 | + "morningAndEveningUrl": "", | ||
| 213 | + "name": "我的", | ||
| 214 | + "nameCColor": "#ED2800", | ||
| 215 | + "nameColor": "#999999", | ||
| 216 | + "nightIconCUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240724/vod/display/2d865d8ac6b741448321651dd79a5969.pag", | ||
| 217 | + "nightIconUrl": "https://cdnjdphoto.aikan.pdnews.cn/sjbj-20240724/image/display/6a430e75b8314644a4d8ec61bc881e97.png", | ||
| 218 | + "nightNameCColor": "#ED2800", | ||
| 219 | + "nightNameColor": "#999999", | ||
| 220 | + "noticeColor": "", | ||
| 221 | + "pageId": null, | ||
| 222 | + "pageType": null, | ||
| 223 | + "searchBothColor": "", | ||
| 224 | + "searchUrl": "", | ||
| 225 | + "sortValue": 5, | ||
| 226 | + "statusBarColor": null, | ||
| 227 | + "topStyle": "", | ||
| 228 | + "type": "2" | ||
| 229 | + } | ||
| 230 | + ], | ||
| 231 | + "isGongjiri":0 | ||
| 232 | +} |
| 1 | +{ | ||
| 2 | + "presetsData":[ | ||
| 3 | + { | ||
| 4 | + "id":201, | ||
| 5 | + "topNavChannelList":[ | ||
| 6 | + { | ||
| 7 | + "channelId": 2001, | ||
| 8 | + "channelStrategy": 1, | ||
| 9 | + "channelStyle": 2, | ||
| 10 | + "channelType": 1, | ||
| 11 | + "defaultPermitted": 1, | ||
| 12 | + "delPermitted": 0, | ||
| 13 | + "fontCColor": "#FFFFFF", | ||
| 14 | + "fontColor": "#F9AB99", | ||
| 15 | + "headlinesOn": 0, | ||
| 16 | + "homeChannel": "1", | ||
| 17 | + "iconCUrl": "", | ||
| 18 | + "iconCUrlSize": "", | ||
| 19 | + "iconUrl": "", | ||
| 20 | + "iconUrlSize": "", | ||
| 21 | + "localChannel": "0", | ||
| 22 | + "moreChannel": "0", | ||
| 23 | + "movePermitted": 0, | ||
| 24 | + "myChannel": "1", | ||
| 25 | + "name": "推荐", | ||
| 26 | + "num": 1, | ||
| 27 | + "pageId": 20011, | ||
| 28 | + "pageType": "", | ||
| 29 | + "underlineCColor": "" | ||
| 30 | + }, | ||
| 31 | + { | ||
| 32 | + "channelId": 2002, | ||
| 33 | + "channelStrategy": 2, | ||
| 34 | + "channelStyle": 2, | ||
| 35 | + "channelType": 1, | ||
| 36 | + "defaultPermitted": 1, | ||
| 37 | + "delPermitted": 0, | ||
| 38 | + "fontCColor": "#FFFFFF", | ||
| 39 | + "fontColor": "#F9AB99", | ||
| 40 | + "headlinesOn": 0, | ||
| 41 | + "homeChannel": "1", | ||
| 42 | + "iconCUrl": "", | ||
| 43 | + "iconCUrlSize": "", | ||
| 44 | + "iconUrl": "", | ||
| 45 | + "iconUrlSize": "", | ||
| 46 | + "localChannel": "0", | ||
| 47 | + "moreChannel": "0", | ||
| 48 | + "movePermitted": 0, | ||
| 49 | + "myChannel": "1", | ||
| 50 | + "name": "热点", | ||
| 51 | + "num": 2, | ||
| 52 | + "pageId": 20012, | ||
| 53 | + "pageType": "", | ||
| 54 | + "underlineCColor": "" | ||
| 55 | + }, | ||
| 56 | + { | ||
| 57 | + "channelId": 2003, | ||
| 58 | + "channelStrategy": 2, | ||
| 59 | + "channelStyle": 2, | ||
| 60 | + "channelType": 1, | ||
| 61 | + "defaultPermitted": 0, | ||
| 62 | + "delPermitted": 0, | ||
| 63 | + "fontCColor": "#FFFFFF", | ||
| 64 | + "fontColor": "#F9AB99", | ||
| 65 | + "headlinesOn": 0, | ||
| 66 | + "homeChannel": "0", | ||
| 67 | + "iconCUrl": "", | ||
| 68 | + "iconCUrlSize": "", | ||
| 69 | + "iconUrl": "", | ||
| 70 | + "iconUrlSize": "", | ||
| 71 | + "localChannel": "0", | ||
| 72 | + "moreChannel": "0", | ||
| 73 | + "movePermitted": 1, | ||
| 74 | + "myChannel": "1", | ||
| 75 | + "name": "锐评", | ||
| 76 | + "num": 3, | ||
| 77 | + "pageId": 20013, | ||
| 78 | + "pageType": "", | ||
| 79 | + "underlineCColor": "" | ||
| 80 | + }, | ||
| 81 | + { | ||
| 82 | + "channelId": 2006, | ||
| 83 | + "channelStrategy": 2, | ||
| 84 | + "channelStyle": 3, | ||
| 85 | + "channelType": 1, | ||
| 86 | + "defaultPermitted": 0, | ||
| 87 | + "delPermitted": 0, | ||
| 88 | + "fontCColor": "#FFFFFF", | ||
| 89 | + "fontColor": "#F9AB99", | ||
| 90 | + "headlinesOn": 0, | ||
| 91 | + "homeChannel": "0", | ||
| 92 | + "iconCUrl": "", | ||
| 93 | + "iconCUrlSize": "", | ||
| 94 | + "iconUrl": "", | ||
| 95 | + "iconUrlSize": "", | ||
| 96 | + "localChannel": "0", | ||
| 97 | + "moreChannel": "0", | ||
| 98 | + "movePermitted": 1, | ||
| 99 | + "myChannel": "1", | ||
| 100 | + "name": "版面", | ||
| 101 | + "num": 5, | ||
| 102 | + "pageId": 20016, | ||
| 103 | + "pageType": "", | ||
| 104 | + "underlineCColor": "" | ||
| 105 | + }, | ||
| 106 | + { | ||
| 107 | + "channelId": 2007, | ||
| 108 | + "channelStrategy": 1, | ||
| 109 | + "channelStyle": 2, | ||
| 110 | + "channelType": 1, | ||
| 111 | + "defaultPermitted": 0, | ||
| 112 | + "delPermitted": 0, | ||
| 113 | + "fontCColor": "#FFFFFF", | ||
| 114 | + "fontColor": "#F9AB99", | ||
| 115 | + "headlinesOn": 0, | ||
| 116 | + "homeChannel": "0", | ||
| 117 | + "iconCUrl": "", | ||
| 118 | + "iconCUrlSize": "", | ||
| 119 | + "iconUrl": "", | ||
| 120 | + "iconUrlSize": "", | ||
| 121 | + "localChannel": "0", | ||
| 122 | + "moreChannel": "0", | ||
| 123 | + "movePermitted": 1, | ||
| 124 | + "myChannel": "1", | ||
| 125 | + "name": "镜头", | ||
| 126 | + "num": 13, | ||
| 127 | + "pageId": 20017, | ||
| 128 | + "pageType": "", | ||
| 129 | + "underlineCColor": "" | ||
| 130 | + }, | ||
| 131 | + { | ||
| 132 | + "channelId": 2066, | ||
| 133 | + "channelStrategy": 2, | ||
| 134 | + "channelStyle": 3, | ||
| 135 | + "channelType": 1, | ||
| 136 | + "defaultPermitted": 0, | ||
| 137 | + "delPermitted": 1, | ||
| 138 | + "fontCColor": "#FFFFFF", | ||
| 139 | + "fontColor": "#F9AB99", | ||
| 140 | + "headlinesOn": 0, | ||
| 141 | + "homeChannel": "0", | ||
| 142 | + "iconCUrl": "", | ||
| 143 | + "iconCUrlSize": "", | ||
| 144 | + "iconUrl": "", | ||
| 145 | + "iconUrlSize": "", | ||
| 146 | + "localChannel": "0", | ||
| 147 | + "moreChannel": "0", | ||
| 148 | + "movePermitted": 1, | ||
| 149 | + "myChannel": "1", | ||
| 150 | + "name": "播报", | ||
| 151 | + "num": 4, | ||
| 152 | + "pageId": 21003, | ||
| 153 | + "pageType": "", | ||
| 154 | + "underlineCColor": "" | ||
| 155 | + }, | ||
| 156 | + { | ||
| 157 | + "channelId": 2011, | ||
| 158 | + "channelStrategy": 2, | ||
| 159 | + "channelStyle": 2, | ||
| 160 | + "channelType": 1, | ||
| 161 | + "defaultPermitted": 0, | ||
| 162 | + "delPermitted": 1, | ||
| 163 | + "fontCColor": "#FFFFFF", | ||
| 164 | + "fontColor": "#F9AB99", | ||
| 165 | + "headlinesOn": 0, | ||
| 166 | + "homeChannel": "0", | ||
| 167 | + "iconCUrl": "", | ||
| 168 | + "iconCUrlSize": "", | ||
| 169 | + "iconUrl": "", | ||
| 170 | + "iconUrlSize": "", | ||
| 171 | + "localChannel": "0", | ||
| 172 | + "moreChannel": "0", | ||
| 173 | + "movePermitted": 1, | ||
| 174 | + "myChannel": "1", | ||
| 175 | + "name": "体育", | ||
| 176 | + "num": 6, | ||
| 177 | + "pageId": 20021, | ||
| 178 | + "pageType": "", | ||
| 179 | + "underlineCColor": "" | ||
| 180 | + }, | ||
| 181 | + { | ||
| 182 | + "channelId": 2020, | ||
| 183 | + "channelStrategy": 1, | ||
| 184 | + "channelStyle": 2, | ||
| 185 | + "channelType": 1, | ||
| 186 | + "defaultPermitted": 0, | ||
| 187 | + "delPermitted": 1, | ||
| 188 | + "fontCColor": "#FFFFFF", | ||
| 189 | + "fontColor": "#F9AB99", | ||
| 190 | + "headlinesOn": 0, | ||
| 191 | + "homeChannel": "0", | ||
| 192 | + "iconCUrl": "", | ||
| 193 | + "iconCUrlSize": "", | ||
| 194 | + "iconUrl": "", | ||
| 195 | + "iconUrlSize": "", | ||
| 196 | + "localChannel": "0", | ||
| 197 | + "moreChannel": "0", | ||
| 198 | + "movePermitted": 1, | ||
| 199 | + "myChannel": "1", | ||
| 200 | + "name": "国际", | ||
| 201 | + "num": 7, | ||
| 202 | + "pageId": 20030, | ||
| 203 | + "pageType": "", | ||
| 204 | + "underlineCColor": "" | ||
| 205 | + }, | ||
| 206 | + { | ||
| 207 | + "channelId": 2015, | ||
| 208 | + "channelStrategy": 1, | ||
| 209 | + "channelStyle": 2, | ||
| 210 | + "channelType": 1, | ||
| 211 | + "defaultPermitted": 0, | ||
| 212 | + "delPermitted": 1, | ||
| 213 | + "fontCColor": "#FFFFFF", | ||
| 214 | + "fontColor": "#F9AB99", | ||
| 215 | + "headlinesOn": 0, | ||
| 216 | + "homeChannel": "0", | ||
| 217 | + "iconCUrl": "", | ||
| 218 | + "iconCUrlSize": "", | ||
| 219 | + "iconUrl": "", | ||
| 220 | + "iconUrlSize": "", | ||
| 221 | + "localChannel": "0", | ||
| 222 | + "moreChannel": "0", | ||
| 223 | + "movePermitted": 1, | ||
| 224 | + "myChannel": "1", | ||
| 225 | + "name": "科技", | ||
| 226 | + "num": 10, | ||
| 227 | + "pageId": 20025, | ||
| 228 | + "pageType": "", | ||
| 229 | + "underlineCColor": "" | ||
| 230 | + }, | ||
| 231 | + { | ||
| 232 | + "channelId": 2005, | ||
| 233 | + "channelStrategy": 2, | ||
| 234 | + "channelStyle": 2, | ||
| 235 | + "channelType": 1, | ||
| 236 | + "defaultPermitted": 0, | ||
| 237 | + "delPermitted": 1, | ||
| 238 | + "fontCColor": "#FFFFFF", | ||
| 239 | + "fontColor": "#F9AB99", | ||
| 240 | + "headlinesOn": 0, | ||
| 241 | + "homeChannel": "0", | ||
| 242 | + "iconCUrl": "", | ||
| 243 | + "iconCUrlSize": "", | ||
| 244 | + "iconUrl": "", | ||
| 245 | + "iconUrlSize": "", | ||
| 246 | + "localChannel": "0", | ||
| 247 | + "moreChannel": "0", | ||
| 248 | + "movePermitted": 1, | ||
| 249 | + "myChannel": "1", | ||
| 250 | + "name": "文件", | ||
| 251 | + "num": 12, | ||
| 252 | + "pageId": 20015, | ||
| 253 | + "pageType": "", | ||
| 254 | + "underlineCColor": "" | ||
| 255 | + }, | ||
| 256 | + { | ||
| 257 | + "channelId": 2009, | ||
| 258 | + "channelStrategy": 1, | ||
| 259 | + "channelStyle": 2, | ||
| 260 | + "channelType": 1, | ||
| 261 | + "defaultPermitted": 0, | ||
| 262 | + "delPermitted": 1, | ||
| 263 | + "fontCColor": "#FFFFFF", | ||
| 264 | + "fontColor": "#F9AB99", | ||
| 265 | + "headlinesOn": 0, | ||
| 266 | + "homeChannel": "0", | ||
| 267 | + "iconCUrl": "", | ||
| 268 | + "iconCUrlSize": "", | ||
| 269 | + "iconUrl": "", | ||
| 270 | + "iconUrlSize": "", | ||
| 271 | + "localChannel": "0", | ||
| 272 | + "moreChannel": "0", | ||
| 273 | + "movePermitted": 1, | ||
| 274 | + "myChannel": "1", | ||
| 275 | + "name": "社会", | ||
| 276 | + "num": 15, | ||
| 277 | + "pageId": 20019, | ||
| 278 | + "pageType": "", | ||
| 279 | + "underlineCColor": "" | ||
| 280 | + }, | ||
| 281 | + { | ||
| 282 | + "channelId": 2010, | ||
| 283 | + "channelStrategy": 1, | ||
| 284 | + "channelStyle": 2, | ||
| 285 | + "channelType": 1, | ||
| 286 | + "defaultPermitted": 0, | ||
| 287 | + "delPermitted": 1, | ||
| 288 | + "fontCColor": "#FFFFFF", | ||
| 289 | + "fontColor": "#F9AB99", | ||
| 290 | + "headlinesOn": 0, | ||
| 291 | + "homeChannel": "0", | ||
| 292 | + "iconCUrl": "", | ||
| 293 | + "iconCUrlSize": "", | ||
| 294 | + "iconUrl": "", | ||
| 295 | + "iconUrlSize": "", | ||
| 296 | + "localChannel": "0", | ||
| 297 | + "moreChannel": "0", | ||
| 298 | + "movePermitted": 1, | ||
| 299 | + "myChannel": "1", | ||
| 300 | + "name": "财经", | ||
| 301 | + "num": 16, | ||
| 302 | + "pageId": 20020, | ||
| 303 | + "pageType": "", | ||
| 304 | + "underlineCColor": "" | ||
| 305 | + }, | ||
| 306 | + { | ||
| 307 | + "channelId": 2012, | ||
| 308 | + "channelStrategy": 1, | ||
| 309 | + "channelStyle": 2, | ||
| 310 | + "channelType": 1, | ||
| 311 | + "defaultPermitted": 0, | ||
| 312 | + "delPermitted": 1, | ||
| 313 | + "fontCColor": "#FFFFFF", | ||
| 314 | + "fontColor": "#F9AB99", | ||
| 315 | + "headlinesOn": 0, | ||
| 316 | + "homeChannel": "0", | ||
| 317 | + "iconCUrl": "", | ||
| 318 | + "iconCUrlSize": "", | ||
| 319 | + "iconUrl": "", | ||
| 320 | + "iconUrlSize": "", | ||
| 321 | + "localChannel": "0", | ||
| 322 | + "moreChannel": "1", | ||
| 323 | + "movePermitted": 1, | ||
| 324 | + "myChannel": "1", | ||
| 325 | + "name": "文化", | ||
| 326 | + "num": 17, | ||
| 327 | + "pageId": 20022, | ||
| 328 | + "pageType": "", | ||
| 329 | + "underlineCColor": "" | ||
| 330 | + }, | ||
| 331 | + { | ||
| 332 | + "channelId": 2013, | ||
| 333 | + "channelStrategy": 1, | ||
| 334 | + "channelStyle": 2, | ||
| 335 | + "channelType": 1, | ||
| 336 | + "defaultPermitted": 0, | ||
| 337 | + "delPermitted": 1, | ||
| 338 | + "fontCColor": "#FFFFFF", | ||
| 339 | + "fontColor": "#F9AB99", | ||
| 340 | + "headlinesOn": 0, | ||
| 341 | + "homeChannel": "0", | ||
| 342 | + "iconCUrl": "", | ||
| 343 | + "iconCUrlSize": "", | ||
| 344 | + "iconUrl": "", | ||
| 345 | + "iconUrlSize": "", | ||
| 346 | + "localChannel": "0", | ||
| 347 | + "moreChannel": "1", | ||
| 348 | + "movePermitted": 1, | ||
| 349 | + "myChannel": "0", | ||
| 350 | + "name": "教育", | ||
| 351 | + "num": 18, | ||
| 352 | + "pageId": 20023, | ||
| 353 | + "pageType": "", | ||
| 354 | + "underlineCColor": "" | ||
| 355 | + }, | ||
| 356 | + { | ||
| 357 | + "channelId": 2014, | ||
| 358 | + "channelStrategy": 1, | ||
| 359 | + "channelStyle": 2, | ||
| 360 | + "channelType": 1, | ||
| 361 | + "defaultPermitted": 0, | ||
| 362 | + "delPermitted": 1, | ||
| 363 | + "fontCColor": "#FFFFFF", | ||
| 364 | + "fontColor": "#F9AB99", | ||
| 365 | + "headlinesOn": 0, | ||
| 366 | + "homeChannel": "0", | ||
| 367 | + "iconCUrl": "", | ||
| 368 | + "iconCUrlSize": "", | ||
| 369 | + "iconUrl": "", | ||
| 370 | + "iconUrlSize": "", | ||
| 371 | + "localChannel": "0", | ||
| 372 | + "moreChannel": "1", | ||
| 373 | + "movePermitted": 1, | ||
| 374 | + "myChannel": "0", | ||
| 375 | + "name": "军事", | ||
| 376 | + "num": 19, | ||
| 377 | + "pageId": 20024, | ||
| 378 | + "pageType": "", | ||
| 379 | + "underlineCColor": "" | ||
| 380 | + }, | ||
| 381 | + { | ||
| 382 | + "channelId": 2017, | ||
| 383 | + "channelStrategy": 1, | ||
| 384 | + "channelStyle": 2, | ||
| 385 | + "channelType": 1, | ||
| 386 | + "defaultPermitted": 0, | ||
| 387 | + "delPermitted": 1, | ||
| 388 | + "fontCColor": "#FFFFFF", | ||
| 389 | + "fontColor": "#F9AB99", | ||
| 390 | + "headlinesOn": 0, | ||
| 391 | + "homeChannel": "0", | ||
| 392 | + "iconCUrl": "", | ||
| 393 | + "iconCUrlSize": "", | ||
| 394 | + "iconUrl": "", | ||
| 395 | + "iconUrlSize": "", | ||
| 396 | + "localChannel": "0", | ||
| 397 | + "moreChannel": "1", | ||
| 398 | + "movePermitted": 1, | ||
| 399 | + "myChannel": "0", | ||
| 400 | + "name": "健康", | ||
| 401 | + "num": 20, | ||
| 402 | + "pageId": 20027, | ||
| 403 | + "pageType": "", | ||
| 404 | + "underlineCColor": "" | ||
| 405 | + }, | ||
| 406 | + { | ||
| 407 | + "channelId": 2018, | ||
| 408 | + "channelStrategy": 1, | ||
| 409 | + "channelStyle": 2, | ||
| 410 | + "channelType": 1, | ||
| 411 | + "defaultPermitted": 0, | ||
| 412 | + "delPermitted": 1, | ||
| 413 | + "fontCColor": "#FFFFFF", | ||
| 414 | + "fontColor": "#F9AB99", | ||
| 415 | + "headlinesOn": 0, | ||
| 416 | + "homeChannel": "0", | ||
| 417 | + "iconCUrl": "", | ||
| 418 | + "iconCUrlSize": "", | ||
| 419 | + "iconUrl": "", | ||
| 420 | + "iconUrlSize": "", | ||
| 421 | + "localChannel": "0", | ||
| 422 | + "moreChannel": "1", | ||
| 423 | + "movePermitted": 1, | ||
| 424 | + "myChannel": "0", | ||
| 425 | + "name": "汽车", | ||
| 426 | + "num": 22, | ||
| 427 | + "pageId": 20028, | ||
| 428 | + "pageType": "", | ||
| 429 | + "underlineCColor": "" | ||
| 430 | + }, | ||
| 431 | + { | ||
| 432 | + "channelId": 2021, | ||
| 433 | + "channelStrategy": 1, | ||
| 434 | + "channelStyle": 2, | ||
| 435 | + "channelType": 1, | ||
| 436 | + "defaultPermitted": 0, | ||
| 437 | + "delPermitted": 1, | ||
| 438 | + "fontCColor": "#FFFFFF", | ||
| 439 | + "fontColor": "#F9AB99", | ||
| 440 | + "headlinesOn": 0, | ||
| 441 | + "homeChannel": "0", | ||
| 442 | + "iconCUrl": "", | ||
| 443 | + "iconCUrlSize": "", | ||
| 444 | + "iconUrl": "", | ||
| 445 | + "iconUrlSize": "", | ||
| 446 | + "localChannel": "0", | ||
| 447 | + "moreChannel": "1", | ||
| 448 | + "movePermitted": 1, | ||
| 449 | + "myChannel": "0", | ||
| 450 | + "name": "法治", | ||
| 451 | + "num": 27, | ||
| 452 | + "pageId": 20031, | ||
| 453 | + "pageType": "", | ||
| 454 | + "underlineCColor": "" | ||
| 455 | + }, | ||
| 456 | + { | ||
| 457 | + "channelId": 2027, | ||
| 458 | + "channelStrategy": 1, | ||
| 459 | + "channelStyle": 2, | ||
| 460 | + "channelType": 2, | ||
| 461 | + "defaultPermitted": 0, | ||
| 462 | + "delPermitted": 1, | ||
| 463 | + "fontCColor": "#FFFFFF", | ||
| 464 | + "fontColor": "#F9AB99", | ||
| 465 | + "headlinesOn": 0, | ||
| 466 | + "homeChannel": "0", | ||
| 467 | + "iconCUrl": "", | ||
| 468 | + "iconCUrlSize": "", | ||
| 469 | + "iconUrl": "", | ||
| 470 | + "iconUrlSize": "", | ||
| 471 | + "localChannel": "1", | ||
| 472 | + "moreChannel": "0", | ||
| 473 | + "movePermitted": 1, | ||
| 474 | + "myChannel": "0", | ||
| 475 | + "name": "北京", | ||
| 476 | + "num": 32, | ||
| 477 | + "pageId": 20037, | ||
| 478 | + "pageType": "", | ||
| 479 | + "underlineCColor": "" | ||
| 480 | + }, | ||
| 481 | + { | ||
| 482 | + "channelId": 2029, | ||
| 483 | + "channelStrategy": 1, | ||
| 484 | + "channelStyle": 2, | ||
| 485 | + "channelType": 2, | ||
| 486 | + "defaultPermitted": 0, | ||
| 487 | + "delPermitted": 1, | ||
| 488 | + "fontCColor": "#FFFFFF", | ||
| 489 | + "fontColor": "#F9AB99", | ||
| 490 | + "headlinesOn": 0, | ||
| 491 | + "homeChannel": "0", | ||
| 492 | + "iconCUrl": "", | ||
| 493 | + "iconCUrlSize": "", | ||
| 494 | + "iconUrl": "", | ||
| 495 | + "iconUrlSize": "", | ||
| 496 | + "localChannel": "1", | ||
| 497 | + "moreChannel": "0", | ||
| 498 | + "movePermitted": 1, | ||
| 499 | + "myChannel": "0", | ||
| 500 | + "name": "天津", | ||
| 501 | + "num": 33, | ||
| 502 | + "pageId": 20039, | ||
| 503 | + "pageType": "", | ||
| 504 | + "underlineCColor": "" | ||
| 505 | + }, | ||
| 506 | + { | ||
| 507 | + "channelId": 2030, | ||
| 508 | + "channelStrategy": 1, | ||
| 509 | + "channelStyle": 2, | ||
| 510 | + "channelType": 2, | ||
| 511 | + "defaultPermitted": 0, | ||
| 512 | + "delPermitted": 1, | ||
| 513 | + "fontCColor": "#FFFFFF", | ||
| 514 | + "fontColor": "#F9AB99", | ||
| 515 | + "headlinesOn": 0, | ||
| 516 | + "homeChannel": "0", | ||
| 517 | + "iconCUrl": "", | ||
| 518 | + "iconCUrlSize": "", | ||
| 519 | + "iconUrl": "", | ||
| 520 | + "iconUrlSize": "", | ||
| 521 | + "localChannel": "1", | ||
| 522 | + "moreChannel": "0", | ||
| 523 | + "movePermitted": 1, | ||
| 524 | + "myChannel": "0", | ||
| 525 | + "name": "河北", | ||
| 526 | + "num": 34, | ||
| 527 | + "pageId": 20040, | ||
| 528 | + "pageType": "", | ||
| 529 | + "underlineCColor": "" | ||
| 530 | + }, | ||
| 531 | + { | ||
| 532 | + "channelId": 2042, | ||
| 533 | + "channelStrategy": 1, | ||
| 534 | + "channelStyle": 2, | ||
| 535 | + "channelType": 2, | ||
| 536 | + "defaultPermitted": 0, | ||
| 537 | + "delPermitted": 1, | ||
| 538 | + "fontCColor": "#FFFFFF", | ||
| 539 | + "fontColor": "#F9AB99", | ||
| 540 | + "headlinesOn": 0, | ||
| 541 | + "homeChannel": "0", | ||
| 542 | + "iconCUrl": "", | ||
| 543 | + "iconCUrlSize": "", | ||
| 544 | + "iconUrl": "", | ||
| 545 | + "iconUrlSize": "", | ||
| 546 | + "localChannel": "1", | ||
| 547 | + "moreChannel": "0", | ||
| 548 | + "movePermitted": 1, | ||
| 549 | + "myChannel": "0", | ||
| 550 | + "name": "河南", | ||
| 551 | + "num": 35, | ||
| 552 | + "pageId": 20052, | ||
| 553 | + "pageType": "", | ||
| 554 | + "underlineCColor": "" | ||
| 555 | + }, | ||
| 556 | + { | ||
| 557 | + "channelId": 2041, | ||
| 558 | + "channelStrategy": 1, | ||
| 559 | + "channelStyle": 2, | ||
| 560 | + "channelType": 2, | ||
| 561 | + "defaultPermitted": 0, | ||
| 562 | + "delPermitted": 1, | ||
| 563 | + "fontCColor": "#FFFFFF", | ||
| 564 | + "fontColor": "#F9AB99", | ||
| 565 | + "headlinesOn": 0, | ||
| 566 | + "homeChannel": "0", | ||
| 567 | + "iconCUrl": "", | ||
| 568 | + "iconCUrlSize": "", | ||
| 569 | + "iconUrl": "", | ||
| 570 | + "iconUrlSize": "", | ||
| 571 | + "localChannel": "1", | ||
| 572 | + "moreChannel": "0", | ||
| 573 | + "movePermitted": 1, | ||
| 574 | + "myChannel": "0", | ||
| 575 | + "name": "山东", | ||
| 576 | + "num": 36, | ||
| 577 | + "pageId": 20051, | ||
| 578 | + "pageType": "", | ||
| 579 | + "underlineCColor": "" | ||
| 580 | + }, | ||
| 581 | + { | ||
| 582 | + "channelId": 2031, | ||
| 583 | + "channelStrategy": 2, | ||
| 584 | + "channelStyle": 2, | ||
| 585 | + "channelType": 2, | ||
| 586 | + "defaultPermitted": 0, | ||
| 587 | + "delPermitted": 1, | ||
| 588 | + "fontCColor": "#FFFFFF", | ||
| 589 | + "fontColor": "#F9AB99", | ||
| 590 | + "headlinesOn": 0, | ||
| 591 | + "homeChannel": "0", | ||
| 592 | + "iconCUrl": "", | ||
| 593 | + "iconCUrlSize": "", | ||
| 594 | + "iconUrl": "", | ||
| 595 | + "iconUrlSize": "", | ||
| 596 | + "localChannel": "1", | ||
| 597 | + "moreChannel": "0", | ||
| 598 | + "movePermitted": 1, | ||
| 599 | + "myChannel": "0", | ||
| 600 | + "name": "山西", | ||
| 601 | + "num": 37, | ||
| 602 | + "pageId": 20041, | ||
| 603 | + "pageType": "", | ||
| 604 | + "underlineCColor": "" | ||
| 605 | + }, | ||
| 606 | + { | ||
| 607 | + "channelId": 2032, | ||
| 608 | + "channelStrategy": 1, | ||
| 609 | + "channelStyle": 2, | ||
| 610 | + "channelType": 2, | ||
| 611 | + "defaultPermitted": 0, | ||
| 612 | + "delPermitted": 1, | ||
| 613 | + "fontCColor": "#FFFFFF", | ||
| 614 | + "fontColor": "#F9AB99", | ||
| 615 | + "headlinesOn": 0, | ||
| 616 | + "homeChannel": "0", | ||
| 617 | + "iconCUrl": "", | ||
| 618 | + "iconCUrlSize": "", | ||
| 619 | + "iconUrl": "", | ||
| 620 | + "iconUrlSize": "", | ||
| 621 | + "localChannel": "1", | ||
| 622 | + "moreChannel": "0", | ||
| 623 | + "movePermitted": 1, | ||
| 624 | + "myChannel": "0", | ||
| 625 | + "name": "内蒙古", | ||
| 626 | + "num": 38, | ||
| 627 | + "pageId": 20042, | ||
| 628 | + "pageType": "", | ||
| 629 | + "underlineCColor": "" | ||
| 630 | + }, | ||
| 631 | + { | ||
| 632 | + "channelId": 2033, | ||
| 633 | + "channelStrategy": 1, | ||
| 634 | + "channelStyle": 2, | ||
| 635 | + "channelType": 2, | ||
| 636 | + "defaultPermitted": 0, | ||
| 637 | + "delPermitted": 1, | ||
| 638 | + "fontCColor": "#FFFFFF", | ||
| 639 | + "fontColor": "#F9AB99", | ||
| 640 | + "headlinesOn": 0, | ||
| 641 | + "homeChannel": "0", | ||
| 642 | + "iconCUrl": "", | ||
| 643 | + "iconCUrlSize": "", | ||
| 644 | + "iconUrl": "", | ||
| 645 | + "iconUrlSize": "", | ||
| 646 | + "localChannel": "1", | ||
| 647 | + "moreChannel": "0", | ||
| 648 | + "movePermitted": 1, | ||
| 649 | + "myChannel": "0", | ||
| 650 | + "name": "辽宁", | ||
| 651 | + "num": 39, | ||
| 652 | + "pageId": 20043, | ||
| 653 | + "pageType": "", | ||
| 654 | + "underlineCColor": "" | ||
| 655 | + }, | ||
| 656 | + { | ||
| 657 | + "channelId": 2034, | ||
| 658 | + "channelStrategy": 1, | ||
| 659 | + "channelStyle": 2, | ||
| 660 | + "channelType": 2, | ||
| 661 | + "defaultPermitted": 0, | ||
| 662 | + "delPermitted": 1, | ||
| 663 | + "fontCColor": "#FFFFFF", | ||
| 664 | + "fontColor": "#F9AB99", | ||
| 665 | + "headlinesOn": 0, | ||
| 666 | + "homeChannel": "0", | ||
| 667 | + "iconCUrl": "", | ||
| 668 | + "iconCUrlSize": "", | ||
| 669 | + "iconUrl": "", | ||
| 670 | + "iconUrlSize": "", | ||
| 671 | + "localChannel": "1", | ||
| 672 | + "moreChannel": "0", | ||
| 673 | + "movePermitted": 1, | ||
| 674 | + "myChannel": "0", | ||
| 675 | + "name": "吉林", | ||
| 676 | + "num": 40, | ||
| 677 | + "pageId": 20044, | ||
| 678 | + "pageType": "", | ||
| 679 | + "underlineCColor": "" | ||
| 680 | + }, | ||
| 681 | + { | ||
| 682 | + "channelId": 2035, | ||
| 683 | + "channelStrategy": 1, | ||
| 684 | + "channelStyle": 2, | ||
| 685 | + "channelType": 2, | ||
| 686 | + "defaultPermitted": 0, | ||
| 687 | + "delPermitted": 1, | ||
| 688 | + "fontCColor": "#FFFFFF", | ||
| 689 | + "fontColor": "#F9AB99", | ||
| 690 | + "headlinesOn": 0, | ||
| 691 | + "homeChannel": "0", | ||
| 692 | + "iconCUrl": "", | ||
| 693 | + "iconCUrlSize": "", | ||
| 694 | + "iconUrl": "", | ||
| 695 | + "iconUrlSize": "", | ||
| 696 | + "localChannel": "1", | ||
| 697 | + "moreChannel": "0", | ||
| 698 | + "movePermitted": 1, | ||
| 699 | + "myChannel": "0", | ||
| 700 | + "name": "黑龙江", | ||
| 701 | + "num": 41, | ||
| 702 | + "pageId": 20045, | ||
| 703 | + "pageType": "", | ||
| 704 | + "underlineCColor": "" | ||
| 705 | + }, | ||
| 706 | + { | ||
| 707 | + "channelId": 2028, | ||
| 708 | + "channelStrategy": 1, | ||
| 709 | + "channelStyle": 2, | ||
| 710 | + "channelType": 2, | ||
| 711 | + "defaultPermitted": 0, | ||
| 712 | + "delPermitted": 1, | ||
| 713 | + "fontCColor": "#FFFFFF", | ||
| 714 | + "fontColor": "#F9AB99", | ||
| 715 | + "headlinesOn": 0, | ||
| 716 | + "homeChannel": "0", | ||
| 717 | + "iconCUrl": "", | ||
| 718 | + "iconCUrlSize": "", | ||
| 719 | + "iconUrl": "", | ||
| 720 | + "iconUrlSize": "", | ||
| 721 | + "localChannel": "1", | ||
| 722 | + "moreChannel": "0", | ||
| 723 | + "movePermitted": 1, | ||
| 724 | + "myChannel": "0", | ||
| 725 | + "name": "上海", | ||
| 726 | + "num": 42, | ||
| 727 | + "pageId": 20038, | ||
| 728 | + "pageType": "", | ||
| 729 | + "underlineCColor": "" | ||
| 730 | + }, | ||
| 731 | + { | ||
| 732 | + "channelId": 2036, | ||
| 733 | + "channelStrategy": 1, | ||
| 734 | + "channelStyle": 2, | ||
| 735 | + "channelType": 2, | ||
| 736 | + "defaultPermitted": 0, | ||
| 737 | + "delPermitted": 1, | ||
| 738 | + "fontCColor": "#FFFFFF", | ||
| 739 | + "fontColor": "#F9AB99", | ||
| 740 | + "headlinesOn": 0, | ||
| 741 | + "homeChannel": "0", | ||
| 742 | + "iconCUrl": "", | ||
| 743 | + "iconCUrlSize": "", | ||
| 744 | + "iconUrl": "", | ||
| 745 | + "iconUrlSize": "", | ||
| 746 | + "localChannel": "1", | ||
| 747 | + "moreChannel": "0", | ||
| 748 | + "movePermitted": 1, | ||
| 749 | + "myChannel": "0", | ||
| 750 | + "name": "江苏", | ||
| 751 | + "num": 43, | ||
| 752 | + "pageId": 20046, | ||
| 753 | + "pageType": "", | ||
| 754 | + "underlineCColor": "" | ||
| 755 | + }, | ||
| 756 | + { | ||
| 757 | + "channelId": 2037, | ||
| 758 | + "channelStrategy": 1, | ||
| 759 | + "channelStyle": 2, | ||
| 760 | + "channelType": 2, | ||
| 761 | + "defaultPermitted": 0, | ||
| 762 | + "delPermitted": 1, | ||
| 763 | + "fontCColor": "#FFFFFF", | ||
| 764 | + "fontColor": "#F9AB99", | ||
| 765 | + "headlinesOn": 0, | ||
| 766 | + "homeChannel": "0", | ||
| 767 | + "iconCUrl": "", | ||
| 768 | + "iconCUrlSize": "", | ||
| 769 | + "iconUrl": "", | ||
| 770 | + "iconUrlSize": "", | ||
| 771 | + "localChannel": "1", | ||
| 772 | + "moreChannel": "0", | ||
| 773 | + "movePermitted": 1, | ||
| 774 | + "myChannel": "0", | ||
| 775 | + "name": "浙江", | ||
| 776 | + "num": 44, | ||
| 777 | + "pageId": 20047, | ||
| 778 | + "pageType": "", | ||
| 779 | + "underlineCColor": "" | ||
| 780 | + }, | ||
| 781 | + { | ||
| 782 | + "channelId": 2038, | ||
| 783 | + "channelStrategy": 1, | ||
| 784 | + "channelStyle": 2, | ||
| 785 | + "channelType": 2, | ||
| 786 | + "defaultPermitted": 0, | ||
| 787 | + "delPermitted": 1, | ||
| 788 | + "fontCColor": "#FFFFFF", | ||
| 789 | + "fontColor": "#F9AB99", | ||
| 790 | + "headlinesOn": 0, | ||
| 791 | + "homeChannel": "0", | ||
| 792 | + "iconCUrl": "", | ||
| 793 | + "iconCUrlSize": "", | ||
| 794 | + "iconUrl": "", | ||
| 795 | + "iconUrlSize": "", | ||
| 796 | + "localChannel": "1", | ||
| 797 | + "moreChannel": "0", | ||
| 798 | + "movePermitted": 1, | ||
| 799 | + "myChannel": "0", | ||
| 800 | + "name": "安徽", | ||
| 801 | + "num": 45, | ||
| 802 | + "pageId": 20048, | ||
| 803 | + "pageType": "", | ||
| 804 | + "underlineCColor": "" | ||
| 805 | + }, | ||
| 806 | + { | ||
| 807 | + "channelId": 2039, | ||
| 808 | + "channelStrategy": 1, | ||
| 809 | + "channelStyle": 2, | ||
| 810 | + "channelType": 2, | ||
| 811 | + "defaultPermitted": 0, | ||
| 812 | + "delPermitted": 1, | ||
| 813 | + "fontCColor": "#FFFFFF", | ||
| 814 | + "fontColor": "#F9AB99", | ||
| 815 | + "headlinesOn": 0, | ||
| 816 | + "homeChannel": "0", | ||
| 817 | + "iconCUrl": "", | ||
| 818 | + "iconCUrlSize": "", | ||
| 819 | + "iconUrl": "", | ||
| 820 | + "iconUrlSize": "", | ||
| 821 | + "localChannel": "1", | ||
| 822 | + "moreChannel": "0", | ||
| 823 | + "movePermitted": 1, | ||
| 824 | + "myChannel": "0", | ||
| 825 | + "name": "福建", | ||
| 826 | + "num": 46, | ||
| 827 | + "pageId": 20049, | ||
| 828 | + "pageType": "", | ||
| 829 | + "underlineCColor": "" | ||
| 830 | + }, | ||
| 831 | + { | ||
| 832 | + "channelId": 2040, | ||
| 833 | + "channelStrategy": 1, | ||
| 834 | + "channelStyle": 2, | ||
| 835 | + "channelType": 2, | ||
| 836 | + "defaultPermitted": 0, | ||
| 837 | + "delPermitted": 1, | ||
| 838 | + "fontCColor": "#FFFFFF", | ||
| 839 | + "fontColor": "#F9AB99", | ||
| 840 | + "headlinesOn": 0, | ||
| 841 | + "homeChannel": "0", | ||
| 842 | + "iconCUrl": "", | ||
| 843 | + "iconCUrlSize": "", | ||
| 844 | + "iconUrl": "", | ||
| 845 | + "iconUrlSize": "", | ||
| 846 | + "localChannel": "1", | ||
| 847 | + "moreChannel": "0", | ||
| 848 | + "movePermitted": 1, | ||
| 849 | + "myChannel": "0", | ||
| 850 | + "name": "江西", | ||
| 851 | + "num": 47, | ||
| 852 | + "pageId": 20050, | ||
| 853 | + "pageType": "", | ||
| 854 | + "underlineCColor": "" | ||
| 855 | + }, | ||
| 856 | + { | ||
| 857 | + "channelId": 2045, | ||
| 858 | + "channelStrategy": 1, | ||
| 859 | + "channelStyle": 2, | ||
| 860 | + "channelType": 2, | ||
| 861 | + "defaultPermitted": 0, | ||
| 862 | + "delPermitted": 1, | ||
| 863 | + "fontCColor": "#FFFFFF", | ||
| 864 | + "fontColor": "#F9AB99", | ||
| 865 | + "headlinesOn": 0, | ||
| 866 | + "homeChannel": "0", | ||
| 867 | + "iconCUrl": "", | ||
| 868 | + "iconCUrlSize": "", | ||
| 869 | + "iconUrl": "", | ||
| 870 | + "iconUrlSize": "", | ||
| 871 | + "localChannel": "1", | ||
| 872 | + "moreChannel": "0", | ||
| 873 | + "movePermitted": 1, | ||
| 874 | + "myChannel": "0", | ||
| 875 | + "name": "广东", | ||
| 876 | + "num": 48, | ||
| 877 | + "pageId": 20055, | ||
| 878 | + "pageType": "", | ||
| 879 | + "underlineCColor": "" | ||
| 880 | + }, | ||
| 881 | + { | ||
| 882 | + "channelId": 2046, | ||
| 883 | + "channelStrategy": 1, | ||
| 884 | + "channelStyle": 2, | ||
| 885 | + "channelType": 2, | ||
| 886 | + "defaultPermitted": 0, | ||
| 887 | + "delPermitted": 1, | ||
| 888 | + "fontCColor": "#FFFFFF", | ||
| 889 | + "fontColor": "#F9AB99", | ||
| 890 | + "headlinesOn": 0, | ||
| 891 | + "homeChannel": "0", | ||
| 892 | + "iconCUrl": "", | ||
| 893 | + "iconCUrlSize": "", | ||
| 894 | + "iconUrl": "", | ||
| 895 | + "iconUrlSize": "", | ||
| 896 | + "localChannel": "1", | ||
| 897 | + "moreChannel": "0", | ||
| 898 | + "movePermitted": 1, | ||
| 899 | + "myChannel": "0", | ||
| 900 | + "name": "广西", | ||
| 901 | + "num": 49, | ||
| 902 | + "pageId": 20056, | ||
| 903 | + "pageType": "", | ||
| 904 | + "underlineCColor": "" | ||
| 905 | + }, | ||
| 906 | + { | ||
| 907 | + "channelId": 2048, | ||
| 908 | + "channelStrategy": 1, | ||
| 909 | + "channelStyle": 2, | ||
| 910 | + "channelType": 2, | ||
| 911 | + "defaultPermitted": 0, | ||
| 912 | + "delPermitted": 1, | ||
| 913 | + "fontCColor": "#FFFFFF", | ||
| 914 | + "fontColor": "#F9AB99", | ||
| 915 | + "headlinesOn": 0, | ||
| 916 | + "homeChannel": "0", | ||
| 917 | + "iconCUrl": "", | ||
| 918 | + "iconCUrlSize": "", | ||
| 919 | + "iconUrl": "", | ||
| 920 | + "iconUrlSize": "", | ||
| 921 | + "localChannel": "1", | ||
| 922 | + "moreChannel": "0", | ||
| 923 | + "movePermitted": 1, | ||
| 924 | + "myChannel": "0", | ||
| 925 | + "name": "重庆", | ||
| 926 | + "num": 50, | ||
| 927 | + "pageId": 20058, | ||
| 928 | + "pageType": "", | ||
| 929 | + "underlineCColor": "" | ||
| 930 | + }, | ||
| 931 | + { | ||
| 932 | + "channelId": 2049, | ||
| 933 | + "channelStrategy": 1, | ||
| 934 | + "channelStyle": 2, | ||
| 935 | + "channelType": 2, | ||
| 936 | + "defaultPermitted": 0, | ||
| 937 | + "delPermitted": 1, | ||
| 938 | + "fontCColor": "#FFFFFF", | ||
| 939 | + "fontColor": "#F9AB99", | ||
| 940 | + "headlinesOn": 0, | ||
| 941 | + "homeChannel": "0", | ||
| 942 | + "iconCUrl": "", | ||
| 943 | + "iconCUrlSize": "", | ||
| 944 | + "iconUrl": "", | ||
| 945 | + "iconUrlSize": "", | ||
| 946 | + "localChannel": "1", | ||
| 947 | + "moreChannel": "0", | ||
| 948 | + "movePermitted": 1, | ||
| 949 | + "myChannel": "0", | ||
| 950 | + "name": "四川", | ||
| 951 | + "num": 51, | ||
| 952 | + "pageId": 20059, | ||
| 953 | + "pageType": "", | ||
| 954 | + "underlineCColor": "" | ||
| 955 | + }, | ||
| 956 | + { | ||
| 957 | + "channelId": 2051, | ||
| 958 | + "channelStrategy": 1, | ||
| 959 | + "channelStyle": 2, | ||
| 960 | + "channelType": 2, | ||
| 961 | + "defaultPermitted": 0, | ||
| 962 | + "delPermitted": 1, | ||
| 963 | + "fontCColor": "#FFFFFF", | ||
| 964 | + "fontColor": "#F9AB99", | ||
| 965 | + "headlinesOn": 0, | ||
| 966 | + "homeChannel": "0", | ||
| 967 | + "iconCUrl": "", | ||
| 968 | + "iconCUrlSize": "", | ||
| 969 | + "iconUrl": "", | ||
| 970 | + "iconUrlSize": "", | ||
| 971 | + "localChannel": "1", | ||
| 972 | + "moreChannel": "0", | ||
| 973 | + "movePermitted": 1, | ||
| 974 | + "myChannel": "0", | ||
| 975 | + "name": "云南", | ||
| 976 | + "num": 52, | ||
| 977 | + "pageId": 20061, | ||
| 978 | + "pageType": "", | ||
| 979 | + "underlineCColor": "" | ||
| 980 | + }, | ||
| 981 | + { | ||
| 982 | + "channelId": 2050, | ||
| 983 | + "channelStrategy": 1, | ||
| 984 | + "channelStyle": 2, | ||
| 985 | + "channelType": 2, | ||
| 986 | + "defaultPermitted": 0, | ||
| 987 | + "delPermitted": 1, | ||
| 988 | + "fontCColor": "#FFFFFF", | ||
| 989 | + "fontColor": "#F9AB99", | ||
| 990 | + "headlinesOn": 0, | ||
| 991 | + "homeChannel": "0", | ||
| 992 | + "iconCUrl": "", | ||
| 993 | + "iconCUrlSize": "", | ||
| 994 | + "iconUrl": "", | ||
| 995 | + "iconUrlSize": "", | ||
| 996 | + "localChannel": "1", | ||
| 997 | + "moreChannel": "0", | ||
| 998 | + "movePermitted": 1, | ||
| 999 | + "myChannel": "0", | ||
| 1000 | + "name": "贵州", | ||
| 1001 | + "num": 53, | ||
| 1002 | + "pageId": 20060, | ||
| 1003 | + "pageType": "", | ||
| 1004 | + "underlineCColor": "" | ||
| 1005 | + }, | ||
| 1006 | + { | ||
| 1007 | + "channelId": 2044, | ||
| 1008 | + "channelStrategy": 1, | ||
| 1009 | + "channelStyle": 2, | ||
| 1010 | + "channelType": 2, | ||
| 1011 | + "defaultPermitted": 0, | ||
| 1012 | + "delPermitted": 1, | ||
| 1013 | + "fontCColor": "#FFFFFF", | ||
| 1014 | + "fontColor": "#F9AB99", | ||
| 1015 | + "headlinesOn": 0, | ||
| 1016 | + "homeChannel": "0", | ||
| 1017 | + "iconCUrl": "", | ||
| 1018 | + "iconCUrlSize": "", | ||
| 1019 | + "iconUrl": "", | ||
| 1020 | + "iconUrlSize": "", | ||
| 1021 | + "localChannel": "1", | ||
| 1022 | + "moreChannel": "0", | ||
| 1023 | + "movePermitted": 1, | ||
| 1024 | + "myChannel": "0", | ||
| 1025 | + "name": "湖南", | ||
| 1026 | + "num": 54, | ||
| 1027 | + "pageId": 20054, | ||
| 1028 | + "pageType": "", | ||
| 1029 | + "underlineCColor": "" | ||
| 1030 | + }, | ||
| 1031 | + { | ||
| 1032 | + "channelId": 2043, | ||
| 1033 | + "channelStrategy": 1, | ||
| 1034 | + "channelStyle": 2, | ||
| 1035 | + "channelType": 2, | ||
| 1036 | + "defaultPermitted": 0, | ||
| 1037 | + "delPermitted": 1, | ||
| 1038 | + "fontCColor": "#FFFFFF", | ||
| 1039 | + "fontColor": "#F9AB99", | ||
| 1040 | + "headlinesOn": 0, | ||
| 1041 | + "homeChannel": "0", | ||
| 1042 | + "iconCUrl": "", | ||
| 1043 | + "iconCUrlSize": "", | ||
| 1044 | + "iconUrl": "", | ||
| 1045 | + "iconUrlSize": "", | ||
| 1046 | + "localChannel": "1", | ||
| 1047 | + "moreChannel": "0", | ||
| 1048 | + "movePermitted": 1, | ||
| 1049 | + "myChannel": "0", | ||
| 1050 | + "name": "湖北", | ||
| 1051 | + "num": 55, | ||
| 1052 | + "pageId": 20053, | ||
| 1053 | + "pageType": "", | ||
| 1054 | + "underlineCColor": "" | ||
| 1055 | + }, | ||
| 1056 | + { | ||
| 1057 | + "channelId": 2052, | ||
| 1058 | + "channelStrategy": 2, | ||
| 1059 | + "channelStyle": 2, | ||
| 1060 | + "channelType": 2, | ||
| 1061 | + "defaultPermitted": 0, | ||
| 1062 | + "delPermitted": 1, | ||
| 1063 | + "fontCColor": "#FFFFFF", | ||
| 1064 | + "fontColor": "#F9AB99", | ||
| 1065 | + "headlinesOn": 0, | ||
| 1066 | + "homeChannel": "0", | ||
| 1067 | + "iconCUrl": "", | ||
| 1068 | + "iconCUrlSize": "", | ||
| 1069 | + "iconUrl": "", | ||
| 1070 | + "iconUrlSize": "", | ||
| 1071 | + "localChannel": "1", | ||
| 1072 | + "moreChannel": "0", | ||
| 1073 | + "movePermitted": 1, | ||
| 1074 | + "myChannel": "0", | ||
| 1075 | + "name": "西藏", | ||
| 1076 | + "num": 56, | ||
| 1077 | + "pageId": 20062, | ||
| 1078 | + "pageType": "", | ||
| 1079 | + "underlineCColor": "" | ||
| 1080 | + }, | ||
| 1081 | + { | ||
| 1082 | + "channelId": 2057, | ||
| 1083 | + "channelStrategy": 2, | ||
| 1084 | + "channelStyle": 2, | ||
| 1085 | + "channelType": 2, | ||
| 1086 | + "defaultPermitted": 0, | ||
| 1087 | + "delPermitted": 1, | ||
| 1088 | + "fontCColor": "#FFFFFF", | ||
| 1089 | + "fontColor": "#F9AB99", | ||
| 1090 | + "headlinesOn": 0, | ||
| 1091 | + "homeChannel": "0", | ||
| 1092 | + "iconCUrl": "", | ||
| 1093 | + "iconCUrlSize": "", | ||
| 1094 | + "iconUrl": "", | ||
| 1095 | + "iconUrlSize": "", | ||
| 1096 | + "localChannel": "1", | ||
| 1097 | + "moreChannel": "0", | ||
| 1098 | + "movePermitted": 1, | ||
| 1099 | + "myChannel": "0", | ||
| 1100 | + "name": "新疆", | ||
| 1101 | + "num": 57, | ||
| 1102 | + "pageId": 20067, | ||
| 1103 | + "pageType": "", | ||
| 1104 | + "underlineCColor": "" | ||
| 1105 | + }, | ||
| 1106 | + { | ||
| 1107 | + "channelId": 2053, | ||
| 1108 | + "channelStrategy": 1, | ||
| 1109 | + "channelStyle": 2, | ||
| 1110 | + "channelType": 2, | ||
| 1111 | + "defaultPermitted": 0, | ||
| 1112 | + "delPermitted": 1, | ||
| 1113 | + "fontCColor": "#FFFFFF", | ||
| 1114 | + "fontColor": "#F9AB99", | ||
| 1115 | + "headlinesOn": 0, | ||
| 1116 | + "homeChannel": "0", | ||
| 1117 | + "iconCUrl": "", | ||
| 1118 | + "iconCUrlSize": "", | ||
| 1119 | + "iconUrl": "", | ||
| 1120 | + "iconUrlSize": "", | ||
| 1121 | + "localChannel": "1", | ||
| 1122 | + "moreChannel": "0", | ||
| 1123 | + "movePermitted": 1, | ||
| 1124 | + "myChannel": "0", | ||
| 1125 | + "name": "陕西", | ||
| 1126 | + "num": 58, | ||
| 1127 | + "pageId": 20063, | ||
| 1128 | + "pageType": "", | ||
| 1129 | + "underlineCColor": "" | ||
| 1130 | + }, | ||
| 1131 | + { | ||
| 1132 | + "channelId": 2054, | ||
| 1133 | + "channelStrategy": 1, | ||
| 1134 | + "channelStyle": 2, | ||
| 1135 | + "channelType": 2, | ||
| 1136 | + "defaultPermitted": 0, | ||
| 1137 | + "delPermitted": 1, | ||
| 1138 | + "fontCColor": "#FFFFFF", | ||
| 1139 | + "fontColor": "#F9AB99", | ||
| 1140 | + "headlinesOn": 0, | ||
| 1141 | + "homeChannel": "0", | ||
| 1142 | + "iconCUrl": "", | ||
| 1143 | + "iconCUrlSize": "", | ||
| 1144 | + "iconUrl": "", | ||
| 1145 | + "iconUrlSize": "", | ||
| 1146 | + "localChannel": "1", | ||
| 1147 | + "moreChannel": "0", | ||
| 1148 | + "movePermitted": 1, | ||
| 1149 | + "myChannel": "0", | ||
| 1150 | + "name": "甘肃", | ||
| 1151 | + "num": 59, | ||
| 1152 | + "pageId": 20064, | ||
| 1153 | + "pageType": "", | ||
| 1154 | + "underlineCColor": "" | ||
| 1155 | + }, | ||
| 1156 | + { | ||
| 1157 | + "channelId": 2055, | ||
| 1158 | + "channelStrategy": 1, | ||
| 1159 | + "channelStyle": 2, | ||
| 1160 | + "channelType": 2, | ||
| 1161 | + "defaultPermitted": 0, | ||
| 1162 | + "delPermitted": 1, | ||
| 1163 | + "fontCColor": "#FFFFFF", | ||
| 1164 | + "fontColor": "#F9AB99", | ||
| 1165 | + "headlinesOn": 0, | ||
| 1166 | + "homeChannel": "0", | ||
| 1167 | + "iconCUrl": "", | ||
| 1168 | + "iconCUrlSize": "", | ||
| 1169 | + "iconUrl": "", | ||
| 1170 | + "iconUrlSize": "", | ||
| 1171 | + "localChannel": "1", | ||
| 1172 | + "moreChannel": "0", | ||
| 1173 | + "movePermitted": 1, | ||
| 1174 | + "myChannel": "0", | ||
| 1175 | + "name": "青海", | ||
| 1176 | + "num": 60, | ||
| 1177 | + "pageId": 20065, | ||
| 1178 | + "pageType": "", | ||
| 1179 | + "underlineCColor": "" | ||
| 1180 | + }, | ||
| 1181 | + { | ||
| 1182 | + "channelId": 2056, | ||
| 1183 | + "channelStrategy": 2, | ||
| 1184 | + "channelStyle": 2, | ||
| 1185 | + "channelType": 2, | ||
| 1186 | + "defaultPermitted": 0, | ||
| 1187 | + "delPermitted": 1, | ||
| 1188 | + "fontCColor": "#FFFFFF", | ||
| 1189 | + "fontColor": "#F9AB99", | ||
| 1190 | + "headlinesOn": 0, | ||
| 1191 | + "homeChannel": "0", | ||
| 1192 | + "iconCUrl": "", | ||
| 1193 | + "iconCUrlSize": "", | ||
| 1194 | + "iconUrl": "", | ||
| 1195 | + "iconUrlSize": "", | ||
| 1196 | + "localChannel": "1", | ||
| 1197 | + "moreChannel": "0", | ||
| 1198 | + "movePermitted": 1, | ||
| 1199 | + "myChannel": "0", | ||
| 1200 | + "name": "宁夏", | ||
| 1201 | + "num": 61, | ||
| 1202 | + "pageId": 20066, | ||
| 1203 | + "pageType": "", | ||
| 1204 | + "underlineCColor": "" | ||
| 1205 | + }, | ||
| 1206 | + { | ||
| 1207 | + "channelId": 2047, | ||
| 1208 | + "channelStrategy": 1, | ||
| 1209 | + "channelStyle": 2, | ||
| 1210 | + "channelType": 2, | ||
| 1211 | + "defaultPermitted": 0, | ||
| 1212 | + "delPermitted": 1, | ||
| 1213 | + "fontCColor": "#FFFFFF", | ||
| 1214 | + "fontColor": "#F9AB99", | ||
| 1215 | + "headlinesOn": 0, | ||
| 1216 | + "homeChannel": "0", | ||
| 1217 | + "iconCUrl": "", | ||
| 1218 | + "iconCUrlSize": "", | ||
| 1219 | + "iconUrl": "", | ||
| 1220 | + "iconUrlSize": "", | ||
| 1221 | + "localChannel": "1", | ||
| 1222 | + "moreChannel": "0", | ||
| 1223 | + "movePermitted": 1, | ||
| 1224 | + "myChannel": "0", | ||
| 1225 | + "name": "海南", | ||
| 1226 | + "num": 62, | ||
| 1227 | + "pageId": 20057, | ||
| 1228 | + "pageType": "", | ||
| 1229 | + "underlineCColor": "" | ||
| 1230 | + } | ||
| 1231 | + ] | ||
| 1232 | + }, | ||
| 1233 | + { | ||
| 1234 | + "id":202, | ||
| 1235 | + "topNavChannelList":[ | ||
| 1236 | + { | ||
| 1237 | + "channelId": 2058, | ||
| 1238 | + "channelStrategy": 1, | ||
| 1239 | + "channelStyle": 3, | ||
| 1240 | + "channelType": 1, | ||
| 1241 | + "defaultPermitted": 0, | ||
| 1242 | + "delPermitted": 1, | ||
| 1243 | + "fontCColor": "#FFFFFF", | ||
| 1244 | + "fontColor": "#F9AB99", | ||
| 1245 | + "headlinesOn": 0, | ||
| 1246 | + "homeChannel": "0", | ||
| 1247 | + "iconCUrl": "", | ||
| 1248 | + "iconCUrlSize": "", | ||
| 1249 | + "iconUrl": "", | ||
| 1250 | + "iconUrlSize": "", | ||
| 1251 | + "localChannel": "0", | ||
| 1252 | + "moreChannel": "0", | ||
| 1253 | + "movePermitted": 1, | ||
| 1254 | + "myChannel": "0", | ||
| 1255 | + "name": "推荐", | ||
| 1256 | + "num": 1, | ||
| 1257 | + "pageId": 20068, | ||
| 1258 | + "pageType": "", | ||
| 1259 | + "underlineCColor": "" | ||
| 1260 | + }, | ||
| 1261 | + { | ||
| 1262 | + "channelId": 2059, | ||
| 1263 | + "channelStrategy": 2, | ||
| 1264 | + "channelStyle": 3, | ||
| 1265 | + "channelType": 3, | ||
| 1266 | + "defaultPermitted": 0, | ||
| 1267 | + "delPermitted": 1, | ||
| 1268 | + "fontCColor": "#FFFFFF", | ||
| 1269 | + "fontColor": "#F9AB99", | ||
| 1270 | + "headlinesOn": 0, | ||
| 1271 | + "homeChannel": "0", | ||
| 1272 | + "iconCUrl": "", | ||
| 1273 | + "iconCUrlSize": "", | ||
| 1274 | + "iconUrl": "", | ||
| 1275 | + "iconUrlSize": "", | ||
| 1276 | + "localChannel": "0", | ||
| 1277 | + "moreChannel": "0", | ||
| 1278 | + "movePermitted": 1, | ||
| 1279 | + "myChannel": "0", | ||
| 1280 | + "name": "关注", | ||
| 1281 | + "num": 2, | ||
| 1282 | + "pageId": 20069, | ||
| 1283 | + "pageType": "", | ||
| 1284 | + "underlineCColor": "" | ||
| 1285 | + } | ||
| 1286 | + ] | ||
| 1287 | + }, | ||
| 1288 | + { | ||
| 1289 | + "id":203, | ||
| 1290 | + "topNavChannelList":[ | ||
| 1291 | + { | ||
| 1292 | + "channelId": 2060, | ||
| 1293 | + "channelStrategy": 1, | ||
| 1294 | + "channelStyle": 1, | ||
| 1295 | + "channelType": 1, | ||
| 1296 | + "defaultPermitted": 0, | ||
| 1297 | + "delPermitted": 1, | ||
| 1298 | + "fontCColor": "#FFFFFF", | ||
| 1299 | + "fontColor": "#F9AB99", | ||
| 1300 | + "headlinesOn": 0, | ||
| 1301 | + "homeChannel": "0", | ||
| 1302 | + "iconCUrl": "", | ||
| 1303 | + "iconCUrlSize": "", | ||
| 1304 | + "iconUrl": "", | ||
| 1305 | + "iconUrlSize": "", | ||
| 1306 | + "localChannel": "0", | ||
| 1307 | + "moreChannel": "0", | ||
| 1308 | + "movePermitted": 1, | ||
| 1309 | + "myChannel": "0", | ||
| 1310 | + "name": "视频", | ||
| 1311 | + "num": 1, | ||
| 1312 | + "pageId": 20070, | ||
| 1313 | + "pageType": "", | ||
| 1314 | + "underlineCColor": "" | ||
| 1315 | + }, | ||
| 1316 | + { | ||
| 1317 | + "channelId": 2061, | ||
| 1318 | + "channelStrategy": 2, | ||
| 1319 | + "channelStyle": 3, | ||
| 1320 | + "channelType": 1, | ||
| 1321 | + "defaultPermitted": 0, | ||
| 1322 | + "delPermitted": 1, | ||
| 1323 | + "fontCColor": "#FFFFFF", | ||
| 1324 | + "fontColor": "#F9AB99", | ||
| 1325 | + "headlinesOn": 0, | ||
| 1326 | + "homeChannel": "0", | ||
| 1327 | + "iconCUrl": "", | ||
| 1328 | + "iconCUrlSize": "", | ||
| 1329 | + "iconUrl": "", | ||
| 1330 | + "iconUrlSize": "", | ||
| 1331 | + "localChannel": "0", | ||
| 1332 | + "moreChannel": "0", | ||
| 1333 | + "movePermitted": 1, | ||
| 1334 | + "myChannel": "0", | ||
| 1335 | + "name": "直播", | ||
| 1336 | + "num": 2, | ||
| 1337 | + "pageId": 20071, | ||
| 1338 | + "pageType": "", | ||
| 1339 | + "underlineCColor": "" | ||
| 1340 | + } | ||
| 1341 | + ] | ||
| 1342 | + }, | ||
| 1343 | + { | ||
| 1344 | + "id":204, | ||
| 1345 | + "topNavChannelList":[ | ||
| 1346 | + { | ||
| 1347 | + "channelId": 2062, | ||
| 1348 | + "channelStrategy": 2, | ||
| 1349 | + "channelStyle": 3, | ||
| 1350 | + "channelType": 1, | ||
| 1351 | + "defaultPermitted": 0, | ||
| 1352 | + "delPermitted": 1, | ||
| 1353 | + "fontCColor": "#FFFFFF", | ||
| 1354 | + "fontColor": "#F9AB99", | ||
| 1355 | + "headlinesOn": 0, | ||
| 1356 | + "homeChannel": "0", | ||
| 1357 | + "iconCUrl": "", | ||
| 1358 | + "iconCUrlSize": "", | ||
| 1359 | + "iconUrl": "", | ||
| 1360 | + "iconUrlSize": "", | ||
| 1361 | + "localChannel": "0", | ||
| 1362 | + "moreChannel": "0", | ||
| 1363 | + "movePermitted": 1, | ||
| 1364 | + "myChannel": "0", | ||
| 1365 | + "name": "服务", | ||
| 1366 | + "num": 1, | ||
| 1367 | + "pageId": 20072, | ||
| 1368 | + "pageType": "", | ||
| 1369 | + "underlineCColor": "" | ||
| 1370 | + } | ||
| 1371 | + ] | ||
| 1372 | + } | ||
| 1373 | + ] | ||
| 1374 | +} |
lib_base/src/main/assets/two.json
0 → 100644
| 1 | +{ | ||
| 2 | + "data":[ | ||
| 3 | + { | ||
| 4 | + "code":"110000", | ||
| 5 | + "children":[ | ||
| 6 | + { | ||
| 7 | + "cityCode":"110000", | ||
| 8 | + "id":10000035, | ||
| 9 | + "label":"东城区" | ||
| 10 | + } | ||
| 11 | + ], | ||
| 12 | + "id":10000001, | ||
| 13 | + "label":"北京市" | ||
| 14 | + }, | ||
| 15 | + { | ||
| 16 | + "code":"130000", | ||
| 17 | + "children":[ | ||
| 18 | + { | ||
| 19 | + "cityCode":null, | ||
| 20 | + "id":130100, | ||
| 21 | + "label":"石家庄市" | ||
| 22 | + | ||
| 23 | + } | ||
| 24 | + ], | ||
| 25 | + "id":10000003, | ||
| 26 | + "label":"河北省" | ||
| 27 | + } | ||
| 28 | + ] | ||
| 29 | + | ||
| 30 | +} |
| 1 | +package com.wd.common.utils; | ||
| 2 | + | ||
| 3 | +/** | ||
| 4 | + * @author LiuKun | ||
| 5 | + * @date 2023/4/26 20:19 | ||
| 6 | + * @Description:objectUti | ||
| 7 | + */ | ||
| 8 | +public class ObjectUtil { | ||
| 9 | + | ||
| 10 | + public static boolean isNull(Object obj) { | ||
| 11 | + return obj == null; | ||
| 12 | + } | ||
| 13 | + | ||
| 14 | + public static boolean isNotNull(Object obj) { | ||
| 15 | + return obj != null; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public static int hashCode(Object obj) { | ||
| 19 | + return obj.hashCode(); | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + public static boolean equals(Object source, Object target) { | ||
| 23 | + | ||
| 24 | + if (isNull(source)) { | ||
| 25 | + return false; | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + if (isNull(target)) { | ||
| 29 | + return false; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + if (target == source) { | ||
| 33 | + return true; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + if (hashCode(target) == hashCode(source)) { | ||
| 37 | + return true; | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + return false; | ||
| 41 | + } | ||
| 42 | +} |
| @@ -11,10 +11,10 @@ import com.google.gson.JsonObject; | @@ -11,10 +11,10 @@ import com.google.gson.JsonObject; | ||
| 11 | import com.wd.base.log.Logger; | 11 | import com.wd.base.log.Logger; |
| 12 | import com.wd.capability.router.WdRouterRule; | 12 | import com.wd.capability.router.WdRouterRule; |
| 13 | import com.wd.capability.router.data.ActionBean; | 13 | import com.wd.capability.router.data.ActionBean; |
| 14 | +import com.wd.fastcoding.base.R; | ||
| 14 | import com.wd.foundation.wdkit.constant.PageNameConstants; | 15 | import com.wd.foundation.wdkit.constant.PageNameConstants; |
| 15 | import com.wd.common.constant.RouterConstants; | 16 | import com.wd.common.constant.RouterConstants; |
| 16 | import com.wd.common.manager.AudioThemManager; | 17 | import com.wd.common.manager.AudioThemManager; |
| 17 | -import com.wd.fastcoding.base.R; | ||
| 18 | import com.wd.foundation.bean.custom.MenuBean; | 18 | import com.wd.foundation.bean.custom.MenuBean; |
| 19 | import com.wd.foundation.bean.custom.SimpleAudioThemeBean; | 19 | import com.wd.foundation.bean.custom.SimpleAudioThemeBean; |
| 20 | import com.wd.foundation.bean.custom.SimpleAudioThemeBeans; | 20 | import com.wd.foundation.bean.custom.SimpleAudioThemeBeans; |
| @@ -73,6 +73,11 @@ public class ProcessUtils implements IntentConstants { | @@ -73,6 +73,11 @@ public class ProcessUtils implements IntentConstants { | ||
| 73 | public static String VideoChannelPageId = null; | 73 | public static String VideoChannelPageId = null; |
| 74 | 74 | ||
| 75 | /** | 75 | /** |
| 76 | + * 首页顶部导航栏de 辅助频道数据 | ||
| 77 | + */ | ||
| 78 | + public static List<ChannelBean> tempAddList = null; | ||
| 79 | + | ||
| 80 | + /** | ||
| 76 | * 版面频道(电子报) | 81 | * 版面频道(电子报) |
| 77 | */ | 82 | */ |
| 78 | public static String CHANNEL_ID_EL_NEWS = "2006"; | 83 | public static String CHANNEL_ID_EL_NEWS = "2006"; |
| @@ -1130,6 +1135,7 @@ public class ProcessUtils implements IntentConstants { | @@ -1130,6 +1135,7 @@ public class ProcessUtils implements IntentConstants { | ||
| 1130 | 1135 | ||
| 1131 | } | 1136 | } |
| 1132 | 1137 | ||
| 1138 | + | ||
| 1133 | /** | 1139 | /** |
| 1134 | * 进入启动页 | 1140 | * 进入启动页 |
| 1135 | */ | 1141 | */ |
| @@ -1216,6 +1222,40 @@ public class ProcessUtils implements IntentConstants { | @@ -1216,6 +1222,40 @@ public class ProcessUtils implements IntentConstants { | ||
| 1216 | 1222 | ||
| 1217 | 1223 | ||
| 1218 | /** | 1224 | /** |
| 1225 | + * 搜索 | ||
| 1226 | + * | ||
| 1227 | + * @param position -1不处理 | ||
| 1228 | + */ | ||
| 1229 | + public static void toSearchActivity(int position,String fromPage) { | ||
| 1230 | + // 拦截画中画 | ||
| 1231 | + interceptorPictureInPicture(); | ||
| 1232 | + ActionBean actionBean = new ActionBean(); | ||
| 1233 | + actionBean.paramBean.pageID = RouterConstants.PATH_MODULE_SEARCH; | ||
| 1234 | + JsonObject jsonObject = new JsonObject(); | ||
| 1235 | + jsonObject.addProperty(IntentConstants.JUMP_FROM_PAGE,fromPage); | ||
| 1236 | + jsonObject.addProperty(IntentConstants.INDEX, position + ""); | ||
| 1237 | + actionBean.paramBean.params = jsonObject.toString(); | ||
| 1238 | + WdRouterRule.getInstance().processAction(AppContext.getContext(), actionBean); | ||
| 1239 | + } | ||
| 1240 | + | ||
| 1241 | + /** | ||
| 1242 | + * 进入导航栏 | ||
| 1243 | + */ | ||
| 1244 | + @SuppressLint("ResourceType") | ||
| 1245 | + public static void goToNavBarActivity(String tabId) { | ||
| 1246 | + | ||
| 1247 | + JsonObject jsonObject = new JsonObject(); | ||
| 1248 | + jsonObject.addProperty(IntentConstants.PARAM_CHANNEL_ID, tabId); | ||
| 1249 | + ActionBean actionBean = new ActionBean(); | ||
| 1250 | + // 加进场动效 | ||
| 1251 | + actionBean.enterAnim = R.anim.enter_page_bottom_top_in; | ||
| 1252 | + actionBean.exitAnim = R.anim.enter_page_alpha_top_out; | ||
| 1253 | + actionBean.paramBean.pageID = RouterConstants.PATH_NAV_BAR; | ||
| 1254 | + actionBean.paramBean.params = jsonObject.toString(); | ||
| 1255 | + WdRouterRule.getInstance().processAction(ActivityController.getCurrentActivity(), actionBean); | ||
| 1256 | + } | ||
| 1257 | + | ||
| 1258 | + /** | ||
| 1219 | * 检测当前频道是否是特殊频道 | 1259 | * 检测当前频道是否是特殊频道 |
| 1220 | * | 1260 | * |
| 1221 | * @param tabBean | 1261 | * @param tabBean |
| 1 | +package com.wd.common.widget; | ||
| 2 | + | ||
| 3 | +import android.graphics.Rect; | ||
| 4 | +import android.view.View; | ||
| 5 | + | ||
| 6 | +import androidx.recyclerview.widget.RecyclerView; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * Created by Administrator on 2016/11/12. | ||
| 10 | + */ | ||
| 11 | +public class GridSpaceItemDecoration extends RecyclerView.ItemDecoration { | ||
| 12 | + private int spanCount; | ||
| 13 | + private int spacing; | ||
| 14 | + private boolean includeEdge; | ||
| 15 | + | ||
| 16 | + public GridSpaceItemDecoration(int spanCount, int spacing, boolean includeEdge) { | ||
| 17 | + this.spanCount = spanCount; | ||
| 18 | + this.spacing = spacing; | ||
| 19 | + this.includeEdge = includeEdge; | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + @Override | ||
| 23 | + public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) { | ||
| 24 | + int position = parent.getChildAdapterPosition(view); // item position | ||
| 25 | + int column = position % spanCount; // item column | ||
| 26 | + if (includeEdge) { | ||
| 27 | + outRect.left = spacing - column * spacing / spanCount; // spacing - column * ((1f / spanCount) * spacing) | ||
| 28 | + outRect.right = (column + 1) * spacing / spanCount; // (column + 1) * ((1f / spanCount) * spacing) | ||
| 29 | + if (position < spanCount) { // top edge | ||
| 30 | + outRect.top = spacing; | ||
| 31 | + } | ||
| 32 | + outRect.bottom = spacing; // item bottom | ||
| 33 | + } else { | ||
| 34 | + outRect.left = column * spacing / spanCount; // column * ((1f / spanCount) * spacing) | ||
| 35 | + outRect.right = spacing - (column + 1) * spacing / spanCount; // spacing - (column + 1) * ((1f / spanCount) * spacing) | ||
| 36 | + if (position >= spanCount) { | ||
| 37 | + outRect.top = spacing; // item top | ||
| 38 | + } | ||
| 39 | + } | ||
| 40 | + } | ||
| 41 | +} |
| 1 | +package com.wd.common.widget; | ||
| 2 | + | ||
| 3 | +import android.content.Context; | ||
| 4 | +import android.util.AttributeSet; | ||
| 5 | +import android.widget.GridView; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * @author prim | ||
| 9 | + * @version 1.0.0 | ||
| 10 | + * @desc | ||
| 11 | + * @time 2018/11/12 - 6:59 PM | ||
| 12 | + */ | ||
| 13 | +public class OtherGridView extends GridView { | ||
| 14 | + public OtherGridView(Context paramContext, AttributeSet paramAttributeSet) { | ||
| 15 | + super(paramContext, paramAttributeSet); | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + @Override | ||
| 19 | + public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { | ||
| 20 | + int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, | ||
| 21 | + MeasureSpec.AT_MOST); | ||
| 22 | + super.onMeasure(widthMeasureSpec, expandSpec); | ||
| 23 | + } | ||
| 24 | +} |
10.6 KB
1.09 KB
| @@ -348,32 +348,6 @@ | @@ -348,32 +348,6 @@ | ||
| 348 | <!--跳转异常--> | 348 | <!--跳转异常--> |
| 349 | <string name="jump_not_find">请升级到最新版本以体验全部功能</string> | 349 | <string name="jump_not_find">请升级到最新版本以体验全部功能</string> |
| 350 | 350 | ||
| 351 | - <!--缺省页--> | ||
| 352 | - <!--页面接口报错,用于列表类及其他页面(带重试按钮)--> | ||
| 353 | - <string name="default_get_content_error">加载失败,请重试!</string> | ||
| 354 | - <!--内容获取失败,用于内容详情页(带重试按钮)--> | ||
| 355 | - <string name="default_get_content_failed">发生错误,请稍后重试。</string> | ||
| 356 | - <!--暂无网络(带重试按钮)--> | ||
| 357 | - <string name="default_no_network">请检查您的网络连接,然后重试!</string> | ||
| 358 | - <!--暂无内容--> | ||
| 359 | - <string name="default_no_content">暂无内容</string> | ||
| 360 | - <!--暂无收藏内容--> | ||
| 361 | - <string name="default_no_collected">你好没有收藏. 去主页.</string> | ||
| 362 | - <string name="no_collection">暂无收藏内容</string> | ||
| 363 | - <!--暂无消息或暂无浏览历史--> | ||
| 364 | - <string name="default_no_records">暂无消息</string> | ||
| 365 | - <string name="no_browsing_history">暂无浏览历史</string> | ||
| 366 | - <!--暂无搜索结果--> | ||
| 367 | - <string name="default_no_content_found">未找到内容</string> | ||
| 368 | - | ||
| 369 | - <string name="no_net_tips">无网络</string> | ||
| 370 | - <string name="weak_net_tips">网络有问题。请检查网络</string> | ||
| 371 | - <string name="click_retry">重试</string> | ||
| 372 | - <string name="clickretry">点击重试</string> | ||
| 373 | - <string name="no_more_data">没有了</string> | ||
| 374 | - <string name="seal_login_user_logout">用户已注销</string> | ||
| 375 | - <string name="seal_login_user_blocked">这个账号被封了!</string> | ||
| 376 | - | ||
| 377 | <!-- 加入聊天室失败--> | 351 | <!-- 加入聊天室失败--> |
| 378 | <string name="discovery_chat_room_join_failure">加入聊天室失败 </string> | 352 | <string name="discovery_chat_room_join_failure">加入聊天室失败 </string> |
| 379 | <!-- 你被禁止加入聊天室--> | 353 | <!-- 你被禁止加入聊天室--> |
| @@ -37,7 +37,6 @@ dependencies { | @@ -37,7 +37,6 @@ dependencies { | ||
| 37 | annotationProcessor rootProject.ext.dependencies["room-compiler"] | 37 | annotationProcessor rootProject.ext.dependencies["room-compiler"] |
| 38 | //json解析 | 38 | //json解析 |
| 39 | implementation rootProject.ext.dependencies["gson"] | 39 | implementation rootProject.ext.dependencies["gson"] |
| 40 | - implementation project(path: ':wdbean') | ||
| 41 | implementation project(path: ':wdkitcore') | 40 | implementation project(path: ':wdkitcore') |
| 42 | // implementation project(':aar_repo:localaar_ability') | 41 | // implementation project(':aar_repo:localaar_ability') |
| 43 | } | 42 | } |
| @@ -18,7 +18,12 @@ | @@ -18,7 +18,12 @@ | ||
| 18 | android:screenOrientation="portrait"/> | 18 | android:screenOrientation="portrait"/> |
| 19 | 19 | ||
| 20 | <activity | 20 | <activity |
| 21 | - android:name="com.wd.module_home.PaperActivity" | 21 | + android:name=".NavigationBarActivity" |
| 22 | + android:exported="false" | ||
| 23 | + android:screenOrientation="portrait" /> | ||
| 24 | + | ||
| 25 | + <activity | ||
| 26 | + android:name=".PaperActivity" | ||
| 22 | android:exported="false" | 27 | android:exported="false" |
| 23 | android:screenOrientation="portrait" | 28 | android:screenOrientation="portrait" |
| 24 | android:theme="@style/BgTransparentTheme"/> | 29 | android:theme="@style/BgTransparentTheme"/> |
| 1 | +package com.wd.module_home; | ||
| 2 | + | ||
| 3 | +import android.graphics.drawable.Drawable; | ||
| 4 | +import android.view.View; | ||
| 5 | +import android.widget.GridView; | ||
| 6 | +import android.widget.ImageView; | ||
| 7 | +import android.widget.RelativeLayout; | ||
| 8 | +import android.widget.TextView; | ||
| 9 | + | ||
| 10 | +import androidx.annotation.NonNull; | ||
| 11 | +import androidx.constraintlayout.widget.ConstraintLayout; | ||
| 12 | +import androidx.core.content.ContextCompat; | ||
| 13 | +import androidx.recyclerview.widget.ItemTouchHelper; | ||
| 14 | +import androidx.recyclerview.widget.RecyclerView; | ||
| 15 | + | ||
| 16 | +import com.alibaba.android.arouter.facade.annotation.Route; | ||
| 17 | +import com.people.room.ChannelDbHelper; | ||
| 18 | +import com.people.room.entity.ChannelBean; | ||
| 19 | +import com.wd.common.base.BaseActivity; | ||
| 20 | +import com.wd.common.constant.RouterConstants; | ||
| 21 | +import com.wd.common.utils.ObjectUtil; | ||
| 22 | +import com.wd.common.utils.ProcessUtils; | ||
| 23 | +import com.wd.common.widget.GridSpaceItemDecoration; | ||
| 24 | +import com.wd.common.widget.WrapHeightGridLayoutManager; | ||
| 25 | +import com.wd.foundation.wdkit.constant.EventConstants; | ||
| 26 | +import com.wd.foundation.wdkit.statusbar.StatusBarStyleEnum; | ||
| 27 | +import com.wd.foundation.wdkit.utils.SpUtils; | ||
| 28 | +import com.wd.foundation.wdkitcore.livedata.LiveDataBus; | ||
| 29 | +import com.wd.foundation.wdkitcore.thread.ThreadPoolUtils; | ||
| 30 | +import com.wd.foundation.wdkitcore.tools.AppContext; | ||
| 31 | +import com.wd.module_home.adapter.ActNewChannelAdapter; | ||
| 32 | +import com.wd.module_home.adapter.ActNewChannelNormalAdapter; | ||
| 33 | +import com.wd.module_home.util.CallbackItemTouch; | ||
| 34 | +import com.wd.module_home.util.MyItemTouchHelperCallback; | ||
| 35 | + | ||
| 36 | +import java.util.ArrayList; | ||
| 37 | +import java.util.List; | ||
| 38 | + | ||
| 39 | +/** | ||
| 40 | + * @Description: 导航栏页面、频道选择页、频道切换页面、频道排序页、更多频道页、频道栏目页(首页设置、我的频道、更多频道、地方频道) | ||
| 41 | + * @Author: Li Yubing | ||
| 42 | + * @Email: liyubing@wondert.com.cn | ||
| 43 | + * @CreateDate: 2023/8/3 15:14 | ||
| 44 | + * @Version: 1.0 | ||
| 45 | + */ | ||
| 46 | +@Route(path = RouterConstants.PATH_NAV_BAR) | ||
| 47 | +public class NavigationBarActivity extends BaseActivity implements View.OnClickListener { | ||
| 48 | + | ||
| 49 | + private ItemTouchHelper touchHelper; | ||
| 50 | + | ||
| 51 | + /** | ||
| 52 | + * 我的频道 | ||
| 53 | + */ | ||
| 54 | + private RecyclerView recyclerView; | ||
| 55 | + /** | ||
| 56 | + * 我的频道适配器 | ||
| 57 | + */ | ||
| 58 | + private ActNewChannelAdapter myChannelAdapter; | ||
| 59 | + /** | ||
| 60 | + * 地方频道 | ||
| 61 | + */ | ||
| 62 | + private ActNewChannelNormalAdapter cityChannelAdapter; | ||
| 63 | + /** | ||
| 64 | + * 更多频道 | ||
| 65 | + */ | ||
| 66 | + private ActNewChannelNormalAdapter moreAdapter; | ||
| 67 | + private GridView gvLocalChannel; | ||
| 68 | + private GridView gvMoreChannel; | ||
| 69 | + private TextView act_channel_local, act_channel_cat, tv_edit_channel; | ||
| 70 | + private List<ChannelBean> myChannelList; | ||
| 71 | + private List<ChannelBean> cityChannelList; | ||
| 72 | + private List<ChannelBean> moreChannelList; | ||
| 73 | + private ImageView recommendImg; | ||
| 74 | + private TextView recommendBtn; | ||
| 75 | + private ImageView hotImg; | ||
| 76 | + private TextView hotBtn; | ||
| 77 | + private TextView tvhomeset; | ||
| 78 | + private TextView tvhomesettip; | ||
| 79 | + //我的频道 | ||
| 80 | + private TextView mychannel; | ||
| 81 | + | ||
| 82 | + private ConstraintLayout clHomeSet; | ||
| 83 | + | ||
| 84 | + private boolean isEditChannel = false; | ||
| 85 | + | ||
| 86 | + /** | ||
| 87 | + * 页面数据有变化 | ||
| 88 | + */ | ||
| 89 | + private boolean isChange = false; | ||
| 90 | + /** | ||
| 91 | + * 首页设置第一项 | ||
| 92 | + */ | ||
| 93 | + private ChannelBean firstChannelEntity; | ||
| 94 | + /** | ||
| 95 | + * 首页设置第二项 | ||
| 96 | + */ | ||
| 97 | + private ChannelBean secondChannelEntity; | ||
| 98 | + | ||
| 99 | + | ||
| 100 | + @Override | ||
| 101 | + protected int getLayoutId() { | ||
| 102 | + return R.layout.act_new_channel; | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | + @Override | ||
| 106 | + protected String getTag() { | ||
| 107 | + return getClass().getSimpleName(); | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + @Override | ||
| 111 | + protected StatusBarStyleEnum getStatusBarStyle() { | ||
| 112 | + boolean isNightMode = SpUtils.isNightMode(); | ||
| 113 | + if(isNightMode){ | ||
| 114 | + return StatusBarStyleEnum.FULLSCREEN_LIGHT_ENUM; | ||
| 115 | + }else { | ||
| 116 | + return StatusBarStyleEnum.FULLSCREEN_DARK_ENUM; | ||
| 117 | + } | ||
| 118 | + | ||
| 119 | + } | ||
| 120 | + | ||
| 121 | + @Override | ||
| 122 | + protected void initView() { | ||
| 123 | + initArgs(); | ||
| 124 | + findView(); | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + @Override | ||
| 128 | + protected void initData() { | ||
| 129 | + | ||
| 130 | + } | ||
| 131 | + | ||
| 132 | + @Override | ||
| 133 | + protected void initViewModel() { | ||
| 134 | + ThreadPoolUtils.backgroundSubmit(new Runnable() { | ||
| 135 | + @Override | ||
| 136 | + public void run() { | ||
| 137 | + getNavbarChannelDataToDrawPage(ProcessUtils.tempAddList); | ||
| 138 | + } | ||
| 139 | + }); | ||
| 140 | + } | ||
| 141 | + | ||
| 142 | + public void initArgs() { | ||
| 143 | + ItemTouchHelper.Callback callback = new MyItemTouchHelperCallback(new CallbackItemTouch() { | ||
| 144 | + | ||
| 145 | + private int oldPosition = -1; | ||
| 146 | + private int newPosition = -1; | ||
| 147 | + | ||
| 148 | + @Override | ||
| 149 | + public boolean itemTouchOnMove(int oldPosition, int newPosition) { | ||
| 150 | + | ||
| 151 | + if (myChannelAdapter.getChannelEntities().get(newPosition).getHeadlinesOn() == 1 | ||
| 152 | + || myChannelAdapter.getChannelEntities().get(newPosition).getMovePermitted() == 0 | ||
| 153 | + || myChannelAdapter.getChannelEntities().get(oldPosition).getHeadlinesOn() == 1 | ||
| 154 | + || myChannelAdapter.getChannelEntities().get(oldPosition).getMovePermitted() == 0 | ||
| 155 | + ) { | ||
| 156 | + return false; | ||
| 157 | + } else { | ||
| 158 | + isChange = true; | ||
| 159 | + this.oldPosition = oldPosition; | ||
| 160 | + this.newPosition = newPosition; | ||
| 161 | + ChannelBean item = myChannelAdapter.getChannelEntities().get(oldPosition); | ||
| 162 | + myChannelAdapter.getChannelEntities().remove(oldPosition); | ||
| 163 | + myChannelAdapter.getChannelEntities().add(newPosition, item); | ||
| 164 | + myChannelAdapter.notifyItemMoved(oldPosition, newPosition); | ||
| 165 | + return true; | ||
| 166 | + } | ||
| 167 | + } | ||
| 168 | + | ||
| 169 | + @Override | ||
| 170 | + public void stopDrag() { | ||
| 171 | + if (isChange && oldPosition > -1) { | ||
| 172 | + myChannelAdapter.notifyDataSetChanged(); | ||
| 173 | + oldPosition = -1; | ||
| 174 | + newPosition = -1; | ||
| 175 | + } | ||
| 176 | + | ||
| 177 | + } | ||
| 178 | + });// create MyItemTouchHelperCallback | ||
| 179 | + | ||
| 180 | + | ||
| 181 | + touchHelper = new ItemTouchHelper(callback); // Create ItemTouchHelper and pass with parameter the MyItemTouchHelperCallback | ||
| 182 | + | ||
| 183 | + myChannelAdapter = new ActNewChannelAdapter(this,touchHelper, (v, object) -> { | ||
| 184 | + ChannelBean entity = (ChannelBean) object; | ||
| 185 | + int id = v.getId(); | ||
| 186 | + if (id == R.id.del_imageView) { | ||
| 187 | + removeChannel(entity); | ||
| 188 | + } else { | ||
| 189 | + if (isEditChannel) { | ||
| 190 | + if (entity.getHeadlinesOn() != 1 && entity.getMovePermitted() != 0 && entity.getDelPermitted() != 0) {//允许删除才可以删除 | ||
| 191 | + removeChannel(entity); | ||
| 192 | + } | ||
| 193 | + } else { | ||
| 194 | + toChannel(entity); | ||
| 195 | + } | ||
| 196 | + } | ||
| 197 | + }); | ||
| 198 | + | ||
| 199 | + myChannelAdapter.setOnChannelEditListener(new ActNewChannelAdapter.OnChannelEditListener() { | ||
| 200 | + @Override | ||
| 201 | + public void show() { | ||
| 202 | + isEditChannel = true; | ||
| 203 | + tv_edit_channel.setText(R.string.navigation_bar_finish); | ||
| 204 | + } | ||
| 205 | + | ||
| 206 | + @Override | ||
| 207 | + public void diss() { | ||
| 208 | + isEditChannel = false; | ||
| 209 | + tv_edit_channel.setText(R.string.navigation_bar_edit); | ||
| 210 | + } | ||
| 211 | + }); | ||
| 212 | + | ||
| 213 | + cityChannelAdapter = new ActNewChannelNormalAdapter(this, (v, object) -> { | ||
| 214 | + ChannelBean channelEntity = (ChannelBean) object; | ||
| 215 | + myChannelAdapter.addOne(channelEntity); | ||
| 216 | + judeMyChannelVisible(); | ||
| 217 | + cityChannelAdapter.removeItem(channelEntity); | ||
| 218 | + isChange = true; | ||
| 219 | + judegeLocalChannelVisible(); | ||
| 220 | + }); | ||
| 221 | + | ||
| 222 | + moreAdapter = new ActNewChannelNormalAdapter(this, (v, object) -> { | ||
| 223 | + ChannelBean channelEntity = (ChannelBean) object; | ||
| 224 | + myChannelAdapter.addOne(channelEntity); | ||
| 225 | + moreAdapter.removeItem(channelEntity); | ||
| 226 | + isChange = true; | ||
| 227 | + judgeMoreChannelVisible(); | ||
| 228 | + }); | ||
| 229 | + } | ||
| 230 | + | ||
| 231 | + /** | ||
| 232 | + * 异步保存频道 | ||
| 233 | + */ | ||
| 234 | + private void saveChannel(ChannelBean bean) { | ||
| 235 | + | ||
| 236 | + if (isChange) { | ||
| 237 | + ThreadPoolUtils.submit(new Runnable() { | ||
| 238 | + @Override | ||
| 239 | + public void run() { | ||
| 240 | + List<ChannelBean> channelEntities = new ArrayList<>(); | ||
| 241 | + ChannelDbHelper.getInstance(NavigationBarActivity.this).deleteAll(); | ||
| 242 | + channelEntities.addAll(myChannelAdapter.getChannelEntities()); | ||
| 243 | + channelEntities.addAll(moreAdapter.getChannelList()); | ||
| 244 | + channelEntities.addAll(cityChannelAdapter.getChannelList()); | ||
| 245 | + ChannelDbHelper.getInstance(NavigationBarActivity.this).save(channelEntities); | ||
| 246 | + LiveDataBus.getInstance().with(EventConstants.COLUMN_NAVIGATION_DATACHANGE).postValue(bean); | ||
| 247 | + } | ||
| 248 | + }); | ||
| 249 | + } else { | ||
| 250 | + if (bean != null) { | ||
| 251 | + LiveDataBus.getInstance().with(EventConstants.COLUMN_NAVIGATION_SELECT).postValue(bean); | ||
| 252 | + } | ||
| 253 | + } | ||
| 254 | + | ||
| 255 | + } | ||
| 256 | + | ||
| 257 | + public void findView() { | ||
| 258 | + | ||
| 259 | + gvMoreChannel = findViewById(R.id.act_channel_local_grid2); | ||
| 260 | + | ||
| 261 | + gvLocalChannel = findViewById(R.id.act_channel_local_grid); | ||
| 262 | + | ||
| 263 | + act_channel_local = findViewById(R.id.act_channel_local); | ||
| 264 | + | ||
| 265 | + act_channel_cat = findViewById(R.id.act_channel_cat); | ||
| 266 | + | ||
| 267 | + recyclerView = findViewById(R.id.act_new_channel_recyclerView); | ||
| 268 | + | ||
| 269 | + recommendBtn = findViewById(R.id.tv_channel_recommend_btn); | ||
| 270 | + hotBtn = findViewById(R.id.tv_channel_hot_btn); | ||
| 271 | + | ||
| 272 | + recommendImg = findViewById(R.id.iv_channel_recommend_btn); | ||
| 273 | + hotImg = findViewById(R.id.iv_channel_hot_btn); | ||
| 274 | + //首页设置 | ||
| 275 | + tvhomeset = findViewById(R.id.tvhomeset); | ||
| 276 | + tvhomesettip = findViewById(R.id.tvhomesettip); | ||
| 277 | + //我的频道 | ||
| 278 | + mychannel = findViewById(R.id.tv_my_channel); | ||
| 279 | + tv_edit_channel = findViewById(R.id.tv_edit_channel); | ||
| 280 | + | ||
| 281 | + clHomeSet = findViewById(R.id.clHomeSet); | ||
| 282 | + | ||
| 283 | + recyclerView.setLayoutManager(new WrapHeightGridLayoutManager(this, 4)); | ||
| 284 | + | ||
| 285 | + recyclerView.addItemDecoration(new GridSpaceItemDecoration(4, (int) getResources().getDimension(R.dimen.rmrb_dp8), false)); | ||
| 286 | + | ||
| 287 | + recyclerView.setAdapter(myChannelAdapter); | ||
| 288 | + | ||
| 289 | + gvMoreChannel.setAdapter(moreAdapter); | ||
| 290 | + | ||
| 291 | + gvLocalChannel.setAdapter(cityChannelAdapter); | ||
| 292 | + | ||
| 293 | + act_channel_local.setOnClickListener(this); | ||
| 294 | + | ||
| 295 | + act_channel_cat.setOnClickListener(this); | ||
| 296 | + | ||
| 297 | + act_channel_local.setSelected(true); | ||
| 298 | + | ||
| 299 | + findViewById(R.id.flClose).setOnClickListener(this); | ||
| 300 | + | ||
| 301 | + touchHelper.attachToRecyclerView(recyclerView); // Attach ItemTouchHelper to RecyclerView | ||
| 302 | + | ||
| 303 | + tv_edit_channel.setOnClickListener(this); | ||
| 304 | + | ||
| 305 | + recommendImg.setOnClickListener(this); | ||
| 306 | + hotImg.setOnClickListener(this); | ||
| 307 | + | ||
| 308 | + ImageView iv_rmrb_1 = findViewById(R.id.iv_rmrb_1); | ||
| 309 | + RelativeLayout.LayoutParams rlChannelParams = (RelativeLayout.LayoutParams) iv_rmrb_1.getLayoutParams(); | ||
| 310 | + rlChannelParams.setMargins(0, (int) (getResources().getDimension(R.dimen.rmrb_dp44) + getResources().getDimension(R.dimen.rmrb_dp4)), 0, 0); | ||
| 311 | + } | ||
| 312 | + | ||
| 313 | + private void removeChannel(ChannelBean entity) { | ||
| 314 | + isChange = true; | ||
| 315 | + entity.myChannel = "0"; | ||
| 316 | + myChannelAdapter.removeOne(entity); | ||
| 317 | + judeMyChannelVisible(); | ||
| 318 | + | ||
| 319 | + //地区频道 | ||
| 320 | + if (entity.getChannelType() == 2) { | ||
| 321 | + entity.localChannel = "1"; | ||
| 322 | + cityChannelAdapter.addItem(entity); | ||
| 323 | + judegeLocalChannelVisible(); | ||
| 324 | + } else { | ||
| 325 | + entity.moreChannel = "1"; | ||
| 326 | + moreAdapter.addItem(entity); | ||
| 327 | + judgeMoreChannelVisible(); | ||
| 328 | + } | ||
| 329 | + } | ||
| 330 | + | ||
| 331 | + private void judeMyChannelVisible() { | ||
| 332 | + if (ObjectUtil.isNull(myChannelAdapter)) { | ||
| 333 | + mychannel.setVisibility(View.GONE); | ||
| 334 | + tv_edit_channel.setVisibility(View.GONE); | ||
| 335 | + return; | ||
| 336 | + } | ||
| 337 | + if (myChannelAdapter.isDataEmpty()) { | ||
| 338 | + mychannel.setVisibility(View.GONE); | ||
| 339 | + tv_edit_channel.setVisibility(View.GONE); | ||
| 340 | + } else { | ||
| 341 | + mychannel.setVisibility(View.VISIBLE); | ||
| 342 | + tv_edit_channel.setVisibility(View.VISIBLE); | ||
| 343 | + } | ||
| 344 | + } | ||
| 345 | + | ||
| 346 | + private void judgeMoreChannelVisible() { | ||
| 347 | + | ||
| 348 | + if (ObjectUtil.isNull(moreAdapter)) { | ||
| 349 | + act_channel_cat.setVisibility(View.GONE); | ||
| 350 | + gvMoreChannel.setVisibility(View.GONE); | ||
| 351 | + return; | ||
| 352 | + } | ||
| 353 | + | ||
| 354 | + if (moreAdapter.isDataEmpty()) { | ||
| 355 | + | ||
| 356 | + act_channel_cat.setVisibility(View.GONE); | ||
| 357 | + gvMoreChannel.setVisibility(View.GONE); | ||
| 358 | + } else { | ||
| 359 | + | ||
| 360 | + act_channel_cat.setVisibility(View.VISIBLE); | ||
| 361 | + gvMoreChannel.setVisibility(View.VISIBLE); | ||
| 362 | + } | ||
| 363 | + } | ||
| 364 | + | ||
| 365 | + private void judegeLocalChannelVisible() { | ||
| 366 | + if (ObjectUtil.isNull(cityChannelAdapter)) { | ||
| 367 | + act_channel_local.setVisibility(View.GONE); | ||
| 368 | + gvLocalChannel.setVisibility(View.GONE); | ||
| 369 | + return; | ||
| 370 | + } | ||
| 371 | + | ||
| 372 | + if (cityChannelAdapter.isDataEmpty()) { | ||
| 373 | + | ||
| 374 | + act_channel_local.setVisibility(View.GONE); | ||
| 375 | + gvLocalChannel.setVisibility(View.GONE); | ||
| 376 | + } else { | ||
| 377 | + | ||
| 378 | + act_channel_local.setVisibility(View.VISIBLE); | ||
| 379 | + gvLocalChannel.setVisibility(View.VISIBLE); | ||
| 380 | + } | ||
| 381 | + } | ||
| 382 | + | ||
| 383 | + private ChannelBean entity; | ||
| 384 | + | ||
| 385 | + private void toChannel(ChannelBean entity) { | ||
| 386 | + this.entity = entity; | ||
| 387 | + finish(); | ||
| 388 | + } | ||
| 389 | + | ||
| 390 | + @Override | ||
| 391 | + public void onClick(View v) { | ||
| 392 | + int id = v.getId(); | ||
| 393 | + if (id == R.id.tv_edit_channel) { | ||
| 394 | + myChannelAdapter.togDelete(); | ||
| 395 | + myChannelAdapter.notifyDataSetChanged(); | ||
| 396 | + } else if (id == R.id.iv_channel_recommend_btn) { | ||
| 397 | + changeHomeSetUi(firstChannelEntity.getChannelId()); | ||
| 398 | + entity = firstChannelEntity; | ||
| 399 | + } else if (id == R.id.iv_channel_hot_btn) { | ||
| 400 | + changeHomeSetUi(secondChannelEntity.getChannelId()); | ||
| 401 | + entity = secondChannelEntity; | ||
| 402 | + } else if (id == R.id.flClose) { | ||
| 403 | +// entity = null; | ||
| 404 | + finish(); | ||
| 405 | + } | ||
| 406 | + } | ||
| 407 | + | ||
| 408 | + private void changeHomeSetUi(String channelId) { | ||
| 409 | + if (secondChannelEntity != null && secondChannelEntity.getChannelId().equals(channelId)) { | ||
| 410 | + recommendImg.setVisibility(View.VISIBLE); | ||
| 411 | + hotImg.setVisibility(View.VISIBLE); | ||
| 412 | + recommendBtn.setVisibility(View.VISIBLE); | ||
| 413 | + hotBtn.setVisibility(View.VISIBLE); | ||
| 414 | + SpUtils.setKeyDefaultChannelId(secondChannelEntity.getChannelId()); | ||
| 415 | + recommendImg.setImageResource(R.drawable.shape_channel_recommend_unselect); | ||
| 416 | + hotImg.setImageResource(R.drawable.shape_channel_hot_select); | ||
| 417 | + recommendBtn.setTextColor(ContextCompat.getColor(this, R.color.res_color_common_C11)); | ||
| 418 | + Drawable drawable = ContextCompat.getDrawable(this, R.drawable.channeldrawer_unselect); | ||
| 419 | + int wh = (int) getResources().getDimension(R.dimen.rmrb_dp20); | ||
| 420 | + drawable.setBounds(0, 0, wh,wh); | ||
| 421 | + recommendBtn.setCompoundDrawables(drawable, null, null, null); | ||
| 422 | + hotBtn.setTextColor(ContextCompat.getColor(this, R.color.res_color_common_C8_keep)); | ||
| 423 | + } else { | ||
| 424 | + if (secondChannelEntity == null) { | ||
| 425 | + recommendImg.setVisibility(View.VISIBLE); | ||
| 426 | + recommendBtn.setVisibility(View.VISIBLE); | ||
| 427 | + | ||
| 428 | + SpUtils.setKeyDefaultChannelId(firstChannelEntity.getChannelId()); | ||
| 429 | + hotImg.setImageResource(R.drawable.shape_channel_hot_unselect); | ||
| 430 | + recommendBtn.setTextColor(ContextCompat.getColor(this, R.color.res_color_common_C8_keep)); | ||
| 431 | + Drawable drawable = ContextCompat.getDrawable(this, R.drawable.channeldrawer_select); | ||
| 432 | + int wh = (int) getResources().getDimension(R.dimen.rmrb_dp20); | ||
| 433 | + drawable.setBounds(0, 0, wh, wh); | ||
| 434 | + recommendBtn.setCompoundDrawables(drawable, null, null, null); | ||
| 435 | + hotBtn.setTextColor(ContextCompat.getColor(this, R.color.res_color_common_C11)); | ||
| 436 | + | ||
| 437 | + hotImg.setVisibility(View.GONE); | ||
| 438 | + hotBtn.setVisibility(View.GONE); | ||
| 439 | + recommendImg.setImageResource(R.drawable.shape_bag_red_radious3); | ||
| 440 | + | ||
| 441 | + } else { | ||
| 442 | + recommendImg.setVisibility(View.VISIBLE); | ||
| 443 | + hotImg.setVisibility(View.VISIBLE); | ||
| 444 | + recommendBtn.setVisibility(View.VISIBLE); | ||
| 445 | + hotBtn.setVisibility(View.VISIBLE); | ||
| 446 | + SpUtils.setKeyDefaultChannelId(firstChannelEntity.getChannelId()); | ||
| 447 | + recommendImg.setImageResource(R.drawable.shape_channel_recommend_select); | ||
| 448 | + hotImg.setImageResource(R.drawable.shape_channel_hot_unselect); | ||
| 449 | + recommendBtn.setTextColor(ContextCompat.getColor(this, R.color.res_color_common_C8_keep)); | ||
| 450 | + Drawable drawable = ContextCompat.getDrawable(this, R.drawable.channeldrawer_select); | ||
| 451 | + int wh = (int) getResources().getDimension(R.dimen.rmrb_dp20); | ||
| 452 | + drawable.setBounds(0, 0, wh,wh); | ||
| 453 | + recommendBtn.setCompoundDrawables(drawable, null, null, null); | ||
| 454 | + hotBtn.setTextColor(ContextCompat.getColor(this, R.color.res_color_common_C11)); | ||
| 455 | + } | ||
| 456 | + } | ||
| 457 | + recommendBtn.setText(firstChannelEntity.getName()); | ||
| 458 | + if (secondChannelEntity != null) { | ||
| 459 | + hotBtn.setText(secondChannelEntity.getName()); | ||
| 460 | + } | ||
| 461 | + | ||
| 462 | + } | ||
| 463 | + | ||
| 464 | + /** | ||
| 465 | + * 获取频道导航栏频道数据,并调用页面绘制 | ||
| 466 | + * | ||
| 467 | + * @param tempAddList 辅助频道数据 | ||
| 468 | + */ | ||
| 469 | + private void getNavbarChannelDataToDrawPage(List<com.wd.foundation.bean.response.ChannelBean> tempAddList) { | ||
| 470 | + boolean saveFlag = false; | ||
| 471 | + // 频道编辑栏目中所有频道数据 | ||
| 472 | + List<ChannelBean> allChannelList = ChannelDbHelper.getInstance(AppContext.getContext()).getData(); | ||
| 473 | + if (tempAddList != null) { | ||
| 474 | + for (com.wd.foundation.bean.response.ChannelBean tempBean : tempAddList) { | ||
| 475 | + String channlId = tempBean.getChannelId(); | ||
| 476 | + for (ChannelBean bean : allChannelList) { | ||
| 477 | + if (channlId.equals(bean.getChannelId())) { | ||
| 478 | + // 设置成我的频道数据 | ||
| 479 | + bean.myChannel = "1"; | ||
| 480 | + saveFlag = true; | ||
| 481 | + break; | ||
| 482 | + } | ||
| 483 | + } | ||
| 484 | + } | ||
| 485 | + } | ||
| 486 | + if (saveFlag) { | ||
| 487 | + ChannelDbHelper.getInstance(AppContext.getContext()).save(allChannelList); | ||
| 488 | + } | ||
| 489 | + // 更新编辑编辑ui页面 | ||
| 490 | + update(allChannelList); | ||
| 491 | + } | ||
| 492 | + | ||
| 493 | + /** | ||
| 494 | + * 设置/更新数据 | ||
| 495 | + */ | ||
| 496 | + private void update(@NonNull List<ChannelBean> list) { | ||
| 497 | + firstChannelEntity = null; | ||
| 498 | + secondChannelEntity = null; | ||
| 499 | + myChannelList = new ArrayList<>(); | ||
| 500 | + cityChannelList = new ArrayList<>(); | ||
| 501 | + moreChannelList = new ArrayList<>(); | ||
| 502 | + ChannelBean channelEntity = null; | ||
| 503 | + for (int i = 0; i < list.size(); i++) { | ||
| 504 | + channelEntity = list.get(i); | ||
| 505 | + if (secondChannelEntity == null && "1".equals(channelEntity.homeChannel)) { | ||
| 506 | + if (firstChannelEntity == null) { | ||
| 507 | + firstChannelEntity = channelEntity; | ||
| 508 | + } else { | ||
| 509 | + secondChannelEntity = channelEntity; | ||
| 510 | + } | ||
| 511 | + } | ||
| 512 | + //我的频道 | ||
| 513 | + if ("1".equals(channelEntity.myChannel)) { | ||
| 514 | + myChannelList.add(channelEntity); | ||
| 515 | + } else { | ||
| 516 | + if ("1".equals(channelEntity.localChannel)) { | ||
| 517 | + //地方频道 | ||
| 518 | + cityChannelList.add(channelEntity); | ||
| 519 | + } else { | ||
| 520 | + channelEntity.moreChannel = "1"; | ||
| 521 | + //更多频道 | ||
| 522 | + moreChannelList.add(channelEntity); | ||
| 523 | + } | ||
| 524 | + } | ||
| 525 | + } | ||
| 526 | + if (firstChannelEntity == null && secondChannelEntity == null) { | ||
| 527 | + SpUtils.setKeyDefaultChannelId("2002"); | ||
| 528 | + //隐藏首选项 | ||
| 529 | + recommendImg.setVisibility(View.GONE); | ||
| 530 | + hotImg.setVisibility(View.GONE); | ||
| 531 | + recommendBtn.setVisibility(View.GONE); | ||
| 532 | + hotBtn.setVisibility(View.GONE); | ||
| 533 | + tvhomeset.setVisibility(View.GONE); | ||
| 534 | + tvhomesettip.setVisibility(View.GONE); | ||
| 535 | + clHomeSet.setVisibility(View.GONE); | ||
| 536 | + } else { | ||
| 537 | + clHomeSet.setVisibility(View.VISIBLE); | ||
| 538 | + ChannelBean sortChannelEntity = null; | ||
| 539 | + //排序 | ||
| 540 | + if (secondChannelEntity != null && firstChannelEntity.num > secondChannelEntity.num) { | ||
| 541 | + sortChannelEntity = secondChannelEntity; | ||
| 542 | + secondChannelEntity = firstChannelEntity; | ||
| 543 | + firstChannelEntity = sortChannelEntity; | ||
| 544 | + } | ||
| 545 | + tvhomeset.setVisibility(View.VISIBLE); | ||
| 546 | + tvhomesettip.setVisibility(View.VISIBLE); | ||
| 547 | + changeHomeSetUi(SpUtils.getKeyDefaultChannelId()); | ||
| 548 | + } | ||
| 549 | + myChannelAdapter.setChannelEntities(myChannelList); | ||
| 550 | + | ||
| 551 | + cityChannelAdapter.setData(cityChannelList); | ||
| 552 | + moreAdapter.setData(moreChannelList); | ||
| 553 | + judeMyChannelVisible(); | ||
| 554 | + judgeMoreChannelVisible(); | ||
| 555 | + judegeLocalChannelVisible(); | ||
| 556 | + } | ||
| 557 | + | ||
| 558 | + @Override | ||
| 559 | + public void finish() { | ||
| 560 | + super.finish(); | ||
| 561 | + overridePendingTransition(R.anim.exit_page_alpha_in, R.anim.exit_page_top_bottom_out); | ||
| 562 | + saveChannel(entity); | ||
| 563 | + } | ||
| 564 | +} |
| 1 | +package com.wd.module_home.adapter; | ||
| 2 | + | ||
| 3 | +import android.content.Context; | ||
| 4 | +import android.view.LayoutInflater; | ||
| 5 | +import android.view.MotionEvent; | ||
| 6 | +import android.view.View; | ||
| 7 | +import android.view.ViewGroup; | ||
| 8 | +import android.widget.ImageView; | ||
| 9 | +import android.widget.TextView; | ||
| 10 | + | ||
| 11 | +import androidx.annotation.NonNull; | ||
| 12 | +import androidx.core.content.ContextCompat; | ||
| 13 | +import androidx.core.view.MotionEventCompat; | ||
| 14 | +import androidx.recyclerview.widget.ItemTouchHelper; | ||
| 15 | +import androidx.recyclerview.widget.RecyclerView; | ||
| 16 | + | ||
| 17 | +import com.people.room.entity.ChannelBean; | ||
| 18 | +import com.wd.foundation.wdkit.utils.FilletUtil; | ||
| 19 | +import com.wd.foundation.wdkit.utils.SpUtils; | ||
| 20 | +import com.wd.foundation.wdkitcore.tools.ArrayUtils; | ||
| 21 | +import com.wd.module_home.R; | ||
| 22 | +import com.wd.module_home.util.MyGeneraItemClickListener; | ||
| 23 | + | ||
| 24 | +import java.util.ArrayList; | ||
| 25 | +import java.util.List; | ||
| 26 | + | ||
| 27 | +/** | ||
| 28 | + * 作者 zhangbinglei. | ||
| 29 | + * 日期 2016/11/19. | ||
| 30 | + * 描述 | ||
| 31 | + */ | ||
| 32 | +public class ActNewChannelAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { | ||
| 33 | + boolean delView; | ||
| 34 | + private MyGeneraItemClickListener onItemClickListener; | ||
| 35 | + private Context context; | ||
| 36 | + private List<ChannelBean> channelEntities = new ArrayList<>(); | ||
| 37 | + private ItemTouchHelper mItemTouchHelper; | ||
| 38 | + private LayoutInflater mInflater; | ||
| 39 | + /** | ||
| 40 | + * touch 间隔时间 用于分辨是否是 "点击" | ||
| 41 | + */ | ||
| 42 | + private static final long SPACE_TIME = 100; | ||
| 43 | + /** | ||
| 44 | + * touch 点击开始时间 | ||
| 45 | + */ | ||
| 46 | + private long startTime; | ||
| 47 | + | ||
| 48 | + public void setChannelEntities(List<ChannelBean> channelEntities) { | ||
| 49 | + this.channelEntities = channelEntities; | ||
| 50 | + notifyDataSetChanged(); | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + public List<ChannelBean> getChannelEntities() { | ||
| 54 | + return channelEntities; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + public ActNewChannelAdapter(Context context, ItemTouchHelper helper, MyGeneraItemClickListener onItemClickListener) { | ||
| 58 | + this.onItemClickListener = onItemClickListener; | ||
| 59 | + this.context = context; | ||
| 60 | + this.mItemTouchHelper = helper; | ||
| 61 | + this.mInflater = LayoutInflater.from(context); | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + @Override | ||
| 65 | + public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { | ||
| 66 | + return getViewHolderByTypeMyChannel(parent); | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + /** | ||
| 70 | + * 获取我的频道的ViewHolder | ||
| 71 | + */ | ||
| 72 | + @NonNull | ||
| 73 | + private RecyclerView.ViewHolder getViewHolderByTypeMyChannel(final ViewGroup parent) { | ||
| 74 | + View myChannelView = mInflater.inflate(R.layout.act_new_channel_item, parent, false); | ||
| 75 | + final ChannelViewHolder myHolder = new ChannelViewHolder(myChannelView); | ||
| 76 | + //点击事件 | ||
| 77 | + myHolder.convertView.setOnClickListener(new View.OnClickListener() { | ||
| 78 | + @Override | ||
| 79 | + public void onClick(final View v) { | ||
| 80 | + int p = (int) v.getTag(R.id.status_view); | ||
| 81 | + if (ArrayUtils.listHasItem(p, channelEntities)) { | ||
| 82 | + onItemClickListener.onItemClick(v, channelEntities.get(p)); | ||
| 83 | + } | ||
| 84 | + } | ||
| 85 | + }); | ||
| 86 | + //长按事件 | ||
| 87 | + myHolder.convertView.setOnLongClickListener(new View.OnLongClickListener() { | ||
| 88 | + @Override | ||
| 89 | + public boolean onLongClick(final View v) { | ||
| 90 | + if (!delView) { | ||
| 91 | + togDelete(); | ||
| 92 | + RecyclerView recyclerView = ((RecyclerView) parent); | ||
| 93 | + startEditMode(recyclerView); | ||
| 94 | + } | ||
| 95 | + //手动调用ItemTouchHelper的startDrag方法启动拖拽。 | ||
| 96 | + mItemTouchHelper.startDrag(myHolder); | ||
| 97 | + return true; | ||
| 98 | + } | ||
| 99 | + }); | ||
| 100 | + //触摸事件 | ||
| 101 | + myHolder.convertView.setOnTouchListener(new View.OnTouchListener() { | ||
| 102 | + @Override | ||
| 103 | + public boolean onTouch(View v, MotionEvent event) { | ||
| 104 | + if (delView) { | ||
| 105 | + switch (MotionEventCompat.getActionMasked(event)) { | ||
| 106 | + case MotionEvent.ACTION_DOWN: | ||
| 107 | + startTime = System.currentTimeMillis(); | ||
| 108 | + break; | ||
| 109 | + case MotionEvent.ACTION_MOVE: | ||
| 110 | + /* | ||
| 111 | + * 当MOVE事件与DOWN事件的触发的间隔时间大于100ms时,则认为是拖拽starDrag, | ||
| 112 | + * 小于100ms不做任何处理,return false。 | ||
| 113 | + * 这样item的点击事件、RecyclerView的滚动事件都可以正常执行。 | ||
| 114 | + */ | ||
| 115 | + if (System.currentTimeMillis() - startTime > SPACE_TIME) { | ||
| 116 | + //手动调用ItemTouchHelper的startDrag方法启动拖拽。 | ||
| 117 | + mItemTouchHelper.startDrag(myHolder); | ||
| 118 | + } | ||
| 119 | + break; | ||
| 120 | + case MotionEvent.ACTION_CANCEL: | ||
| 121 | + case MotionEvent.ACTION_UP: | ||
| 122 | + startTime = 0; | ||
| 123 | + break; | ||
| 124 | + } | ||
| 125 | + | ||
| 126 | + } | ||
| 127 | + return false; | ||
| 128 | + } | ||
| 129 | + }); | ||
| 130 | + return myHolder; | ||
| 131 | + } | ||
| 132 | + | ||
| 133 | + /** | ||
| 134 | + * 开启编辑模式 | ||
| 135 | + */ | ||
| 136 | + private void startEditMode(RecyclerView parent) { | ||
| 137 | + startOrCancelEditMode(parent); | ||
| 138 | + } | ||
| 139 | + | ||
| 140 | + /** | ||
| 141 | + * 开启或者完成编辑模式 | ||
| 142 | + */ | ||
| 143 | + private void startOrCancelEditMode(RecyclerView parent) { | ||
| 144 | + int visibleChildCount = parent.getChildCount(); | ||
| 145 | + for (int i = 0; i < visibleChildCount; i++) { | ||
| 146 | + View view = parent.getChildAt(i); | ||
| 147 | + ImageView imgEdit = (ImageView) view.findViewById(R.id.del_imageView); | ||
| 148 | + if (imgEdit != null) { | ||
| 149 | + dealX(channelEntities.get(i),imgEdit); | ||
| 150 | + } | ||
| 151 | + } | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + @Override | ||
| 155 | + public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { | ||
| 156 | + ((ChannelViewHolder) holder).update(position); | ||
| 157 | + } | ||
| 158 | + | ||
| 159 | + | ||
| 160 | + public boolean togDelete() { | ||
| 161 | + if (delView) { | ||
| 162 | + delView = false; | ||
| 163 | + if (listener != null) { | ||
| 164 | + listener.diss(); | ||
| 165 | + } | ||
| 166 | + } else { | ||
| 167 | + delView = true; | ||
| 168 | + if (listener != null) { | ||
| 169 | + listener.show(); | ||
| 170 | + } | ||
| 171 | + } | ||
| 172 | + return delView; | ||
| 173 | + } | ||
| 174 | + | ||
| 175 | + @Override | ||
| 176 | + public int getItemCount() { | ||
| 177 | + return channelEntities.size(); | ||
| 178 | + } | ||
| 179 | + | ||
| 180 | + public void addOne(ChannelBean entity) { | ||
| 181 | + entity.myChannel = "1"; | ||
| 182 | + channelEntities.add(entity); | ||
| 183 | + notifyDataSetChanged(); | ||
| 184 | + } | ||
| 185 | + | ||
| 186 | + public void removeOne(ChannelBean entity) { | ||
| 187 | + entity.myChannel = "0"; | ||
| 188 | + channelEntities.remove(entity); | ||
| 189 | + notifyDataSetChanged(); | ||
| 190 | + } | ||
| 191 | + | ||
| 192 | + public boolean isDataEmpty(){ | ||
| 193 | + return ArrayUtils.isEmpty(channelEntities); | ||
| 194 | + } | ||
| 195 | + | ||
| 196 | + public class ChannelViewHolder extends RecyclerView.ViewHolder { | ||
| 197 | + View convertView; | ||
| 198 | + public ChannelBean channel; | ||
| 199 | + private TextView item_text; | ||
| 200 | + private ImageView del_imageView; | ||
| 201 | + | ||
| 202 | + public ChannelViewHolder(View itemView) { | ||
| 203 | + super(itemView); | ||
| 204 | + this.convertView = itemView; | ||
| 205 | + } | ||
| 206 | + | ||
| 207 | + public void update(int position) { | ||
| 208 | + item_text = convertView.findViewById(R.id.navigate_content_right); | ||
| 209 | + convertView.setTag(R.id.status_view,position); | ||
| 210 | + del_imageView = convertView.findViewById(R.id.del_imageView); | ||
| 211 | + del_imageView.setTag(R.id.status_view,position); | ||
| 212 | + channel = channelEntities.get(position); | ||
| 213 | + item_text.setText(channel.getName()); | ||
| 214 | + int strokeWidth = (int) context.getResources().getDimension(R.dimen.rmrb_dp0_5); | ||
| 215 | + if(strokeWidth < 1){ | ||
| 216 | + strokeWidth = 1; | ||
| 217 | + } | ||
| 218 | + | ||
| 219 | + int strokeColor = 0xFFEDEDED; | ||
| 220 | + if (SpUtils.isNightMode()){ | ||
| 221 | + strokeColor = 0xFF333333; | ||
| 222 | + } | ||
| 223 | + if (channel.getHeadlinesOn() == 1 || channel.getMovePermitted() == 0) {//不可删除不可排序 | ||
| 224 | + // 填充色 | ||
| 225 | + int fillColor = 0xFFF5F5F5; | ||
| 226 | + if (SpUtils.isNightMode()){ | ||
| 227 | + fillColor = 0xFF262626; | ||
| 228 | + } | ||
| 229 | + convertView.setBackground(FilletUtil.createRectangleDrawable(fillColor, strokeColor, strokeWidth, context.getResources().getDimension(R.dimen.rmrb_dp3))); | ||
| 230 | + item_text.setTextColor(ContextCompat.getColor(context, R.color.res_color_common_C3)); | ||
| 231 | + convertView.setEnabled(true); | ||
| 232 | + convertView.setLongClickable(false); | ||
| 233 | + } else if (channel.getDelPermitted() == 0) {//不可删除,可排序 | ||
| 234 | + int fillColor = 0xFFFFFFFF; | ||
| 235 | + if (SpUtils.isNightMode()){ | ||
| 236 | + fillColor = 0xFF1D1D1D; | ||
| 237 | + } | ||
| 238 | + convertView.setBackground(FilletUtil.createRectangleDrawable(fillColor, strokeColor, strokeWidth, context.getResources().getDimension(R.dimen.rmrb_dp3))); | ||
| 239 | + convertView.setEnabled(true); | ||
| 240 | + item_text.setTextColor(ContextCompat.getColor(context, R.color.res_color_common_C1)); | ||
| 241 | + convertView.setLongClickable(true); | ||
| 242 | + } else {//可删除,可排序 | ||
| 243 | + int fillColor = 0xFFFFFFFF; | ||
| 244 | + if (SpUtils.isNightMode()){ | ||
| 245 | + fillColor = 0xFF1D1D1D; | ||
| 246 | + } | ||
| 247 | + convertView.setBackground(FilletUtil.createRectangleDrawable(fillColor, strokeColor, strokeWidth, context.getResources().getDimension(R.dimen.rmrb_dp3))); | ||
| 248 | + convertView.setEnabled(true); | ||
| 249 | + item_text.setTextColor(ContextCompat.getColor(context, R.color.res_color_common_C1)); | ||
| 250 | + convertView.setLongClickable(true); | ||
| 251 | + } | ||
| 252 | + | ||
| 253 | + dealX(channel,del_imageView); | ||
| 254 | + } | ||
| 255 | + } | ||
| 256 | + | ||
| 257 | + private void dealX(ChannelBean channel,ImageView del_imageView) { | ||
| 258 | + //非头条、允许移动移动、可删除才展示X | ||
| 259 | + if (delView && channel.getHeadlinesOn() != 1 && channel.getMovePermitted() != 0 && channel.getDelPermitted() != 0) { | ||
| 260 | + del_imageView.setVisibility(View.VISIBLE); | ||
| 261 | + del_imageView.setOnClickListener(v -> { | ||
| 262 | + int p = (int) v.getTag(R.id.status_view); | ||
| 263 | + if (ArrayUtils.listHasItem(p, channelEntities)) { | ||
| 264 | + onItemClickListener.onItemClick(v, channelEntities.get(p)); | ||
| 265 | + } | ||
| 266 | + }); | ||
| 267 | + } else { | ||
| 268 | + del_imageView.setVisibility(View.GONE); | ||
| 269 | + } | ||
| 270 | + } | ||
| 271 | + | ||
| 272 | + private OnChannelEditListener listener; | ||
| 273 | + | ||
| 274 | + public void setOnChannelEditListener(OnChannelEditListener listener) { | ||
| 275 | + this.listener = listener; | ||
| 276 | + } | ||
| 277 | + | ||
| 278 | + public interface OnChannelEditListener { | ||
| 279 | + void show(); | ||
| 280 | + | ||
| 281 | + void diss(); | ||
| 282 | + } | ||
| 283 | +} |
| 1 | +package com.wd.module_home.adapter; | ||
| 2 | + | ||
| 3 | +import android.content.Context; | ||
| 4 | +import android.view.LayoutInflater; | ||
| 5 | +import android.view.View; | ||
| 6 | +import android.view.ViewGroup; | ||
| 7 | +import android.widget.BaseAdapter; | ||
| 8 | +import android.widget.TextView; | ||
| 9 | + | ||
| 10 | +import com.people.room.entity.ChannelBean; | ||
| 11 | +import com.wd.foundation.wdkit.utils.FilletUtil; | ||
| 12 | +import com.wd.foundation.wdkit.utils.SpUtils; | ||
| 13 | +import com.wd.foundation.wdkitcore.tools.ArrayUtils; | ||
| 14 | +import com.wd.module_home.R; | ||
| 15 | +import com.wd.module_home.util.MyGeneraItemClickListener; | ||
| 16 | + | ||
| 17 | +import java.util.ArrayList; | ||
| 18 | +import java.util.List; | ||
| 19 | + | ||
| 20 | +public class ActNewChannelNormalAdapter extends BaseAdapter { | ||
| 21 | + | ||
| 22 | + private Context context; | ||
| 23 | + public List<ChannelBean> channelList = new ArrayList<>(); | ||
| 24 | + private TextView item_text; | ||
| 25 | + | ||
| 26 | + private MyGeneraItemClickListener onItemClickListener; | ||
| 27 | + | ||
| 28 | + public ActNewChannelNormalAdapter(Context context, MyGeneraItemClickListener onItemClickListener) { | ||
| 29 | + this.onItemClickListener = onItemClickListener; | ||
| 30 | + this.context = context; | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + @Override | ||
| 34 | + public int getCount() { | ||
| 35 | + return channelList.size(); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + @Override | ||
| 39 | + public long getItemId(int position) { | ||
| 40 | + return position; | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + @Override | ||
| 44 | + public View getView(final int position, View convertView, ViewGroup parent) { | ||
| 45 | + View view = LayoutInflater.from(context).inflate(R.layout.subscribe_category_item, parent, false); | ||
| 46 | + int strokeWidth = (int) context.getResources().getDimension(R.dimen.rmrb_dp0_5); | ||
| 47 | + if (strokeWidth < 1) { | ||
| 48 | + strokeWidth = 1; | ||
| 49 | + } | ||
| 50 | + int fillColor = 0xFFFFFFFF; | ||
| 51 | + int strokeColor = 0xFFEDEDED; | ||
| 52 | + if (SpUtils.isNightMode()) { | ||
| 53 | + fillColor = 0xFF1D1D1D; | ||
| 54 | + strokeColor = 0xFF333333; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + view.setBackground(FilletUtil.createRectangleDrawable(fillColor, strokeColor, strokeWidth, context.getResources().getDimension(R.dimen.rmrb_dp3))); | ||
| 58 | + item_text = view.findViewById(R.id.text_item); | ||
| 59 | + ChannelBean channel = channelList.get(position); | ||
| 60 | + item_text.setText(channel.getName()); | ||
| 61 | + view.setOnClickListener(v -> { | ||
| 62 | + try { | ||
| 63 | + if (onItemClickListener != null) { | ||
| 64 | + if (position < channelList.size()) { | ||
| 65 | + onItemClickListener.onItemClick(v, channelList.get(position)); | ||
| 66 | + } | ||
| 67 | + } | ||
| 68 | + } catch (Exception e) { | ||
| 69 | +// ThrowableHelper.printStackTrace(null, e); | ||
| 70 | + } | ||
| 71 | + }); | ||
| 72 | + return view; | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + @Override | ||
| 76 | + public Object getItem(int position) { | ||
| 77 | + return null; | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + /** | ||
| 81 | + * 获取频道列表 | ||
| 82 | + */ | ||
| 83 | + public List<ChannelBean> getChannelList() { | ||
| 84 | + return channelList; | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + /** | ||
| 88 | + * 添加频道列表 | ||
| 89 | + */ | ||
| 90 | + public void addItem(ChannelBean channel) { | ||
| 91 | + channelList.add(0, channel); | ||
| 92 | + notifyDataSetChanged(); | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + /** | ||
| 96 | + * 删除一项 | ||
| 97 | + */ | ||
| 98 | + public void removeItem(ChannelBean channel) { | ||
| 99 | + channelList.remove(channel); | ||
| 100 | + notifyDataSetChanged(); | ||
| 101 | + } | ||
| 102 | + | ||
| 103 | + /** | ||
| 104 | + * 设置频道列表 | ||
| 105 | + */ | ||
| 106 | + public void setData(List<ChannelBean> list) { | ||
| 107 | + channelList = list; | ||
| 108 | + notifyDataSetChanged(); | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + public boolean isDataEmpty() { | ||
| 112 | + return ArrayUtils.isEmpty(channelList); | ||
| 113 | + } | ||
| 114 | +} |
| 1 | +package com.wd.module_home.util; | ||
| 2 | + | ||
| 3 | +/** | ||
| 4 | + * Interface to listen move in ItemTouchHelper.Callback | ||
| 5 | + * Created by Alessandro on 15/01/2016. | ||
| 6 | + */ | ||
| 7 | +public interface CallbackItemTouch { | ||
| 8 | + /** | ||
| 9 | + * Called when an item has been dragged | ||
| 10 | + * | ||
| 11 | + * @param oldPosition start position | ||
| 12 | + * @param newPosition end position | ||
| 13 | + */ | ||
| 14 | + boolean itemTouchOnMove(int oldPosition, int newPosition); | ||
| 15 | + | ||
| 16 | + /** | ||
| 17 | + * 停止拖动 | ||
| 18 | + */ | ||
| 19 | + void stopDrag(); | ||
| 20 | +} |
| 1 | +package com.wd.module_home.util; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import androidx.annotation.NonNull; | ||
| 5 | +import androidx.recyclerview.widget.GridLayoutManager; | ||
| 6 | +import androidx.recyclerview.widget.ItemTouchHelper; | ||
| 7 | +import androidx.recyclerview.widget.RecyclerView; | ||
| 8 | +import androidx.recyclerview.widget.StaggeredGridLayoutManager; | ||
| 9 | + | ||
| 10 | + | ||
| 11 | +import com.wd.module_home.adapter.ActNewChannelAdapter; | ||
| 12 | + | ||
| 13 | +import org.jetbrains.annotations.NotNull; | ||
| 14 | + | ||
| 15 | +/** | ||
| 16 | + * Created by Alessandro on 12/01/2016. | ||
| 17 | + */ | ||
| 18 | +public class MyItemTouchHelperCallback extends ItemTouchHelper.Callback { | ||
| 19 | + private CallbackItemTouch callbackItemTouch; // interface | ||
| 20 | + | ||
| 21 | + | ||
| 22 | + | ||
| 23 | + @Override | ||
| 24 | + public boolean isLongPressDragEnabled() { | ||
| 25 | + return false; | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + @Override | ||
| 29 | + public boolean isItemViewSwipeEnabled() { | ||
| 30 | + return false; // swiped disabled | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + @Override | ||
| 34 | + public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) { | ||
| 35 | + int dragFlags; | ||
| 36 | + RecyclerView.LayoutManager manager = recyclerView.getLayoutManager(); | ||
| 37 | + if (manager instanceof GridLayoutManager || manager instanceof StaggeredGridLayoutManager) { | ||
| 38 | + dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN | ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT; | ||
| 39 | + } else { | ||
| 40 | + dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN; | ||
| 41 | + } | ||
| 42 | + // 如果想支持滑动(删除)操作, swipeFlags = ItemTouchHelper.START | ItemTouchHelper.END | ||
| 43 | + int swipeFlags = 0; | ||
| 44 | + if (viewHolder instanceof ActNewChannelAdapter.ChannelViewHolder) { | ||
| 45 | + ActNewChannelAdapter.ChannelViewHolder channelViewHolder = (ActNewChannelAdapter.ChannelViewHolder) viewHolder; | ||
| 46 | + if (channelViewHolder.channel.getHeadlinesOn() == 1 || channelViewHolder.channel.getMovePermitted() == 0) { | ||
| 47 | + //设置不可拖动 https://github.com/CymChad/BaseRecyclerViewAdapterHelper/issues/370 | ||
| 48 | + return makeMovementFlags(0, 0); | ||
| 49 | + } | ||
| 50 | + } | ||
| 51 | + return makeMovementFlags(dragFlags, swipeFlags); | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + | ||
| 55 | + @Override | ||
| 56 | + public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) { | ||
| 57 | + return callbackItemTouch.itemTouchOnMove(viewHolder.getAdapterPosition(), target.getAdapterPosition()); // information to the interface | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + public MyItemTouchHelperCallback(CallbackItemTouch callbackItemTouch) { | ||
| 61 | + this.callbackItemTouch = callbackItemTouch; | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + | ||
| 65 | + | ||
| 66 | + | ||
| 67 | + | ||
| 68 | + | ||
| 69 | + @Override | ||
| 70 | + public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) { | ||
| 71 | + // swiped disabled | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + @Override | ||
| 75 | + public void clearView(@NonNull @NotNull RecyclerView recyclerView, @NonNull @NotNull RecyclerView.ViewHolder viewHolder) { | ||
| 76 | + super.clearView(recyclerView, viewHolder); | ||
| 77 | + | ||
| 78 | + callbackItemTouch.stopDrag(); | ||
| 79 | + } | ||
| 80 | +} |
492 Bytes
575 Bytes
739 Bytes
753 Bytes
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 4 | + android:layout_width="match_parent" | ||
| 5 | + android:layout_height="match_parent" | ||
| 6 | + android:background="@color/res_color_common_C8" | ||
| 7 | + android:paddingLeft="@dimen/rmrb_dp16" | ||
| 8 | + android:paddingRight="@dimen/rmrb_dp16"> | ||
| 9 | + | ||
| 10 | + <ImageView | ||
| 11 | + android:id="@+id/iv_rmrb_1" | ||
| 12 | + android:layout_width="@dimen/rmrb_dp72" | ||
| 13 | + android:layout_height="@dimen/rmrb_dp29" | ||
| 14 | + android:scaleType="fitXY" | ||
| 15 | + android:src="@drawable/channeldrawer_logo" /> | ||
| 16 | + | ||
| 17 | + | ||
| 18 | + <FrameLayout | ||
| 19 | + android:id="@+id/flClose" | ||
| 20 | + android:layout_width="wrap_content" | ||
| 21 | + android:layout_height="wrap_content" | ||
| 22 | + android:layout_alignTop="@+id/iv_rmrb_1" | ||
| 23 | + android:layout_alignBottom="@+id/iv_rmrb_1" | ||
| 24 | + android:layout_alignParentRight="true"> | ||
| 25 | + | ||
| 26 | + <ImageView | ||
| 27 | + android:layout_width="@dimen/rmrb_dp24" | ||
| 28 | + android:layout_height="@dimen/rmrb_dp24" | ||
| 29 | + android:layout_gravity="center_vertical" | ||
| 30 | + android:scaleType="fitXY" | ||
| 31 | + android:src="@mipmap/icon_channel_close" /> | ||
| 32 | + </FrameLayout> | ||
| 33 | + | ||
| 34 | + <com.scwang.smart.refresh.layout.SmartRefreshLayout | ||
| 35 | + android:layout_width="match_parent" | ||
| 36 | + android:layout_height="match_parent" | ||
| 37 | + android:layout_below="@+id/iv_rmrb_1" | ||
| 38 | + android:layout_marginTop="@dimen/rmrb_dp11" | ||
| 39 | + app:srlEnablePureScrollMode="true"> | ||
| 40 | + | ||
| 41 | + <androidx.core.widget.NestedScrollView | ||
| 42 | + android:layout_width="match_parent" | ||
| 43 | + android:layout_height="match_parent"> | ||
| 44 | + | ||
| 45 | + <androidx.appcompat.widget.LinearLayoutCompat | ||
| 46 | + android:layout_width="match_parent" | ||
| 47 | + android:layout_height="wrap_content" | ||
| 48 | + android:layout_marginTop="@dimen/rmrb_dp21" | ||
| 49 | + android:orientation="vertical"> | ||
| 50 | + | ||
| 51 | + <androidx.constraintlayout.widget.ConstraintLayout | ||
| 52 | + android:id="@+id/clHomeSet" | ||
| 53 | + android:layout_width="match_parent" | ||
| 54 | + android:layout_marginBottom="@dimen/rmrb_dp36" | ||
| 55 | + android:layout_height="wrap_content"> | ||
| 56 | + | ||
| 57 | + <TextView | ||
| 58 | + android:id="@+id/tvhomeset" | ||
| 59 | + android:layout_width="wrap_content" | ||
| 60 | + android:layout_height="wrap_content" | ||
| 61 | + android:text="@string/navigation_bar_home_set" | ||
| 62 | + android:textColor="@color/res_color_common_C1" | ||
| 63 | + android:textSize="@dimen/rmrb_dp16" | ||
| 64 | + android:textStyle="bold" | ||
| 65 | + app:layout_constraintLeft_toLeftOf="parent" | ||
| 66 | + app:layout_constraintTop_toTopOf="parent" /> | ||
| 67 | + | ||
| 68 | + <TextView | ||
| 69 | + android:id="@+id/tvhomesettip" | ||
| 70 | + android:layout_width="wrap_content" | ||
| 71 | + android:layout_height="wrap_content" | ||
| 72 | + android:layout_marginLeft="@dimen/rmrb_dp4" | ||
| 73 | + android:ellipsize="end" | ||
| 74 | + android:maxLines="1" | ||
| 75 | + android:text="@string/navigation_bar_home_set_msg" | ||
| 76 | + android:textColor="@color/res_color_common_C1_80" | ||
| 77 | + android:textSize="@dimen/rmrb_dp12" | ||
| 78 | + app:layout_constraintBottom_toBottomOf="@id/tvhomeset" | ||
| 79 | + app:layout_constraintLeft_toRightOf="@id/tvhomeset" | ||
| 80 | + app:layout_constraintTop_toTopOf="@id/tvhomeset" /> | ||
| 81 | + | ||
| 82 | + <ImageView | ||
| 83 | + android:id="@+id/iv_channel_recommend_btn" | ||
| 84 | + android:layout_width="0dp" | ||
| 85 | + android:layout_height="@dimen/rmrb_dp36" | ||
| 86 | + android:layout_marginTop="@dimen/rmrb_dp16" | ||
| 87 | + android:scaleType="fitXY" | ||
| 88 | + app:layout_constraintHorizontal_weight="1" | ||
| 89 | + app:layout_constraintLeft_toLeftOf="parent" | ||
| 90 | + app:layout_constraintRight_toLeftOf="@+id/iv_channel_hot_btn" | ||
| 91 | + app:layout_constraintTop_toBottomOf="@id/tvhomeset" /> | ||
| 92 | + | ||
| 93 | + <TextView | ||
| 94 | + android:id="@+id/tv_channel_recommend_btn" | ||
| 95 | + android:layout_width="wrap_content" | ||
| 96 | + android:layout_height="wrap_content" | ||
| 97 | + android:drawablePadding="@dimen/rmrb_dp4" | ||
| 98 | + android:ellipsize="end" | ||
| 99 | + android:gravity="center" | ||
| 100 | + android:maxLines="1" | ||
| 101 | + android:textColor="@color/res_color_common_C8_keep" | ||
| 102 | + android:textSize="@dimen/rmrb_dp16" | ||
| 103 | + app:autoSizeMaxTextSize="@dimen/rmrb_dp16" | ||
| 104 | + app:autoSizeMinTextSize="@dimen/rmrb_dp10" | ||
| 105 | + app:autoSizeTextType="uniform" | ||
| 106 | + app:layout_constraintBottom_toBottomOf="@+id/iv_channel_recommend_btn" | ||
| 107 | + app:layout_constraintLeft_toLeftOf="@+id/iv_channel_recommend_btn" | ||
| 108 | + app:layout_constraintRight_toRightOf="@+id/iv_channel_recommend_btn" | ||
| 109 | + app:layout_constraintTop_toTopOf="@+id/iv_channel_recommend_btn" /> | ||
| 110 | + | ||
| 111 | + <ImageView | ||
| 112 | + android:id="@+id/iv_channel_hot_btn" | ||
| 113 | + android:layout_width="0dp" | ||
| 114 | + android:layout_height="@dimen/rmrb_dp36" | ||
| 115 | + android:layout_marginTop="@dimen/rmrb_dp16" | ||
| 116 | + android:scaleType="fitXY" | ||
| 117 | + app:layout_constraintHorizontal_weight="1" | ||
| 118 | + app:layout_constraintLeft_toRightOf="@+id/iv_channel_recommend_btn" | ||
| 119 | + app:layout_constraintRight_toRightOf="parent" | ||
| 120 | + app:layout_constraintTop_toBottomOf="@id/tvhomeset" /> | ||
| 121 | + | ||
| 122 | + | ||
| 123 | + <TextView | ||
| 124 | + android:id="@+id/tv_channel_hot_btn" | ||
| 125 | + android:layout_width="wrap_content" | ||
| 126 | + android:layout_height="wrap_content" | ||
| 127 | + android:ellipsize="end" | ||
| 128 | + android:maxLines="1" | ||
| 129 | + android:textColor="@color/res_color_general_DB0000" | ||
| 130 | + android:textSize="@dimen/rmrb_dp16" | ||
| 131 | + app:autoSizeMaxTextSize="@dimen/rmrb_dp16" | ||
| 132 | + app:autoSizeMinTextSize="@dimen/rmrb_dp10" | ||
| 133 | + app:autoSizeTextType="uniform" | ||
| 134 | + app:layout_constraintBottom_toBottomOf="@+id/iv_channel_hot_btn" | ||
| 135 | + app:layout_constraintLeft_toLeftOf="@+id/iv_channel_hot_btn" | ||
| 136 | + app:layout_constraintRight_toRightOf="@+id/iv_channel_hot_btn" | ||
| 137 | + app:layout_constraintTop_toTopOf="@+id/iv_channel_hot_btn" /> | ||
| 138 | + </androidx.constraintlayout.widget.ConstraintLayout> | ||
| 139 | + | ||
| 140 | + <androidx.appcompat.widget.LinearLayoutCompat | ||
| 141 | + android:layout_width="match_parent" | ||
| 142 | + android:layout_height="wrap_content" | ||
| 143 | + android:gravity="center_vertical" | ||
| 144 | + android:orientation="horizontal"> | ||
| 145 | + | ||
| 146 | + <TextView | ||
| 147 | + android:id="@+id/tv_my_channel" | ||
| 148 | + android:layout_width="match_parent" | ||
| 149 | + android:layout_height="wrap_content" | ||
| 150 | + android:layout_weight="1" | ||
| 151 | + android:text="@string/navigation_bar_my_channel" | ||
| 152 | + android:textColor="@color/res_color_common_C1" | ||
| 153 | + android:textSize="@dimen/rmrb_dp16" | ||
| 154 | + android:textStyle="bold" /> | ||
| 155 | + | ||
| 156 | + <TextView | ||
| 157 | + android:id="@+id/tv_edit_channel" | ||
| 158 | + android:layout_width="wrap_content" | ||
| 159 | + android:layout_height="wrap_content" | ||
| 160 | + android:layout_centerVertical="true" | ||
| 161 | + android:paddingLeft="@dimen/rmrb_dp4" | ||
| 162 | + android:paddingRight="@dimen/rmrb_dp4" | ||
| 163 | + android:text="@string/navigation_bar_edit" | ||
| 164 | + android:textColor="@color/res_color_common_C11" | ||
| 165 | + android:textSize="@dimen/rmrb_dp14" /> | ||
| 166 | + | ||
| 167 | + </androidx.appcompat.widget.LinearLayoutCompat> | ||
| 168 | + | ||
| 169 | + | ||
| 170 | + <androidx.recyclerview.widget.RecyclerView | ||
| 171 | + android:id="@+id/act_new_channel_recyclerView" | ||
| 172 | + android:layout_width="match_parent" | ||
| 173 | + android:layout_height="wrap_content" | ||
| 174 | + android:layout_marginTop="@dimen/rmrb_dp12" | ||
| 175 | + android:clipChildren="false" | ||
| 176 | + android:clipToPadding="false" | ||
| 177 | + app:layout_constraintTop_toBottomOf="@id/tv_my_channel" /> | ||
| 178 | + | ||
| 179 | + <TextView | ||
| 180 | + android:id="@+id/act_channel_cat" | ||
| 181 | + android:layout_width="wrap_content" | ||
| 182 | + android:layout_height="wrap_content" | ||
| 183 | + android:layout_marginTop="@dimen/rmrb_dp28" | ||
| 184 | + android:text="@string/navigation_bar_more_channel" | ||
| 185 | + android:textColor="@color/res_color_common_C1" | ||
| 186 | + android:textSize="@dimen/rmrb_dp16" | ||
| 187 | + android:textStyle="bold" | ||
| 188 | + app:layout_constraintLeft_toLeftOf="parent" | ||
| 189 | + app:layout_constraintTop_toBottomOf="@id/act_new_channel_recyclerView" /> | ||
| 190 | + | ||
| 191 | + <com.wd.common.widget.OtherGridView | ||
| 192 | + android:id="@+id/act_channel_local_grid2" | ||
| 193 | + android:layout_width="match_parent" | ||
| 194 | + android:layout_height="match_parent" | ||
| 195 | + android:layout_marginTop="@dimen/rmrb_dp12" | ||
| 196 | + android:horizontalSpacing="@dimen/rmrb_dp8" | ||
| 197 | + android:listSelector="@android:color/transparent" | ||
| 198 | + android:numColumns="4" | ||
| 199 | + android:verticalSpacing="@dimen/rmrb_dp8" | ||
| 200 | + android:visibility="visible" | ||
| 201 | + app:layout_constraintTop_toBottomOf="@id/act_channel_cat" /> | ||
| 202 | + | ||
| 203 | + <TextView | ||
| 204 | + android:id="@+id/act_channel_local" | ||
| 205 | + android:layout_width="wrap_content" | ||
| 206 | + android:layout_height="wrap_content" | ||
| 207 | + android:layout_marginTop="@dimen/rmrb_dp28" | ||
| 208 | + android:text="@string/navigation_bar_city_channel" | ||
| 209 | + android:textColor="@color/res_color_common_C1" | ||
| 210 | + android:textSize="@dimen/rmrb_dp16" | ||
| 211 | + android:textStyle="bold" | ||
| 212 | + app:layout_constraintLeft_toLeftOf="parent" | ||
| 213 | + app:layout_constraintTop_toBottomOf="@id/act_channel_local_grid2" /> | ||
| 214 | + | ||
| 215 | + <com.wd.common.widget.OtherGridView | ||
| 216 | + android:id="@+id/act_channel_local_grid" | ||
| 217 | + android:layout_width="match_parent" | ||
| 218 | + android:layout_height="match_parent" | ||
| 219 | + android:layout_marginTop="@dimen/rmrb_dp12" | ||
| 220 | + android:horizontalSpacing="@dimen/rmrb_dp8" | ||
| 221 | + android:listSelector="@android:color/transparent" | ||
| 222 | + android:numColumns="4" | ||
| 223 | + android:verticalSpacing="@dimen/rmrb_dp8" | ||
| 224 | + app:layout_constraintTop_toBottomOf="@id/act_channel_local" /> | ||
| 225 | + | ||
| 226 | + <View | ||
| 227 | + android:layout_width="match_parent" | ||
| 228 | + android:layout_height="@dimen/rmrb_dp28" | ||
| 229 | + app:layout_constraintTop_toBottomOf="@id/act_channel_local_grid" /> | ||
| 230 | + </androidx.appcompat.widget.LinearLayoutCompat> | ||
| 231 | + </androidx.core.widget.NestedScrollView> | ||
| 232 | + </com.scwang.smart.refresh.layout.SmartRefreshLayout> | ||
| 233 | +</RelativeLayout> |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 4 | + android:layout_width="match_parent" | ||
| 5 | + android:layout_height="@dimen/rmrb_dp40" | ||
| 6 | + android:clipChildren="false" | ||
| 7 | + android:clipToPadding="false" | ||
| 8 | + android:gravity="center"> | ||
| 9 | + | ||
| 10 | + <TextView | ||
| 11 | + android:id="@+id/navigate_content_right" | ||
| 12 | + android:layout_width="wrap_content" | ||
| 13 | + android:layout_height="match_parent" | ||
| 14 | + android:ellipsize="end" | ||
| 15 | + android:gravity="center" | ||
| 16 | + android:maxLines="1" | ||
| 17 | + android:textColor="@color/res_color_common_C1" | ||
| 18 | + android:textSize="@dimen/rmrb_dp14" | ||
| 19 | + app:autoSizeMaxTextSize="@dimen/rmrb_dp14" | ||
| 20 | + app:autoSizeMinTextSize="@dimen/rmrb_dp10" | ||
| 21 | + app:autoSizeTextType="uniform" | ||
| 22 | + app:layout_constraintLeft_toLeftOf="parent" /> | ||
| 23 | + | ||
| 24 | + <ImageView | ||
| 25 | + android:id="@+id/del_imageView" | ||
| 26 | + android:layout_width="@dimen/rmrb_dp12" | ||
| 27 | + android:layout_height="@dimen/rmrb_dp12" | ||
| 28 | + android:layout_centerVertical="true" | ||
| 29 | + android:layout_marginLeft="@dimen/rmrb_dp1" | ||
| 30 | + android:layout_toRightOf="@id/navigate_content_right" | ||
| 31 | + android:background="@drawable/channeldrawer_x" | ||
| 32 | + android:clipChildren="false" | ||
| 33 | + android:clipToPadding="false" | ||
| 34 | + app:layout_constraintBottom_toBottomOf="parent" | ||
| 35 | + app:layout_constraintLeft_toRightOf="@id/navigate_content_right" | ||
| 36 | + app:layout_constraintTop_toTopOf="parent" /> | ||
| 37 | + | ||
| 38 | +</RelativeLayout> |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 4 | + android:id="@+id/rl_subscribe" | ||
| 5 | + android:layout_width="match_parent" | ||
| 6 | + android:layout_height="@dimen/rmrb_dp40" | ||
| 7 | + android:gravity="center"> | ||
| 8 | + | ||
| 9 | + <androidx.appcompat.widget.AppCompatTextView | ||
| 10 | + android:id="@+id/text_item" | ||
| 11 | + android:layout_width="wrap_content" | ||
| 12 | + android:layout_height="match_parent" | ||
| 13 | + android:layout_centerInParent="true" | ||
| 14 | + android:ellipsize="end" | ||
| 15 | + android:gravity="center" | ||
| 16 | + android:maxLines="1" | ||
| 17 | + android:textColor="@color/res_color_common_C1" | ||
| 18 | + android:textSize="@dimen/rmrb_dp14" | ||
| 19 | + app:autoSizeMaxTextSize="@dimen/rmrb_dp14" | ||
| 20 | + app:autoSizeMinTextSize="@dimen/rmrb_dp10" | ||
| 21 | + app:autoSizeTextType="uniform" /> | ||
| 22 | + | ||
| 23 | + <ImageView | ||
| 24 | + android:layout_width="@dimen/rmrb_dp12" | ||
| 25 | + android:layout_height="@dimen/rmrb_dp12" | ||
| 26 | + android:layout_centerVertical="true" | ||
| 27 | + android:layout_marginLeft="@dimen/rmrb_dp1" | ||
| 28 | + android:layout_toRightOf="@id/text_item" | ||
| 29 | + android:background="@drawable/channeldrawer_add" | ||
| 30 | + android:clipChildren="false" | ||
| 31 | + android:clipToPadding="false" /> | ||
| 32 | +</RelativeLayout> |
| @@ -74,4 +74,13 @@ | @@ -74,4 +74,13 @@ | ||
| 74 | <string name="termsofuse">《用户协议》</string> | 74 | <string name="termsofuse">《用户协议》</string> |
| 75 | <string name="privacypolicy">《隐私政策》</string> | 75 | <string name="privacypolicy">《隐私政策》</string> |
| 76 | 76 | ||
| 77 | + <!--导航编辑页面--> | ||
| 78 | + <string name="navigation_bar_home_set">首页设置</string> | ||
| 79 | + <string name="navigation_bar_home_set_msg">将指定频道设置为首页</string> | ||
| 80 | + <string name="navigation_bar_my_channel">我的频道</string> | ||
| 81 | + <string name="navigation_bar_more_channel">更多频道</string> | ||
| 82 | + <string name="navigation_bar_city_channel">地方频道</string> | ||
| 83 | + | ||
| 84 | + <string name="navigation_bar_edit">编辑</string> | ||
| 85 | + <string name="navigation_bar_finish">完成</string> | ||
| 77 | </resources> | 86 | </resources> |
| @@ -50,8 +50,6 @@ android { | @@ -50,8 +50,6 @@ android { | ||
| 50 | dependencies { | 50 | dependencies { |
| 51 | implementation 'com.alibaba:fastjson:1.2.62' | 51 | implementation 'com.alibaba:fastjson:1.2.62' |
| 52 | implementation 'androidx.annotation:annotation:1.1.0' | 52 | implementation 'androidx.annotation:annotation:1.1.0' |
| 53 | -// //依赖数据库module 里面的数据bean | ||
| 54 | -// api project(path: ':lib_room') | ||
| 55 | implementation project(':wdkitcore') | 53 | implementation project(':wdkitcore') |
| 56 | } | 54 | } |
| 57 | 55 |
| 1 | package com.wd.foundation.wdinterface.comp | 1 | package com.wd.foundation.wdinterface.comp |
| 2 | 2 | ||
| 3 | +import android.view.View | ||
| 4 | +import androidx.fragment.app.Fragment | ||
| 3 | import com.alibaba.android.arouter.facade.template.IProvider | 5 | import com.alibaba.android.arouter.facade.template.IProvider |
| 4 | import com.wd.foundation.bean.custom.comp.CompBean | 6 | import com.wd.foundation.bean.custom.comp.CompBean |
| 5 | import com.wd.foundation.bean.custom.content.ContentBean | 7 | import com.wd.foundation.bean.custom.content.ContentBean |
| @@ -29,4 +31,12 @@ interface IProcess : IProvider { | @@ -29,4 +31,12 @@ interface IProcess : IProvider { | ||
| 29 | fun getShortVideoPath() : String | 31 | fun getShortVideoPath() : String |
| 30 | 32 | ||
| 31 | fun getHomeFullPlayPath() : String | 33 | fun getHomeFullPlayPath() : String |
| 34 | + | ||
| 35 | + fun goToPaperActivity() | ||
| 36 | + | ||
| 37 | + fun goToCommonSubjectPage(llRight: View) | ||
| 38 | + | ||
| 39 | + fun toSearchActivity(marqueePosition: Int, Title: String) | ||
| 40 | + | ||
| 41 | + fun goToNavBarActivity(fragment: Fragment, tabId: String) | ||
| 32 | } | 42 | } |
| 1 | package com.wd.foundation.wdinterfaceimpl.comp; | 1 | package com.wd.foundation.wdinterfaceimpl.comp; |
| 2 | 2 | ||
| 3 | import android.content.Context; | 3 | import android.content.Context; |
| 4 | +import android.view.View; | ||
| 4 | 5 | ||
| 5 | import androidx.annotation.NonNull; | 6 | import androidx.annotation.NonNull; |
| 7 | +import androidx.fragment.app.Fragment; | ||
| 6 | 8 | ||
| 7 | import com.alibaba.android.arouter.facade.annotation.Route; | 9 | import com.alibaba.android.arouter.facade.annotation.Route; |
| 10 | +import com.wd.capability.layout.fragment.NewsHomeFragment; | ||
| 8 | import com.wd.common.constant.RouterConstants; | 11 | import com.wd.common.constant.RouterConstants; |
| 12 | +import com.wd.common.listener.ResultCallback; | ||
| 13 | +import com.wd.common.utils.CommonNetUtils; | ||
| 9 | import com.wd.common.utils.ProcessUtils; | 14 | import com.wd.common.utils.ProcessUtils; |
| 10 | import com.wd.foundation.bean.custom.comp.CompBean; | 15 | import com.wd.foundation.bean.custom.comp.CompBean; |
| 16 | +import com.wd.foundation.bean.custom.comp.PageBean; | ||
| 11 | import com.wd.foundation.bean.custom.content.ContentBean; | 17 | import com.wd.foundation.bean.custom.content.ContentBean; |
| 18 | +import com.wd.foundation.bean.custom.content.ContentTypeConstant; | ||
| 12 | import com.wd.foundation.bean.response.ChannelBean; | 19 | import com.wd.foundation.bean.response.ChannelBean; |
| 13 | import com.wd.foundation.wdinterface.comp.IProcess; | 20 | import com.wd.foundation.wdinterface.comp.IProcess; |
| 14 | import com.wd.foundation.wdinterface.constant.InterfaceConstant; | 21 | import com.wd.foundation.wdinterface.constant.InterfaceConstant; |
| 22 | +import com.wd.foundation.wdkit.utils.ToastNightUtil; | ||
| 23 | + | ||
| 24 | +import java.util.List; | ||
| 15 | 25 | ||
| 16 | /** | 26 | /** |
| 17 | * @author wangkai | 27 | * @author wangkai |
| @@ -72,4 +82,62 @@ public class ProcessImpl implements IProcess { | @@ -72,4 +82,62 @@ public class ProcessImpl implements IProcess { | ||
| 72 | public String getHomeFullPlayPath() { | 82 | public String getHomeFullPlayPath() { |
| 73 | return RouterConstants.PATH_HOME_FULL_PLAY; | 83 | return RouterConstants.PATH_HOME_FULL_PLAY; |
| 74 | } | 84 | } |
| 85 | + | ||
| 86 | + @Override | ||
| 87 | + public void goToPaperActivity() { | ||
| 88 | + ProcessUtils.goToPaperActivity(); | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + @Override | ||
| 92 | + public void goToCommonSubjectPage(View llRight) { | ||
| 93 | + CommonNetUtils.getInstance().getDailyPaperId(new ResultCallback<PageBean>() { | ||
| 94 | + @Override | ||
| 95 | + public void onSuccess(PageBean pageBean) { | ||
| 96 | + if (pageBean != null) { | ||
| 97 | + ContentBean bean = new ContentBean(); | ||
| 98 | + bean.setObjectLevel(String.valueOf(ContentTypeConstant.SUBJECT_TOPICTYPE_25)); | ||
| 99 | + bean.setPageId(pageBean.getId()); | ||
| 100 | + bean.setNewsTitle(pageBean.getName()); | ||
| 101 | + ProcessUtils.goToCommonSubjectPage(bean); | ||
| 102 | + | ||
| 103 | + } else { | ||
| 104 | + ToastNightUtil.showShort("暂无数据"); | ||
| 105 | + } | ||
| 106 | + llRight.setClickable(true); | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + @Override | ||
| 110 | + public void onError(String errorCode) { | ||
| 111 | + llRight.setClickable(true); | ||
| 112 | + } | ||
| 113 | + }); | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + @Override | ||
| 117 | + public void toSearchActivity(int marqueePosition, @NonNull String Title) { | ||
| 118 | + ProcessUtils.toSearchActivity(marqueePosition, Title); | ||
| 119 | + } | ||
| 120 | + | ||
| 121 | + @Override | ||
| 122 | + public void goToNavBarActivity(Fragment fragment, @NonNull String tabId) { | ||
| 123 | + /* | ||
| 124 | + 处理辅助频道 | ||
| 125 | + */ | ||
| 126 | + if (fragment != null && fragment instanceof NewsHomeFragment) { | ||
| 127 | + NewsHomeFragment newsHomeFragment = (NewsHomeFragment) fragment; | ||
| 128 | + // 辅助频道数据 | ||
| 129 | + List<ChannelBean> tempAddList = newsHomeFragment.getTempAddList(); | ||
| 130 | + if (tempAddList != null && tempAddList.size() > 0) { | ||
| 131 | + ProcessUtils.tempAddList = tempAddList; | ||
| 132 | + // 完成编辑后清理辅助频道数据 | ||
| 133 | + newsHomeFragment.setTempAddList(null); | ||
| 134 | + } else { | ||
| 135 | + ProcessUtils.tempAddList = null; | ||
| 136 | + } | ||
| 137 | + } else { | ||
| 138 | + ProcessUtils.tempAddList = null; | ||
| 139 | + } | ||
| 140 | + | ||
| 141 | + ProcessUtils.goToNavBarActivity(tabId); | ||
| 142 | + } | ||
| 75 | } | 143 | } |
| @@ -13,4 +13,30 @@ | @@ -13,4 +13,30 @@ | ||
| 13 | <string name="brvah_load_end">没有更多数据</string> | 13 | <string name="brvah_load_end">没有更多数据</string> |
| 14 | <string name="brvah_load_failed">加载失败,请点我重试</string> | 14 | <string name="brvah_load_failed">加载失败,请点我重试</string> |
| 15 | <string name="brvah_loading">正在加载中...</string> | 15 | <string name="brvah_loading">正在加载中...</string> |
| 16 | + | ||
| 17 | + <!--缺省页--> | ||
| 18 | + <!--页面接口报错,用于列表类及其他页面(带重试按钮)--> | ||
| 19 | + <string name="default_get_content_error">加载失败,请重试!</string> | ||
| 20 | + <!--内容获取失败,用于内容详情页(带重试按钮)--> | ||
| 21 | + <string name="default_get_content_failed">发生错误,请稍后重试。</string> | ||
| 22 | + <!--暂无网络(带重试按钮)--> | ||
| 23 | + <string name="default_no_network">请检查您的网络连接,然后重试!</string> | ||
| 24 | + <!--暂无内容--> | ||
| 25 | + <string name="default_no_content">暂无内容</string> | ||
| 26 | + <!--暂无收藏内容--> | ||
| 27 | + <string name="default_no_collected">你好没有收藏. 去主页.</string> | ||
| 28 | + <string name="no_collection">暂无收藏内容</string> | ||
| 29 | + <!--暂无消息或暂无浏览历史--> | ||
| 30 | + <string name="default_no_records">暂无消息</string> | ||
| 31 | + <string name="no_browsing_history">暂无浏览历史</string> | ||
| 32 | + <!--暂无搜索结果--> | ||
| 33 | + <string name="default_no_content_found">未找到内容</string> | ||
| 34 | + | ||
| 35 | + <string name="no_net_tips">无网络</string> | ||
| 36 | + <string name="weak_net_tips">网络有问题。请检查网络</string> | ||
| 37 | + <string name="click_retry">重试</string> | ||
| 38 | + <string name="clickretry">点击重试</string> | ||
| 39 | + <string name="no_more_data">没有了</string> | ||
| 40 | + <string name="seal_login_user_logout">用户已注销</string> | ||
| 41 | + <string name="seal_login_user_blocked">这个账号被封了!</string> | ||
| 16 | </resources> | 42 | </resources> |
| @@ -297,6 +297,14 @@ public class ArrayUtils { | @@ -297,6 +297,14 @@ public class ArrayUtils { | ||
| 297 | } | 297 | } |
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | + public static boolean listHasItem(int position, List<?> list) { | ||
| 301 | + if (list == null) { | ||
| 302 | + return false; | ||
| 303 | + } | ||
| 304 | + | ||
| 305 | + return position < list.size(); | ||
| 306 | + } | ||
| 307 | + | ||
| 300 | public static boolean isOutOffIndex(int position, List<?> list) { | 308 | public static boolean isOutOffIndex(int position, List<?> list) { |
| 301 | if (isEmpty(list)) { | 309 | if (isEmpty(list)) { |
| 302 | return true; | 310 | return true; |
| @@ -57,6 +57,7 @@ dependencies { | @@ -57,6 +57,7 @@ dependencies { | ||
| 57 | api project(path: ':wdkit') | 57 | api project(path: ':wdkit') |
| 58 | api project(path: ':wdinterface') | 58 | api project(path: ':wdinterface') |
| 59 | api project(path: ':wdplayer') | 59 | api project(path: ':wdplayer') |
| 60 | + api project(path: ':lib_room') | ||
| 60 | 61 | ||
| 61 | implementation rootProject.ext.support["appcompat-v7"] | 62 | implementation rootProject.ext.support["appcompat-v7"] |
| 62 | implementation 'androidx.recyclerview:recyclerview:1.2.1' | 63 | implementation 'androidx.recyclerview:recyclerview:1.2.1' |
| 1 | +package com.wd.capability.layout.constant; | ||
| 2 | + | ||
| 3 | +public class ProcessConstant { | ||
| 4 | + | ||
| 5 | + /** | ||
| 6 | + * 版面频道(电子报) | ||
| 7 | + */ | ||
| 8 | + public static String CHANNEL_ID_EL_NEWS = "2006"; | ||
| 9 | + | ||
| 10 | + // 播报频道(音频频道) | ||
| 11 | + public static String CHANNEL_ID_VOICE = "2066"; | ||
| 12 | + /** | ||
| 13 | + * 播报的pageID | ||
| 14 | + */ | ||
| 15 | + public static String PAGE_ID_VOICE = "21003"; | ||
| 16 | + // 直播 | ||
| 17 | + public static String CHANNEL_ID_LIVE = "2061"; | ||
| 18 | + // 活动频道 | ||
| 19 | + public static String CHANNEL_ID_ACTIVITY = "2073"; | ||
| 20 | + | ||
| 21 | +} |
| @@ -18,12 +18,15 @@ import androidx.annotation.NonNull; | @@ -18,12 +18,15 @@ import androidx.annotation.NonNull; | ||
| 18 | import androidx.annotation.Nullable; | 18 | import androidx.annotation.Nullable; |
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | +import com.people.room.ChannelDbHelper; | ||
| 21 | import com.wd.base.log.Logger; | 22 | import com.wd.base.log.Logger; |
| 22 | import com.wd.capability.layout.comp.layoutmanager.ItemLayoutManager; | 23 | import com.wd.capability.layout.comp.layoutmanager.ItemLayoutManager; |
| 23 | import com.wd.capability.layout.page.ItemErrorSubjectLayoutManager; | 24 | import com.wd.capability.layout.page.ItemErrorSubjectLayoutManager; |
| 24 | import com.wd.capability.layout.page.ItemNewsHomeMenuTopLayoutManager; | 25 | import com.wd.capability.layout.page.ItemNewsHomeMenuTopLayoutManager; |
| 25 | import com.wd.capability.layout.ui.channel.vm.ChannelViewModel; | 26 | import com.wd.capability.layout.ui.channel.vm.ChannelViewModel; |
| 26 | import com.wd.capability.layout.ui.channel.vm.INavChannelDataListener; | 27 | import com.wd.capability.layout.ui.channel.vm.INavChannelDataListener; |
| 28 | +import com.wd.foundation.wdinterface.comp.IProcess; | ||
| 29 | +import com.wd.foundation.wdinterface.constant.InterfaceConstant; | ||
| 27 | import com.wd.foundation.wdkit.base.fragment.BaseFragment; | 30 | import com.wd.foundation.wdkit.base.fragment.BaseFragment; |
| 28 | import com.wd.foundation.wdkit.base.fragment.BaseLazyFragment; | 31 | import com.wd.foundation.wdkit.base.fragment.BaseLazyFragment; |
| 29 | import com.wd.foundation.wdkit.constant.DefaultViewConstant; | 32 | import com.wd.foundation.wdkit.constant.DefaultViewConstant; |
| @@ -35,8 +38,12 @@ import com.wd.foundation.bean.response.ChannelBean; | @@ -35,8 +38,12 @@ import com.wd.foundation.bean.response.ChannelBean; | ||
| 35 | import com.wd.foundation.wdkit.utils.SafeBundleUtil; | 38 | import com.wd.foundation.wdkit.utils.SafeBundleUtil; |
| 36 | import com.wd.foundation.wdkit.utils.SpUtils; | 39 | import com.wd.foundation.wdkit.utils.SpUtils; |
| 37 | import com.wd.foundation.wdkitcore.livedata.LiveDataBus; | 40 | import com.wd.foundation.wdkitcore.livedata.LiveDataBus; |
| 41 | +import com.wd.foundation.wdkitcore.router.ArouterServiceManager; | ||
| 42 | +import com.wd.foundation.wdkitcore.tools.AppContext; | ||
| 38 | import com.wd.foundation.wdkitcore.tools.CastUtils; | 43 | import com.wd.foundation.wdkitcore.tools.CastUtils; |
| 44 | +import com.wd.foundation.wdkitcore.tools.JsonUtils; | ||
| 39 | 45 | ||
| 46 | +import java.util.ArrayList; | ||
| 40 | import java.util.List; | 47 | import java.util.List; |
| 41 | 48 | ||
| 42 | /** | 49 | /** |
| @@ -269,62 +276,69 @@ public class NewsHomeFragment extends BaseLazyFragment { | @@ -269,62 +276,69 @@ public class NewsHomeFragment extends BaseLazyFragment { | ||
| 269 | //频道编辑完成事件 | 276 | //频道编辑完成事件 |
| 270 | LiveDataBus.getInstance().with(EventConstants.COLUMN_NAVIGATION_DATACHANGE, ChannelBean.class).observe(getViewLifecycleOwner(), result -> { | 277 | LiveDataBus.getInstance().with(EventConstants.COLUMN_NAVIGATION_DATACHANGE, ChannelBean.class).observe(getViewLifecycleOwner(), result -> { |
| 271 | 278 | ||
| 272 | -// if (mTabManager != null && mTabBean != null && menuData != null) { | ||
| 273 | -// // 获取我的频道数据 | ||
| 274 | -// List<ChannelBean> myChannelList = ChannelDbHelper.getInstance(AppContext.getContext()).searchAllSelectChannel(); | ||
| 275 | -// mTabBean.setTopNavChannelList(myChannelList); | ||
| 276 | -// if (result != null) { | ||
| 277 | -// menuData.jumpChannelId = result.getChannelId(); | ||
| 278 | -// } else { | ||
| 279 | -// menuData.jumpChannelId = null; | ||
| 280 | -// } | ||
| 281 | -// | ||
| 282 | -// mTabManager.bindItem(mNavBarView, 0, mTabBean); | ||
| 283 | -// | ||
| 284 | -// } | 279 | + if (mTabManager != null && mTabBean != null && menuData != null) { |
| 280 | + // 获取我的频道数据 | ||
| 281 | + List<com.people.room.entity.ChannelBean> channelList = ChannelDbHelper.getInstance(AppContext.getContext()).searchAllSelectChannel(); | ||
| 282 | + List<ChannelBean> myChannelList = convertBeanList(channelList); | ||
| 283 | + mTabBean.setTopNavChannelList(myChannelList); | ||
| 284 | + if (result != null) { | ||
| 285 | + menuData.jumpChannelId = result.getChannelId(); | ||
| 286 | + } else { | ||
| 287 | + menuData.jumpChannelId = null; | ||
| 288 | + } | ||
| 289 | + | ||
| 290 | + mTabManager.bindItem(mNavBarView, 0, mTabBean); | ||
| 291 | + | ||
| 292 | + } | ||
| 285 | }); | 293 | }); |
| 286 | 294 | ||
| 287 | // 接收临时频道数据 | 295 | // 接收临时频道数据 |
| 288 | LiveDataBus.getInstance().with(EventConstants.COLUMN_NAVIGATION_DATACHANGE_ADD, ChannelBean.class).observe(getViewLifecycleOwner(), result -> { | 296 | LiveDataBus.getInstance().with(EventConstants.COLUMN_NAVIGATION_DATACHANGE_ADD, ChannelBean.class).observe(getViewLifecycleOwner(), result -> { |
| 289 | 297 | ||
| 290 | -// if (mTabManager != null && mTabBean != null) { | ||
| 291 | -// if (tempAddList == null) { | ||
| 292 | -// tempAddList = new ArrayList<>(); | ||
| 293 | -// } | ||
| 294 | -// //检测是否有重复的 | ||
| 295 | -// int size = tempAddList.size(); | ||
| 296 | -// if (size > 0) { | ||
| 297 | -// boolean isAdd = true; | ||
| 298 | -// for (ChannelBean bean : tempAddList) { | ||
| 299 | -// if (result.getChannelId().equals(bean.getChannelId())) { | ||
| 300 | -// isAdd = false; | ||
| 301 | -// break; | ||
| 302 | -// } | ||
| 303 | -// } | ||
| 304 | -// if (isAdd) { | ||
| 305 | -// tempAddList.add(result); | ||
| 306 | -// } | ||
| 307 | -// | ||
| 308 | -// } else { | ||
| 309 | -// tempAddList.add(result); | ||
| 310 | -// } | ||
| 311 | -// | ||
| 312 | -// // 获取我的频道数据 | ||
| 313 | -// List<ChannelBean> myChannelList = ChannelDbHelper.getInstance(AppContext.getContext()).searchAllSelectChannel(); | ||
| 314 | -// // 增加个临时频道 | ||
| 315 | -// myChannelList.addAll(tempAddList); | ||
| 316 | -// | ||
| 317 | -// if (result.isSpecialChannel()) { | ||
| 318 | -// // 特殊频道跳转方法 | ||
| 319 | -// ProcessUtils.specialChannelJumpPage(result); | ||
| 320 | -// } else { | ||
| 321 | -// // 设置跳转频道id | ||
| 322 | -// menuData.jumpChannelId = result.getChannelId(); | ||
| 323 | -// } | ||
| 324 | -// mTabBean.setTopNavChannelList(myChannelList); | ||
| 325 | -// mTabManager.bindItem(mNavBarView, 0, mTabBean); | ||
| 326 | -// | ||
| 327 | -// } | 298 | + if (mTabManager != null && mTabBean != null) { |
| 299 | + if (tempAddList == null) { | ||
| 300 | + tempAddList = new ArrayList<>(); | ||
| 301 | + } | ||
| 302 | + //检测是否有重复的 | ||
| 303 | + int size = tempAddList.size(); | ||
| 304 | + if (size > 0) { | ||
| 305 | + boolean isAdd = true; | ||
| 306 | + for (ChannelBean bean : tempAddList) { | ||
| 307 | + if (result.getChannelId().equals(bean.getChannelId())) { | ||
| 308 | + isAdd = false; | ||
| 309 | + break; | ||
| 310 | + } | ||
| 311 | + } | ||
| 312 | + if (isAdd) { | ||
| 313 | + tempAddList.add(result); | ||
| 314 | + } | ||
| 315 | + | ||
| 316 | + } else { | ||
| 317 | + tempAddList.add(result); | ||
| 318 | + } | ||
| 319 | + | ||
| 320 | + // 获取我的频道数据 | ||
| 321 | + List<com.people.room.entity.ChannelBean> channelList = ChannelDbHelper.getInstance(AppContext.getContext()).searchAllSelectChannel(); | ||
| 322 | + List<ChannelBean> myChannelList = convertBeanList(channelList); | ||
| 323 | + // 增加个临时频道 | ||
| 324 | + myChannelList.addAll(tempAddList); | ||
| 325 | + | ||
| 326 | + if (result.isSpecialChannel()) { | ||
| 327 | + // 特殊频道跳转方法 | ||
| 328 | + IProcess process = ArouterServiceManager.provide(InterfaceConstant.PATH_COMP_PROCESS); | ||
| 329 | + if (process == null) { | ||
| 330 | + Logger.t(TAG).e("COLUMN_NAVIGATION_DATACHANGE_ADD, IProcess has not impl"); | ||
| 331 | + } else { | ||
| 332 | + process.specialChannelJumpPage(result); | ||
| 333 | + } | ||
| 334 | + } else { | ||
| 335 | + // 设置跳转频道id | ||
| 336 | + menuData.jumpChannelId = result.getChannelId(); | ||
| 337 | + } | ||
| 338 | + mTabBean.setTopNavChannelList(myChannelList); | ||
| 339 | + mTabManager.bindItem(mNavBarView, 0, mTabBean); | ||
| 340 | + | ||
| 341 | + } | ||
| 328 | }); | 342 | }); |
| 329 | } | 343 | } |
| 330 | 344 | ||
| @@ -467,4 +481,16 @@ public class NewsHomeFragment extends BaseLazyFragment { | @@ -467,4 +481,16 @@ public class NewsHomeFragment extends BaseLazyFragment { | ||
| 467 | public void setTempAddList(List<ChannelBean> tempAddList) { | 481 | public void setTempAddList(List<ChannelBean> tempAddList) { |
| 468 | this.tempAddList = tempAddList; | 482 | this.tempAddList = tempAddList; |
| 469 | } | 483 | } |
| 484 | + | ||
| 485 | + | ||
| 486 | + private List<ChannelBean> convertBeanList(List<com.people.room.entity.ChannelBean> channelList) { | ||
| 487 | + List<ChannelBean> retList; | ||
| 488 | + try { | ||
| 489 | + String objectToJson = JsonUtils.convertObjectToJson(channelList); | ||
| 490 | + retList = JsonUtils.convertJsonArrayToObjList(objectToJson,ChannelBean.class); | ||
| 491 | + } catch (Exception e) { | ||
| 492 | + throw new RuntimeException(e); | ||
| 493 | + } | ||
| 494 | + return retList; | ||
| 495 | + } | ||
| 470 | } | 496 | } |
| @@ -31,6 +31,7 @@ import com.wd.capability.layout.R; | @@ -31,6 +31,7 @@ import com.wd.capability.layout.R; | ||
| 31 | import com.wd.capability.layout.comp.ICompService; | 31 | import com.wd.capability.layout.comp.ICompService; |
| 32 | import com.wd.capability.layout.comp.layoutmanager.ItemContainerManager; | 32 | import com.wd.capability.layout.comp.layoutmanager.ItemContainerManager; |
| 33 | import com.wd.capability.layout.constant.LaunchPageConstant; | 33 | import com.wd.capability.layout.constant.LaunchPageConstant; |
| 34 | +import com.wd.capability.layout.constant.ProcessConstant; | ||
| 34 | import com.wd.capability.layout.fragment.ColumnFragment; | 35 | import com.wd.capability.layout.fragment.ColumnFragment; |
| 35 | import com.wd.capability.layout.fragment.NewsHomeFragment; | 36 | import com.wd.capability.layout.fragment.NewsHomeFragment; |
| 36 | import com.wd.capability.layout.listener.ColumnFragmentCallback; | 37 | import com.wd.capability.layout.listener.ColumnFragmentCallback; |
| @@ -41,6 +42,9 @@ import com.wd.capability.layout.ui.widget.commonnavigator.titles.TopNavEffectTit | @@ -41,6 +42,9 @@ import com.wd.capability.layout.ui.widget.commonnavigator.titles.TopNavEffectTit | ||
| 41 | import com.wd.capability.layout.uitls.CompentLogicUtil; | 42 | import com.wd.capability.layout.uitls.CompentLogicUtil; |
| 42 | import com.wd.capability.network.utils.NetworkUtil; | 43 | import com.wd.capability.network.utils.NetworkUtil; |
| 43 | import com.wd.capability.network.cachedata.CacheData; | 44 | import com.wd.capability.network.cachedata.CacheData; |
| 45 | +import com.wd.foundation.bean.custom.comp.PageBean; | ||
| 46 | +import com.wd.foundation.bean.custom.content.ContentBean; | ||
| 47 | +import com.wd.foundation.bean.custom.content.ContentTypeConstant; | ||
| 44 | import com.wd.foundation.wdinterface.comp.IProcess; | 48 | import com.wd.foundation.wdinterface.comp.IProcess; |
| 45 | import com.wd.foundation.wdinterface.constant.InterfaceConstant; | 49 | import com.wd.foundation.wdinterface.constant.InterfaceConstant; |
| 46 | import com.wd.foundation.wdkit.constant.DefaultViewConstant; | 50 | import com.wd.foundation.wdkit.constant.DefaultViewConstant; |
| @@ -48,6 +52,7 @@ import com.wd.foundation.wdkit.constant.EventConstants; | @@ -48,6 +52,7 @@ import com.wd.foundation.wdkit.constant.EventConstants; | ||
| 48 | import com.wd.foundation.wdkit.imageglide.ImageUtils; | 52 | import com.wd.foundation.wdkit.imageglide.ImageUtils; |
| 49 | 53 | ||
| 50 | import com.wd.foundation.wdkit.utils.GrayManager; | 54 | import com.wd.foundation.wdkit.utils.GrayManager; |
| 55 | +import com.wd.foundation.wdkit.utils.ToastNightUtil; | ||
| 51 | import com.wd.foundation.wdkit.viewclick.BaseClickListener; | 56 | import com.wd.foundation.wdkit.viewclick.BaseClickListener; |
| 52 | import com.wd.foundation.wdkit.view.DefaultView; | 57 | import com.wd.foundation.wdkit.view.DefaultView; |
| 53 | import com.wd.foundation.bean.custom.MenuBean; | 58 | import com.wd.foundation.bean.custom.MenuBean; |
| @@ -324,76 +329,60 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | @@ -324,76 +329,60 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | ||
| 324 | * 点击事件监听 | 329 | * 点击事件监听 |
| 325 | */ | 330 | */ |
| 326 | private void setClickListen(View itemView) { | 331 | private void setClickListen(View itemView) { |
| 327 | -// ViewUtils.findViewById(itemView, R.id.ivCenter).setOnClickListener(new BaseClickListener() { | ||
| 328 | -// @Override | ||
| 329 | -// protected void onNoDoubleClick(View v) { | ||
| 330 | -// ProcessUtils.goToPaperActivity(); | ||
| 331 | -// } | ||
| 332 | -// }); | ||
| 333 | -// //跳转到播报频道 pageId:21003, channelId:2066, 名称:播报 | ||
| 334 | -// ViewUtils.findViewById(itemView, R.id.llToMusicChannel).setOnClickListener(new BaseClickListener() { | ||
| 335 | -// @Override | ||
| 336 | -// protected void onNoDoubleClick(View v) { | ||
| 337 | -// ChannelBean channelBean = new ChannelBean(); | ||
| 338 | -// channelBean.setChannelId(ProcessUtils.CHANNEL_ID_VOICE); | ||
| 339 | -// channelBean.setPageId(ProcessUtils.PAGE_ID_VOICE); | ||
| 340 | -// channelBean.setName("播报"); | ||
| 341 | -// ProcessUtils.specialChannelJumpPage(channelBean); | ||
| 342 | -// } | ||
| 343 | -// }); | ||
| 344 | -// ViewUtils.findViewById(itemView, R.id.llDialyNews).setOnClickListener(new BaseClickListener() { | ||
| 345 | -// @Override | ||
| 346 | -// protected void onNoDoubleClick(View v) { | 332 | + IProcess process = ArouterServiceManager.provide(InterfaceConstant.PATH_COMP_PROCESS); |
| 333 | + if (process == null) { | ||
| 334 | + Logger.t(TAG).e("setClickListen, IProcess has not impl"); | ||
| 335 | + } | ||
| 336 | + ViewUtils.findViewById(itemView, R.id.ivCenter).setOnClickListener(new BaseClickListener() { | ||
| 337 | + @Override | ||
| 338 | + protected void onNoDoubleClick(View v) { | ||
| 339 | + process.goToPaperActivity(); | ||
| 340 | + } | ||
| 341 | + }); | ||
| 342 | + //跳转到播报频道 pageId:21003, channelId:2066, 名称:播报 | ||
| 343 | + ViewUtils.findViewById(itemView, R.id.llToMusicChannel).setOnClickListener(new BaseClickListener() { | ||
| 344 | + @Override | ||
| 345 | + protected void onNoDoubleClick(View v) { | ||
| 346 | + ChannelBean channelBean = new ChannelBean(); | ||
| 347 | + channelBean.setChannelId(ProcessConstant.CHANNEL_ID_VOICE); | ||
| 348 | + channelBean.setPageId(ProcessConstant.PAGE_ID_VOICE); | ||
| 349 | + channelBean.setName("播报"); | ||
| 350 | + process.specialChannelJumpPage(channelBean); | ||
| 351 | + } | ||
| 352 | + }); | ||
| 353 | + ViewUtils.findViewById(itemView, R.id.llDialyNews).setOnClickListener(new BaseClickListener() { | ||
| 354 | + @Override | ||
| 355 | + protected void onNoDoubleClick(View v) { | ||
| 347 | // GeneralTrack.getInstance().E_MEN_CLICK(bottomMenuBean.getTitle(), bottomMenuBean.getNavId()); | 356 | // GeneralTrack.getInstance().E_MEN_CLICK(bottomMenuBean.getTitle(), bottomMenuBean.getNavId()); |
| 348 | -// llRight.setClickable(false); | ||
| 349 | -// CommonNetUtils.getInstance().getDailyPaperId(new ResultCallback<PageBean>() { | ||
| 350 | -// @Override | ||
| 351 | -// public void onSuccess(PageBean pageBean) { | ||
| 352 | -// if (pageBean != null) { | ||
| 353 | -// ContentBean bean = new ContentBean(); | ||
| 354 | -// bean.setObjectLevel(String.valueOf(ContentTypeConstant.SUBJECT_TOPICTYPE_25)); | ||
| 355 | -// bean.setPageId(pageBean.getId()); | ||
| 356 | -// bean.setNewsTitle(pageBean.getName()); | ||
| 357 | -// ProcessUtils.goToCommonSubjectPage(bean); | ||
| 358 | -// | ||
| 359 | -// } else { | ||
| 360 | -// ToastNightUtil.showShort("暂无数据"); | ||
| 361 | -// } | ||
| 362 | -// llRight.setClickable(true); | ||
| 363 | -// } | ||
| 364 | -// | ||
| 365 | -// @Override | ||
| 366 | -// public void onError(String errorCode) { | ||
| 367 | -// llRight.setClickable(true); | ||
| 368 | -// } | ||
| 369 | -// }); | ||
| 370 | -// } | ||
| 371 | -// }); | ||
| 372 | -// | ||
| 373 | -// llLeft.setOnClickListener(new BaseClickListener() { | ||
| 374 | -// @Override | ||
| 375 | -// protected void onNoDoubleClick(View v) { | ||
| 376 | -// int marqueePosition = -1; | ||
| 377 | -// if (searchHotWordList != null && searchHotWordList.size() > 0 && mMarqueeView != null) { | ||
| 378 | -// marqueePosition = mMarqueeView.getPosition(); | ||
| 379 | -// } | ||
| 380 | -// ProcessUtils.toSearchActivity(marqueePosition, bottomMenuBean.getTitle()); | ||
| 381 | -// | 357 | + llRight.setClickable(false); |
| 358 | + process.goToCommonSubjectPage(llRight); | ||
| 359 | + } | ||
| 360 | + }); | ||
| 361 | + | ||
| 362 | + llLeft.setOnClickListener(new BaseClickListener() { | ||
| 363 | + @Override | ||
| 364 | + protected void onNoDoubleClick(View v) { | ||
| 365 | + int marqueePosition = -1; | ||
| 366 | + if (searchHotWordList != null && searchHotWordList.size() > 0 && mMarqueeView != null) { | ||
| 367 | + marqueePosition = mMarqueeView.getPosition(); | ||
| 368 | + } | ||
| 369 | + process.toSearchActivity(marqueePosition, bottomMenuBean.getTitle()); | ||
| 370 | + | ||
| 382 | // CommonTrack.getInstance().clickSearchButton(bottomMenuBean.getTitle(), bottomMenuBean.getNavId()); | 371 | // CommonTrack.getInstance().clickSearchButton(bottomMenuBean.getTitle(), bottomMenuBean.getNavId()); |
| 383 | -// } | ||
| 384 | -// }); | ||
| 385 | -// mMarqueeView.setOnItemClickListener(new MarqueeView.OnItemClickListener() { | ||
| 386 | -// @Override | ||
| 387 | -// public void onItemClick(int position, TextView textView) { | ||
| 388 | -// if (searchHotWordList != null) { | ||
| 389 | -// ProcessUtils.toSearchActivity(position, bottomMenuBean.getTitle()); | ||
| 390 | -// } else { | ||
| 391 | -// ProcessUtils.toSearchActivity(-1, bottomMenuBean.getTitle()); | ||
| 392 | -// } | ||
| 393 | -// | 372 | + } |
| 373 | + }); | ||
| 374 | + mMarqueeView.setOnItemClickListener(new MarqueeView.OnItemClickListener() { | ||
| 375 | + @Override | ||
| 376 | + public void onItemClick(int position, TextView textView) { | ||
| 377 | + if (searchHotWordList != null) { | ||
| 378 | + process.toSearchActivity(position, bottomMenuBean.getTitle()); | ||
| 379 | + } else { | ||
| 380 | + process.toSearchActivity(-1, bottomMenuBean.getTitle()); | ||
| 381 | + } | ||
| 382 | + | ||
| 394 | // CommonTrack.getInstance().clickSearchButton(bottomMenuBean.getTitle(), bottomMenuBean.getNavId()); | 383 | // CommonTrack.getInstance().clickSearchButton(bottomMenuBean.getTitle(), bottomMenuBean.getNavId()); |
| 395 | -// } | ||
| 396 | -// }); | 384 | + } |
| 385 | + }); | ||
| 397 | } | 386 | } |
| 398 | 387 | ||
| 399 | /** | 388 | /** |
| @@ -428,27 +417,13 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | @@ -428,27 +417,13 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | ||
| 428 | imgSearchManage.setOnClickListener(new BaseClickListener() { | 417 | imgSearchManage.setOnClickListener(new BaseClickListener() { |
| 429 | @Override | 418 | @Override |
| 430 | protected void onNoDoubleClick(View v) { | 419 | protected void onNoDoubleClick(View v) { |
| 431 | - /* | ||
| 432 | - 处理辅助频道 | ||
| 433 | - */ | ||
| 434 | -// Fragment fragment = getFragment(); | ||
| 435 | -// if (fragment != null && fragment instanceof NewsHomeFragment) { | ||
| 436 | -// NewsHomeFragment newsHomeFragment = (NewsHomeFragment) fragment; | ||
| 437 | -// // 辅助频道数据 | ||
| 438 | -// List<ChannelBean> tempAddList = newsHomeFragment.getTempAddList(); | ||
| 439 | -// if (tempAddList != null && tempAddList.size() > 0) { | ||
| 440 | -// ProcessUtils.tempAddList = tempAddList; | ||
| 441 | -// // 完成编辑后清理辅助频道数据 | ||
| 442 | -// newsHomeFragment.setTempAddList(null); | ||
| 443 | -// } else { | ||
| 444 | -// ProcessUtils.tempAddList = null; | ||
| 445 | -// } | ||
| 446 | -// } else { | ||
| 447 | -// ProcessUtils.tempAddList = null; | ||
| 448 | -// } | ||
| 449 | -// | ||
| 450 | -// String tabId = mTabBean.getTabChannleId(); | ||
| 451 | -// ProcessUtils.goToNavBarActivity(tabId); | 420 | + IProcess process = ArouterServiceManager.provide(InterfaceConstant.PATH_COMP_PROCESS); |
| 421 | + if (process == null) { | ||
| 422 | + Logger.t(TAG).e("imgSearchManage OnClickListener, IProcess has not impl"); | ||
| 423 | + } | ||
| 424 | + String tabId = mTabBean.getTabChannleId(); | ||
| 425 | + Fragment fragment = getFragment(); | ||
| 426 | + process.goToNavBarActivity(fragment, tabId); | ||
| 452 | } | 427 | } |
| 453 | }); | 428 | }); |
| 454 | 429 | ||
| @@ -560,13 +535,13 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | @@ -560,13 +535,13 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | ||
| 560 | private void loadMorningAndNightData() { | 535 | private void loadMorningAndNightData() { |
| 561 | //不用请求 | 536 | //不用请求 |
| 562 | String paperTodayMd5 = SpUtils.getPaperTodayMd5(); | 537 | String paperTodayMd5 = SpUtils.getPaperTodayMd5(); |
| 563 | - if (StringUtils.isNotBlank(paperTodayMd5)){ | 538 | + if (StringUtils.isNotBlank(paperTodayMd5)) { |
| 564 | String[] split = paperTodayMd5.split("_"); | 539 | String[] split = paperTodayMd5.split("_"); |
| 565 | - if (split != null){ | 540 | + if (split != null) { |
| 566 | String date = split[0]; | 541 | String date = split[0]; |
| 567 | String currentDate = TimeUtil.getCurrentDate(); | 542 | String currentDate = TimeUtil.getCurrentDate(); |
| 568 | String pagePic = split[2]; | 543 | String pagePic = split[2]; |
| 569 | - if (date.equals(currentDate)){ | 544 | + if (date.equals(currentDate)) { |
| 570 | //预加载缓存下第一页图片 | 545 | //预加载缓存下第一页图片 |
| 571 | ImageUtils.getInstance().preloadImage(getFragment().getContext(), pagePic); | 546 | ImageUtils.getInstance().preloadImage(getFragment().getContext(), pagePic); |
| 572 | return; | 547 | return; |
| @@ -586,7 +561,7 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | @@ -586,7 +561,7 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | ||
| 586 | double paperCanvasWidth = maxWidth - UiUtils.dp2px(26); | 561 | double paperCanvasWidth = maxWidth - UiUtils.dp2px(26); |
| 587 | double paperCanvasHeight = paperCanvasWidth * unproprotion; | 562 | double paperCanvasHeight = paperCanvasWidth * unproprotion; |
| 588 | String xy = paperCanvasWidth + "x" + paperCanvasHeight; | 563 | String xy = paperCanvasWidth + "x" + paperCanvasHeight; |
| 589 | - if(getFragment() == null || getFragment().isDetached()){ | 564 | + if (getFragment() == null || getFragment().isDetached()) { |
| 590 | //Fragment如果Detached就不往下执行了,否则一样异常 | 565 | //Fragment如果Detached就不往下执行了,否则一样异常 |
| 591 | return; | 566 | return; |
| 592 | } | 567 | } |
| @@ -614,7 +589,7 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | @@ -614,7 +589,7 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | ||
| 614 | } | 589 | } |
| 615 | }); | 590 | }); |
| 616 | } | 591 | } |
| 617 | - paperPageModel.requestPaperList(null, true,true); | 592 | + paperPageModel.requestPaperList(null, true, true); |
| 618 | } | 593 | } |
| 619 | 594 | ||
| 620 | 595 | ||
| @@ -1004,18 +979,18 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | @@ -1004,18 +979,18 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | ||
| 1004 | } | 979 | } |
| 1005 | // 顶部左右文字和icon颜色 | 980 | // 顶部左右文字和icon颜色 |
| 1006 | String color = bottomMenuBean.getSearchBothColor(); | 981 | String color = bottomMenuBean.getSearchBothColor(); |
| 1007 | - if(StringUtils.isEmpty(color)){ | 982 | + if (StringUtils.isEmpty(color)) { |
| 1008 | color = THEME_IMAGE_TXT_COLOR; | 983 | color = THEME_IMAGE_TXT_COLOR; |
| 1009 | } | 984 | } |
| 1010 | - ivIconLeft.setColorFilter(Color.parseColor(addAlphaColorForPercent(color,128)),PorterDuff.Mode.SRC_IN); | 985 | + ivIconLeft.setColorFilter(Color.parseColor(addAlphaColorForPercent(color, 128)), PorterDuff.Mode.SRC_IN); |
| 1011 | // ivIconLeft.setImageAlpha(128); | 986 | // ivIconLeft.setImageAlpha(128); |
| 1012 | - ivRightIcon.setColorFilter(Color.parseColor(addAlphaColorForPercent(color,128)),PorterDuff.Mode.SRC_IN); | 987 | + ivRightIcon.setColorFilter(Color.parseColor(addAlphaColorForPercent(color, 128)), PorterDuff.Mode.SRC_IN); |
| 1013 | // ivRightIcon.setImageAlpha(128); | 988 | // ivRightIcon.setImageAlpha(128); |
| 1014 | - ivToMusicChannel.setColorFilter(Color.parseColor(addAlphaColorForPercent(color,128)),PorterDuff.Mode.SRC_IN); | 989 | + ivToMusicChannel.setColorFilter(Color.parseColor(addAlphaColorForPercent(color, 128)), PorterDuff.Mode.SRC_IN); |
| 1015 | // ivToMusicChannel.setImageAlpha(128); | 990 | // ivToMusicChannel.setImageAlpha(128); |
| 1016 | - vLineMusicChannel.setBackgroundColor(Color.parseColor(addAlphaColorForPercent(color,51))); | ||
| 1017 | - mMarqueeView.setTextColor(Color.parseColor(addAlphaColorForPercent(color,128))); | ||
| 1018 | - tvRight.setTextColor(Color.parseColor(addAlphaColorForPercent(color,128))); | 991 | + vLineMusicChannel.setBackgroundColor(Color.parseColor(addAlphaColorForPercent(color, 51))); |
| 992 | + mMarqueeView.setTextColor(Color.parseColor(addAlphaColorForPercent(color, 128))); | ||
| 993 | + tvRight.setTextColor(Color.parseColor(addAlphaColorForPercent(color, 128))); | ||
| 1019 | 994 | ||
| 1020 | // 搜索背景框url | 995 | // 搜索背景框url |
| 1021 | String searchUrl = bottomMenuBean.getSearchUrl(); | 996 | String searchUrl = bottomMenuBean.getSearchUrl(); |
| @@ -1034,7 +1009,7 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | @@ -1034,7 +1009,7 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | ||
| 1034 | channelMoreColor = THEME_MENU_MORE_COLOR; | 1009 | channelMoreColor = THEME_MENU_MORE_COLOR; |
| 1035 | } | 1010 | } |
| 1036 | // imgSearchManage.setImageAlpha(128); | 1011 | // imgSearchManage.setImageAlpha(128); |
| 1037 | - imgSearchManage.setColorFilter(Color.parseColor(addAlphaColorForPercent(channelMoreColor,128)),PorterDuff.Mode.SRC_IN); | 1012 | + imgSearchManage.setColorFilter(Color.parseColor(addAlphaColorForPercent(channelMoreColor, 128)), PorterDuff.Mode.SRC_IN); |
| 1038 | 1013 | ||
| 1039 | 1014 | ||
| 1040 | //顶部频道导航栏颜色 | 1015 | //顶部频道导航栏颜色 |
| @@ -1042,7 +1017,7 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | @@ -1042,7 +1017,7 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | ||
| 1042 | TITLE_TEXT_SELECTED_COLOR = bottomMenuBean.getChannelChooseColor(); | 1017 | TITLE_TEXT_SELECTED_COLOR = bottomMenuBean.getChannelChooseColor(); |
| 1043 | } | 1018 | } |
| 1044 | if (!TextUtils.isEmpty(bottomMenuBean.getChannelChooseCColor())) { | 1019 | if (!TextUtils.isEmpty(bottomMenuBean.getChannelChooseCColor())) { |
| 1045 | - TITLE_TEXT_UNSELECTED_COLOR = addAlphaColorForPercent(bottomMenuBean.getChannelChooseCColor(),128); | 1020 | + TITLE_TEXT_UNSELECTED_COLOR = addAlphaColorForPercent(bottomMenuBean.getChannelChooseCColor(), 128); |
| 1046 | } | 1021 | } |
| 1047 | // 下划线 | 1022 | // 下划线 |
| 1048 | if (!TextUtils.isEmpty(bottomMenuBean.getChannelChooseActionUrl())) { | 1023 | if (!TextUtils.isEmpty(bottomMenuBean.getChannelChooseActionUrl())) { |
| @@ -1400,12 +1375,12 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | @@ -1400,12 +1375,12 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | ||
| 1400 | /** | 1375 | /** |
| 1401 | * 更新频道策略 | 1376 | * 更新频道策略 |
| 1402 | */ | 1377 | */ |
| 1403 | - private void updateChannelStrategy(){ | ||
| 1404 | - if(mTabBean == null){ | 1378 | + private void updateChannelStrategy() { |
| 1379 | + if (mTabBean == null) { | ||
| 1405 | return; | 1380 | return; |
| 1406 | } | 1381 | } |
| 1407 | List<ChannelBean> topNavChannelList = mTabBean.getTopNavChannelList(); | 1382 | List<ChannelBean> topNavChannelList = mTabBean.getTopNavChannelList(); |
| 1408 | - if(ArrayUtils.isEmpty(topNavChannelList)){ | 1383 | + if (ArrayUtils.isEmpty(topNavChannelList)) { |
| 1409 | return; | 1384 | return; |
| 1410 | } | 1385 | } |
| 1411 | int size = topNavChannelList.size(); | 1386 | int size = topNavChannelList.size(); |
| @@ -1423,24 +1398,25 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | @@ -1423,24 +1398,25 @@ public class ItemNewsHomeMenuTopLayoutManager extends ItemContainerManager<Simpl | ||
| 1423 | 1398 | ||
| 1424 | /** | 1399 | /** |
| 1425 | * 为色值添加透明度 | 1400 | * 为色值添加透明度 |
| 1401 | + * | ||
| 1426 | * @param color | 1402 | * @param color |
| 1427 | * @param percent | 1403 | * @param percent |
| 1428 | * @return | 1404 | * @return |
| 1429 | */ | 1405 | */ |
| 1430 | - private String addAlphaColorForPercent(String color,int percent){ | ||
| 1431 | - if (!color.startsWith("#") || color.length() != 7){ | 1406 | + private String addAlphaColorForPercent(String color, int percent) { |
| 1407 | + if (!color.startsWith("#") || color.length() != 7) { | ||
| 1432 | return color; | 1408 | return color; |
| 1433 | } | 1409 | } |
| 1434 | - String str = "#"+Integer.toHexString(percent); | ||
| 1435 | - return color.replace("#",str); | 1410 | + String str = "#" + Integer.toHexString(percent); |
| 1411 | + return color.replace("#", str); | ||
| 1436 | } | 1412 | } |
| 1437 | 1413 | ||
| 1438 | /** | 1414 | /** |
| 1439 | * 设置夜间模式颜色 | 1415 | * 设置夜间模式颜色 |
| 1440 | */ | 1416 | */ |
| 1441 | - private void setNightModeColor(Context context){ | 1417 | + private void setNightModeColor(Context context) { |
| 1442 | //文字选中颜色 "#222222" | 1418 | //文字选中颜色 "#222222" |
| 1443 | - if (SpUtils.isNightMode()){ | 1419 | + if (SpUtils.isNightMode()) { |
| 1444 | TITLE_TEXT_SELECTED_COLOR = "#DDDDDD"; | 1420 | TITLE_TEXT_SELECTED_COLOR = "#DDDDDD"; |
| 1445 | //文字未选中颜色 "#999999" | 1421 | //文字未选中颜色 "#999999" |
| 1446 | TITLE_TEXT_UNSELECTED_COLOR = "#80DDDDDD"; | 1422 | TITLE_TEXT_UNSELECTED_COLOR = "#80DDDDDD"; |
-
Please register or login to post a comment