Compare commits

...

1315 Commits
v3.6 ... v3.7.1

Author SHA1 Message Date
1facde123e 3.7.1_tinker-base 2019-12-05 18:31:21 +08:00
8f9d6ed2ce 完成20191202测试汇总的20191205补充 https://gitlab.ghzs.com/pm/halo-app-issues/issues/714 2019-12-05 17:52:25 +08:00
e43902be79 首页下载统计 下载位置补充 2019-12-04 19:27:17 +08:00
0f5f8861a7 修复问答推荐默认排序规则混乱问题 2019-12-04 15:10:17 +08:00
cb08886d27 修复启动图显示问题(与系统底部控制栏重叠) 2019-12-04 14:51:10 +08:00
322ec56787 修复光环助手1202测试问题汇总(20191204的3,4,6) https://gitlab.ghzs.com/pm/halo-app-issues/issues/714 2019-12-04 11:56:14 +08:00
60b12a3bdf Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-12-04 11:30:09 +08:00
26a66e3a2b 更换启动图 2019-12-04 11:29:35 +08:00
e86e78a665 添加默认打包渠道号 2019-12-03 16:07:13 +08:00
3ba68abbee 优化首页刷新问题 补充 2019-12-03 15:45:58 +08:00
a46ba32f06 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-12-03 15:21:25 +08:00
82348b519a 优化首页刷新问题 2019-12-03 15:20:53 +08:00
8315a50d49 绕过广点通SDK初始化限制避免启动耗时过长 2019-12-03 11:50:21 +08:00
dca07831db 新增 徽章中心 MTA事件 2019-12-03 09:51:34 +08:00
d568dd0791 修复邀请回答页面用户名显示越界问题 2019-12-03 09:31:13 +08:00
9dbfc68488 Merge branch '3.7.0_servers_reverse' into dev 2019-12-02 19:34:24 +08:00
0b46e0ef8e 邀请回答徽章位置修改 2019-12-02 18:27:58 +08:00
472604bc15 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-12-02 17:49:07 +08:00
58a2d38518 修复DownloadItemUtils下载按钮点击回调混乱顺序问题 2019-12-02 17:48:54 +08:00
c91186be8a 修复启动页的虚拟按键显示问题 2019-12-02 17:37:49 +08:00
03235438bc Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2019-12-02 17:18:49 +08:00
d015285f1a 更换启动图 2019-12-02 17:17:42 +08:00
45323a6817 MTA数据补充 2019-12-02 16:59:18 +08:00
bcc8d35654 进入评论MTA数据修改 2019-12-02 16:07:16 +08:00
9137b65f4a 粉丝/关注页面MTA数据 2019-12-02 16:01:29 +08:00
fbc9dac99e 修复安利墙分页问题 2019-12-02 15:41:09 +08:00
c27a6e06ad 更换启动图 2019-12-02 15:03:07 +08:00
07970fcbae Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2019-12-02 00:13:19 +08:00
0b3e250386 优化启动图 2019-12-02 00:11:48 +08:00
13b1ba613d 完成(20191129-1730)测试问题汇总的20191201测试 https://gitlab.ghzs.com/pm/halo-app-issues/issues/712 2019-12-01 23:54:15 +08:00
5a1feb4500 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-12-01 23:21:22 +08:00
cc7accbc95 首页轮播图增加预约功能 2019-12-01 23:14:10 +08:00
42a83ea0c5 Merge remote-tracking branch 'origin/dev' into dev 2019-12-01 23:04:13 +08:00
39f84442cd 调整 chucker 编译脚本 2019-12-01 23:04:04 +08:00
047c25b0b7 完成1201-1500测试问题汇总的16,18 https://gitlab.ghzs.com/pm/halo-app-issues/issues/713 2019-12-01 23:02:24 +08:00
045f21beac Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-12-01 22:49:31 +08:00
8a64460097 更换启动图 2019-12-01 22:49:20 +08:00
195d039904 完成3.7.1测试问题汇总的9 https://gitlab.ghzs.com/pm/halo-app-issues/issues/713 2019-12-01 21:54:28 +08:00
bcf77433b9 公告评论徽章入口 2019-12-01 21:47:02 +08:00
3a122a7137 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-12-01 21:41:18 +08:00
354d286a98 光环助手V3.7.1 RELEASE(20191201-1500)测试问题汇总(1.2.7) https://gitlab.ghzs.com/pm/halo-app-issues/issues/713 2019-12-01 21:41:06 +08:00
bfccc1c9b8 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-12-01 21:14:26 +08:00
80767c17b2 光环助手V3.7.1 RELEASE(20191201-1500)测试问题汇总(5,8,10) https://gitlab.ghzs.com/pm/halo-app-issues/issues/713 2019-12-01 21:14:17 +08:00
0a9185462e 完成3.7.1测试问题汇总的3 https://gitlab.ghzs.com/pm/halo-app-issues/issues/713 2019-12-01 21:13:58 +08:00
c058d3f8c1 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-12-01 20:57:05 +08:00
70655da2e7 限制网页标题变化 2019-12-01 20:57:00 +08:00
51f8c15af6 修复微信分享问题 2019-12-01 19:37:43 +08:00
20d6984057 首页轮播图加上占位符,图片加载完成再显示渐变阴影 2019-12-01 17:56:56 +08:00
f26813c137 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-12-01 17:26:38 +08:00
e2a265c3c7 光环助手V3.7.1 RELEASE(20191129-1730)测试问题汇总(1.2.3.4.5) https://gitlab.ghzs.com/pm/halo-app-issues/issues/712 2019-12-01 17:26:23 +08:00
e840daa340 禁用 webview 安全浏览 2019-12-01 17:23:37 +08:00
c54df5336d 光环助手V3.7.1 RELEASE(20191129-1730) 测试问题汇总https://gitlab.ghzs.com/pm/halo-app-issues/issues/712 2019-12-01 17:17:47 +08:00
4ec97409a8 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-12-01 16:04:52 +08:00
31b5568dfa 轮播图初始化时定位到第一张
修复首页评分无法显示问题
2019-12-01 16:04:42 +08:00
10cfc6521d 修改个人主页MTA 2019-12-01 15:01:52 +08:00
bfdbc7fc92 修复单图跳转排行榜与多图跳转不一致的问题 2019-12-01 14:44:44 +08:00
ead332d863 修复安利墙闪退问题 2019-12-01 14:27:44 +08:00
b8fd666e84 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2019-12-01 14:20:10 +08:00
fb6e3637de 修复引导图显示异常问题 2019-12-01 14:19:03 +08:00
2db519f9e0 去掉多余的时间戳后缀 2019-12-01 14:10:11 +08:00
f55aeaf3d4 20191201测试https://gitlab.ghzs.com/pm/halo-app-issues/issues/682 2019-12-01 11:59:49 +08:00
2340d4957b 视频上传存草稿/提交防抖 补充 2019-12-01 11:05:25 +08:00
7bed914a92 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2019-12-01 11:04:05 +08:00
4b9f86a4bb 修复首页MTA统计异常事件 2019-12-01 11:01:22 +08:00
a1844e15e1 Merge remote-tracking branch 'origin/dev' into dev 2019-12-01 10:39:40 +08:00
148589a6c5 完成光环助手v3.7.1测试汇总的第5点 https://gitlab.ghzs.com/pm/halo-app-issues/issues/711 2019-12-01 10:39:31 +08:00
2902a8b441 视频上传存草稿/提交防抖 2019-12-01 10:39:15 +08:00
b410016fae Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-12-01 10:23:05 +08:00
0d56448bfd 光环助手V3.7.1 DEV(20191129-1730)测试问题汇总(1.2.3) https://gitlab.ghzs.com/pm/halo-app-issues/issues/711 2019-12-01 10:22:55 +08:00
326c292572 评论详情徽章入口 2019-12-01 09:44:04 +08:00
afdaef1a64 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-29 18:27:35 +08:00
9bcd4b8e95 首页安利墙徽章入口 2019-11-29 18:27:30 +08:00
4d455f13b6 Merge remote-tracking branch 'origin/dev' into dev 2019-11-29 18:00:11 +08:00
94eea3aa90 完成光环助手v3.7.1测试汇总的第4点 https://gitlab.ghzs.com/pm/halo-app-issues/issues/711 2019-11-29 18:00:02 +08:00
b00f47dd99 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-29 17:07:49 +08:00
20a4427e08 修改徽章入口问题 2019-11-29 17:07:43 +08:00
3287f31e2c 修复安利墙异常 MTA 异常事件 2019-11-29 17:02:24 +08:00
fbb6b01585 完成对已安装游戏标记为玩过游戏弹窗的排重处理 https://gitlab.ghzs.com/pm/halo-app-issues/issues/696 2019-11-29 16:33:06 +08:00
f07d1b7257 去掉旧引导遮罩 https://gitlab.ghzs.com/pm/halo-app-issues/issues/708 2019-11-29 16:20:22 +08:00
45d2d958a2 客服消息支持跳转至游戏详情评论tab https://gitlab.ghzs.com/pm/halo-app-issues/issues/683 2019-11-29 15:49:13 +08:00
2ba2498f6b Merge remote-tracking branch 'origin/dev' into dev 2019-11-29 15:40:08 +08:00
d76dada9f8 调整安利墙列表标签样式 2019-11-29 15:39:59 +08:00
28b63ee21b Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-29 15:30:07 +08:00
90ea78eb39 首页相关标签颜色修改 2019-11-29 15:29:57 +08:00
0cda0e93f0 完成排行榜1129测试补充的第2点 https://gitlab.ghzs.com/pm/halo-app-issues/issues/699 2019-11-29 15:00:20 +08:00
2e0469f915 完成安利墙1128测试补充的 2~5 https://gitlab.ghzs.com/pm/halo-app-issues/issues/680 2019-11-29 14:43:15 +08:00
fdfbd23963 修改首页 bottom bar 图标 2019-11-29 10:13:36 +08:00
5f8b11f8e0 首页安利墙snap定位向右偏移4dp 2019-11-28 21:00:58 +08:00
a1df2f6ca6 首页UI调整 2019-11-28 20:34:58 +08:00
1d0d0e40de Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev
# Conflicts:
#	app/src/main/res/layout/fragment_main.xml
#	app/src/main/res/values/dimens.xml
2019-11-28 19:55:08 +08:00
b3e5144cea 修改首页底部控制台UI
板块推荐入口接入安利墙/开服表
2019-11-28 19:49:32 +08:00
aed74449b0 更换引导图 2019-11-28 18:24:54 +08:00
45dc231024 完成10月第四周优化(8~12, 14) https://gitlab.ghzs.com/pm/halo-app-issues/issues/685 2019-11-28 18:17:13 +08:00
c1a223f120 完成"排行榜"功能1128测试补充 https://gitlab.ghzs.com/pm/halo-app-issues/issues/699 2019-11-28 17:26:51 +08:00
4a926997aa Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-28 16:48:36 +08:00
ae764b95fb DefaultJsApi添加跳转登录页面方法 2019-11-28 16:48:29 +08:00
7bba3f8b4d 游戏评分徽章入口图标优化 2019-11-28 16:47:38 +08:00
b2ad804d3c 微调微信登录结构 2019-11-28 15:29:08 +08:00
c49fa5cd3d 修复游戏预约微信提醒服务1128测试问题 https://gitlab.ghzs.com/pm/halo-app-issues/issues/675 2019-11-28 15:11:06 +08:00
92b5e28675 1128测试问题10 11(1)https://gitlab.ghzs.com/pm/halo-app-issues/issues/695 2019-11-28 11:55:03 +08:00
4afa5f6bc6 调整我的光环-微信预约位置 2019-11-28 11:42:10 +08:00
fbdc31aa97 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2019-11-28 11:22:36 +08:00
4eedfadc22 启动速度优化 2019-11-28 11:21:33 +08:00
3432a6c39f 1128测试问题(10)https://gitlab.ghzs.com/pm/halo-app-issues/issues/695 2019-11-28 10:42:55 +08:00
7e7c2180ce 更换广点通帐号 https://gitlab.ghzs.com/pm/yunying/issues/893 2019-11-28 10:22:33 +08:00
0386446a00 游戏评论编辑去除空行 2019-11-28 10:03:51 +08:00
09853e4187 标记已玩过的数据后页面刷新 2019-11-28 10:02:57 +08:00
40020fa617 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-28 09:39:14 +08:00
cc68c15824 处理空指针闪退 2019-11-28 09:38:48 +08:00
7aa874a0e3 修改问题草稿显示规则(草稿存储以社区ID为唯一标识,同设备可跨账号使用) 2019-11-28 09:38:46 +08:00
8203e5b568 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-27 20:31:44 +08:00
4f54bca286 首页安利墙交互修改
首页轮播图UI修改
首页去除“xxx想玩”
2019-11-27 20:31:31 +08:00
087479325d 完成 20191126测试(4)https://gitlab.ghzs.com/pm/halo-app-issues/issues/682 2019-11-27 18:31:40 +08:00
357b2c2a60 完成 1127测试问题(1-7)https://gitlab.ghzs.com/pm/halo-app-issues/issues/696 2019-11-27 18:16:09 +08:00
e1918b56e2 DownloadProgressBar add slide style 2019-11-27 16:11:49 +08:00
1f31d1e614 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-27 15:43:15 +08:00
f5468c5f11 首页UI间距调整 2019-11-27 15:43:08 +08:00
672cf331ea 评论徽章入口修改 2019-11-27 15:21:37 +08:00
348ad0faed 徽章系统入口及MTA数据统计 2019-11-27 15:02:33 +08:00
ae742547d8 调整安利墙随机逻辑 2019-11-26 17:24:52 +08:00
ff1c01c836 游戏评分增加来源 2019-11-26 16:45:48 +08:00
a645a3c929 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-26 16:15:31 +08:00
37c590400e 修复首页推荐入口有可能出现的闪退问题
修复首页刷新时轮播图动画异常问题
2019-11-26 16:15:21 +08:00
785e2d8cf5 适配启动页在挖孔屏上的状态栏显示 2019-11-26 15:38:39 +08:00
03d25cb102 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-26 15:21:44 +08:00
869dd9ac11 启动页添加启动图标 2019-11-26 15:21:38 +08:00
f647e172bd 调整安利墙下拉刷新进度指示的位置 2019-11-26 15:18:49 +08:00
7069200c6e 更换设置微信提醒图标 2019-11-26 14:26:00 +08:00
c61cfcbed9 优化首页刷新问题
修复轮播图游戏名显示异常问题
2019-11-26 11:38:53 +08:00
67eddc99ef 修复 data 后台数据上报异常 2019-11-26 09:57:15 +08:00
03fd5aaf09 修复部分安利墙页面专题点击闪退问题 2019-11-25 21:04:34 +08:00
31a8f5e5c7 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-25 18:26:12 +08:00
b7c6460c0e 修改评论光标问题 2019-11-25 18:26:07 +08:00
538c096b8f 修复部分安利墙页面的页面显示问题 https://gitlab.ghzs.com/pm/halo-app-issues/issues/680 2019-11-25 18:13:59 +08:00
d05c738696 标记已安装游戏弹窗 2019-11-25 15:55:45 +08:00
976035da22 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-25 14:58:30 +08:00
d47fd51c7c 20191121测试(1,2)https://gitlab.ghzs.com/pm/halo-app-issues/issues/682 2019-11-25 14:58:20 +08:00
a047c65efd 适配后台游戏类型新增福利游戏 https://gitlab.ghzs.com/pm/halo-app-issues/issues/706 2019-11-25 09:12:53 +08:00
5bbb6b1c89 整理专题详情代码(删除用rows页面实现的排行榜代码) 2019-11-22 18:02:03 +08:00
95432cb591 修改首页下载按钮文案
修复首页刷新时可能会出现的闪退问题
2019-11-22 17:36:37 +08:00
04862e7f22 重新实现首页轮播图自动轮播逻辑 2019-11-22 17:16:29 +08:00
abafd0bb24 首页安利墙优化 2019-11-22 11:45:34 +08:00
aa83617796 专题排行榜 MTA数据统计 2019-11-21 18:14:02 +08:00
a5b8806997 重新实现专题排行榜 https://gitlab.ghzs.com/pm/halo-app-issues/issues/699 2019-11-21 17:53:55 +08:00
7a70c0158e Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-20 15:27:31 +08:00
74f5972874 修复首页断网刷新问题 2019-11-20 15:27:16 +08:00
b01a29d2e9 修改冲突 2019-11-20 12:17:15 +08:00
88bd0dc9f5 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev
# Conflicts:
#	app/src/main/res/layout/fragment_home.xml
2019-11-20 11:51:58 +08:00
c7b6d44874 对接个人主页徽章接口 2019-11-20 11:51:36 +08:00
8b6e01929b 完成 3.7.1 数据后台数据统计需求 https://gitlab.ghzs.com/pm/halo-app-issues/issues/706 2019-11-20 10:59:02 +08:00
2ecba00d2a 完成3.7.1 MTA数据统计需求 https://gitlab.ghzs.com/pm/halo-app-issues/issues/705 2019-11-20 10:18:02 +08:00
851fcaab13 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-19 17:37:49 +08:00
e1b9504421 修改安利墙游戏标签个数限制 2019-11-19 17:37:41 +08:00
247e8ed6cc 修复安利墙点赞数据刷新不及时的问题 2019-11-19 16:47:57 +08:00
996d1be136 拆分首页横向专题(补充) 2019-11-19 16:25:49 +08:00
a249d4d572 拆分首页横向专题 2019-11-19 16:16:39 +08:00
c91d52d753 优化自动轮播问题 2019-11-19 15:26:39 +08:00
0c37db444a 光环前端优化汇总(2019年10月第4周)(13.15)https://gitlab.ghzs.com/pm/halo-app-issues/issues/685 2019-11-19 10:02:58 +08:00
eb93f1d915 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-18 21:17:53 +08:00
74e6c9b145 轮播图,触控到轮播区域暂停自动轮播
双击底部导航栏时相关列表自动回到顶部
2019-11-18 21:17:47 +08:00
f15e630fd1 网络错误统计过滤初始化请求 2019-11-18 17:23:58 +08:00
01ee84caa8 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-18 16:22:57 +08:00
311a1916d1 搜索工具栏修改 2019-11-18 16:22:50 +08:00
ae43ae1b97 修复安利墙嵌套专题导致顶部图片不跟随滑动的问题 2019-11-18 15:45:18 +08:00
d9814bbb1f 正式环境接口切换至 3.7.1 2019-11-18 11:17:26 +08:00
dba8abacf2 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-15 18:44:57 +08:00
3ee1474535 删除游戏模块原首页相关代码
光环助手V3.7.1-新增游戏库入口管理 https://gitlab.ghzs.com/pm/halo-app-issues/issues/697
2019-11-15 18:44:46 +08:00
8481e923ee 修改 EllipsizeTextView 2019-11-15 18:27:42 +08:00
53cfb0f078 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-15 18:22:23 +08:00
233277f6e8 TextView using Spannable,ellipsize doesn't work 2019-11-15 18:21:55 +08:00
dbd75cb513 光环前端优化汇总(2019年11月第3周)(21) https://gitlab.ghzs.com/pm/halo-app-issues/issues/703 2019-11-15 18:21:02 +08:00
bae14a54a1 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-15 17:26:56 +08:00
9c48afca77 提问草稿规则优化 2019-11-15 17:26:46 +08:00
54ebc460fa 修复微博登录失效的问题 2019-11-15 17:24:50 +08:00
901e9a39f9 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-15 17:16:13 +08:00
2ebd12c6db 主题颜色撤回更改 2019-11-15 17:16:05 +08:00
c762529b8b 更换主题颜色 2019-11-15 16:59:36 +08:00
3c371038cf 完成安利墙的旧首页功能 https://gitlab.ghzs.com/pm/halo-app-issues/issues/680 2019-11-15 16:49:46 +08:00
0350c19c81 分离新首页的旧首页部分 2019-11-15 16:49:15 +08:00
ebace67201 提问问题增加草稿功能 2019-11-15 16:31:20 +08:00
cbe6e2e3bd 光环助手V3.7.1-隐藏评分支持修改(完成) https://gitlab.ghzs.com/pm/halo-app-issues/issues/687 2019-11-15 11:16:48 +08:00
4adefc885b 首页大图游戏设置随机占位符 2019-11-15 09:58:05 +08:00
cade2882e4 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-14 16:52:01 +08:00
8c0f2fd527 补全首页相关的MTA统计 2019-11-14 16:51:53 +08:00
56809d8d66 光环前端优化汇总(2019年11月第3周)(20)https://gitlab.ghzs.com/pm/halo-app-issues/issues/703 2019-11-14 15:54:55 +08:00
14772494be 完成11月第三周测试汇总的 3,4,6,7,8,9 https://gitlab.ghzs.com/pm/halo-app-issues/issues/703 2019-11-14 11:22:49 +08:00
4bbec7344f 首页轮播图增加轮播定时器以及修改相关间距 2019-11-14 10:04:48 +08:00
9907863ef5 首页专题的一些回调由接口改为闭包 2019-11-13 17:33:17 +08:00
adfbe36fdf 调整首页专题合集回调结构 2019-11-13 17:09:28 +08:00
3cfb9ac1c3 完成首页相关的跳转以及部分MTA统计 2019-11-13 17:05:45 +08:00
2004b85a12 完成首页相关的跳转以及部分MTA统计 2019-11-13 17:00:59 +08:00
7dd3b5f122 完成新增"排行榜"功能 https://gitlab.ghzs.com/pm/halo-app-issues/issues/699 2019-11-13 16:31:49 +08:00
c849746a6f 光环助手V3.7.1-个人主页改版(第二期)MTA数据统计 2019-11-13 15:52:50 +08:00
a9582bc295 光环前端优化汇总(2019年11月第3周)(19)https://gitlab.ghzs.com/pm/halo-app-issues/issues/703 2019-11-13 15:06:07 +08:00
fd49defe00 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-13 11:43:12 +08:00
650a24775a 首页新增样式添加下载监听 2019-11-13 11:43:00 +08:00
b62a864a7d 添加安利墙评价内容标签 2019-11-13 09:53:26 +08:00
b76e10bdfc Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-12 18:41:17 +08:00
4311205e62 光环前端优化汇总(2019年11月第3周)(11-18) https://gitlab.ghzs.com/pm/halo-app-issues/issues/703 2019-11-12 18:41:12 +08:00
69bc1c971d 首页游戏部分Item的实现抽离到相应的ViewHolder 2019-11-12 17:39:38 +08:00
f13c720bcc 3.7.0-splash tinker base 2019-11-12 16:21:00 +08:00
63f66e9714 更换引导图 2019-11-12 16:14:54 +08:00
25d8ed079c Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-12 16:05:03 +08:00
b923714b42 首页接入专题相关的下载监听 2019-11-12 16:04:54 +08:00
178295596a Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-12 14:06:20 +08:00
2e1dae86e0 MTA数据统计 2019-11-12 14:05:08 +08:00
4bb0206d2d 完成安利墙假置顶 https://gitlab.ghzs.com/pm/halo-app-issues/issues/680 2019-11-12 11:07:38 +08:00
23cda9c121 调整个人主页命名避免撞车 2019-11-12 11:06:17 +08:00
a1d0b59e28 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-11 19:40:31 +08:00
9de8e61b1b 新版首页兼容专题/插件化以及相关部分数据补全 2019-11-11 19:40:18 +08:00
be1188e8e4 安利墙列表更换数据结构 2019-11-11 18:41:43 +08:00
fdaefa52ab 补充安利墙搜索内容为空时的样式 https://gitlab.ghzs.com/pm/halo-app-issues/issues/680 2019-11-11 18:25:11 +08:00
d667e70b90 完成部分安利墙搜索功能 https://gitlab.ghzs.com/pm/halo-app-issues/issues/680 2019-11-11 17:45:27 +08:00
6184acc144 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-08 18:21:28 +08:00
6f012dc459 标记已玩过弹窗 2019-11-08 18:21:23 +08:00
94774c674a 首页游戏部分Item的实现抽离到相应的ViewHolder 2019-11-08 17:46:30 +08:00
3bda3354f0 3.7.0-servers_reverse-https tinker base 2019-11-08 15:52:45 +08:00
8a56459375 data host 由http改为https 2019-11-08 15:47:35 +08:00
aeb689648f Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev
# Conflicts:
#	app/src/main/res/values/colors.xml
2019-11-08 15:34:45 +08:00
761d4c3354 完成部分新版首页 https://gitlab.ghzs.com/pm/halo-app-issues/issues/678 2019-11-08 15:33:15 +08:00
90899e7d1f 整理 SearchActivity 代码 2019-11-08 11:10:52 +08:00
9e9d8b7149 引入 core-ktx 依赖 2019-11-08 11:09:31 +08:00
f774df532c 调整游戏详情页部分样式(细节待微调) https://gitlab.ghzs.com/pm/halo-app-issues/issues/685 2019-11-07 16:58:19 +08:00
d85c4533b7 完成简单的安利墙列表(暂缺首页专题) https://gitlab.ghzs.com/pm/halo-app-issues/issues/680 2019-11-07 16:56:46 +08:00
79aeca832a 更新版本至 3.7.1 2019-11-07 11:00:48 +08:00
50931b1fb6 修改删除评论崩溃 2019-11-07 09:42:46 +08:00
63bd0cdebb Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-06 18:01:19 +08:00
8880d381db 完成光环助手V3.7.1-游戏详情评分优化(前端)https://gitlab.ghzs.com/pm/halo-app-issues/issues/682 2019-11-06 18:00:52 +08:00
4eccd3b2ac Merge remote-tracking branch 'origin/dev' into dev 2019-11-05 17:22:16 +08:00
716ba77d3e 完善微信绑定 2019-11-05 17:22:00 +08:00
4053eec64c Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-05 16:57:36 +08:00
b11463b0f7 首页游戏,用recyclerView重新实现纵向滑动样式 2019-11-05 16:57:28 +08:00
109ada8e8b data 数据接口切换至 https 2019-11-05 16:49:03 +08:00
ab32670b40 3.7.0-servers_reverse tinker base 2019-11-05 10:50:58 +08:00
92f82099b5 总开服表开服/开测页面置换 2019-11-05 10:29:57 +08:00
e41b7434c9 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-11-05 09:39:51 +08:00
9c79df6d6e 增加方法让内嵌网页知道是否处于测试环境 2019-11-04 18:18:39 +08:00
fe1f491104 Merge branch 'dev_3.7.1' into 'dev'
Dev 3.7.1

See merge request !8
2019-11-04 18:09:53 +08:00
652bdf9f1d 对接修改评论接口、取消游戏评论点赞 2019-11-04 17:30:49 +08:00
36b13d6d28 游戏评分取消点赞 2019-11-01 15:08:24 +08:00
53b58b63a2 主题修改 2019-11-01 10:51:40 +08:00
6b0f298a2d 移除由引导页进去主页的延迟操作 2019-10-31 18:18:04 +08:00
08bc8bc49e 补充提交遗漏文件 2019-10-31 12:12:23 +08:00
c8b436de94 Merge remote-tracking branch 'origin/dev_3.7.1' into dev_3.7.1 2019-10-31 11:51:00 +08:00
82b6323f72 补充提交遗漏代码 2019-10-31 11:50:49 +08:00
6664bc9e62 fix build error 2019-10-31 11:47:08 +08:00
544dc67d0d Merge branch 'dev_3.7.1' of gitlab.ghzs.com:halo/assistant-android into dev_3.7.1 2019-10-31 11:41:04 +08:00
d55c4d12bc Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev_3.7.1
# Conflicts:
#	app/src/main/AndroidManifest.xml
#	app/src/main/java/com/gh/base/ToolBarActivity.java
2019-10-31 11:40:54 +08:00
707bc9bb1a ToolBarActivity和BaseActivity层级更换
设置启动默认闪屏图片(却缺失启动图片,待完成),防止启动时长时间处于无响应状态
2019-10-31 11:34:35 +08:00
41806eab54 基本完成游戏预约微信提醒服务的 APP 部分 https://gitlab.ghzs.com/pm/halo-app-issues/issues/675 2019-10-31 11:12:05 +08:00
443c3bf26a 测试环境接口切换至 3.7.1 2019-10-31 11:09:11 +08:00
7ac6e82624 内嵌网页新增绑定微信类型 2019-10-31 09:54:18 +08:00
87106de6d6 提供更多的 API 供内嵌网页调用 2019-10-30 18:17:18 +08:00
c52d94b003 Merge branch 'dev_3.7.1' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-30 16:55:37 +08:00
5ac13f2107 调整QQ,微博和微信等第三方登录相关的代码结构 2019-10-30 16:50:48 +08:00
baa22ae9c9 3.7.0 tinker base 2019-10-30 16:39:42 +08:00
dba3854e40 设置 largeHeap=true 以分配尽量大的内存预防OOM 2019-10-30 16:16:02 +08:00
1f06810592 修复游戏详情页 toolbar 滑动造成的 卡顿/OOM 问题 2019-10-30 16:00:16 +08:00
2861e8cfee 修复专题合集分页问题 2019-10-30 14:03:02 +08:00
9269548d64 V3.7.1游戏详情评分优化UI 2019-10-30 11:59:06 +08:00
712399e9da 3.7.0 tinker base 2019-10-29 18:07:15 +08:00
1654d36126 工具箱顶部返回按钮调整为点击关闭页面 https://gitlab.ghzs.com/pm/halo-app-issues/issues/686 2019-10-29 10:55:00 +08:00
245e113d76 修复视频相关分页问题 2019-10-28 18:12:13 +08:00
8b35993e99 修复纵向专题存在头图时显示异常问题 2019-10-28 16:00:36 +08:00
3dcaf7b50e 修改视频合集UI 2019-10-25 17:19:56 +08:00
58d4b5e612 列表刷新问题 2019-10-25 16:34:14 +08:00
caf0852f28 修改首页游戏/板块的列表刷新方式(防止列表刷新抖动)
部分页面捕获由于列表刷新导致的闪退问题
2019-10-25 16:19:02 +08:00
558fe249ac Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-25 11:50:26 +08:00
20b0c83fc0 首页社区引导提示UI适配 2019-10-25 11:50:19 +08:00
0c3020f7b3 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-25 11:39:51 +08:00
fce10714ae 20191025测试补充 3 https://gitlab.ghzs.com/pm/halo-app-issues/issues/674 2019-10-25 11:39:43 +08:00
8055856dd7 修复个人主页某些区域无法滑动的问题 2019-10-25 10:04:46 +08:00
a8c540f122 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-25 09:49:12 +08:00
ccf117656a 横向游戏列表的游戏名称换行时自动补全 2019-10-25 09:49:06 +08:00
6b5cf36957 修复应用内网页跳转闪退的问题 2019-10-24 18:23:00 +08:00
201f0317a2 修复 MTA 字段统计问题 2019-10-24 18:15:32 +08:00
ea9bb99afa 完成3.7.0(1022测试汇总)(11~14) https://gitlab.ghzs.com/pm/halo-app-issues/issues/674 2019-10-24 18:11:31 +08:00
51609dea83 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-24 18:07:36 +08:00
d9788434f3 修改bufferPoint的问题、游戏详情页面图标 2019-10-24 18:07:31 +08:00
b0d433b5c8 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-24 15:30:47 +08:00
df3dd297c1 光环助手V3.7.0 RELEASE(20191022-1830)测试汇总(7.8.9.10.15) https://gitlab.ghzs.com/pm/halo-app-issues/issues/674 2019-10-24 15:30:39 +08:00
1a9ee5e3cb Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-24 10:35:45 +08:00
a22da040e0 光环助手V3.7.0 RELEASE(20191022-1830)测试汇总(3,4,5) https://gitlab.ghzs.com/pm/halo-app-issues/issues/674 2019-10-24 10:35:39 +08:00
4c0ee93826 修复 MTA 视频播放统计问题 2019-10-24 10:24:03 +08:00
759a22fc52 修复 chucker 返回体没有格式化的问题 2019-10-24 09:15:30 +08:00
066b667bd8 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-23 17:48:35 +08:00
91e5e4f53b 链接跳转如果没有目标页面,则默认跳转至首页 2019-10-23 17:48:27 +08:00
7cfd1a9c7d 修改视频播放布局 2019-10-23 15:54:55 +08:00
ed78421d9b 修改视频播放布局 2019-10-23 15:42:01 +08:00
0e85be5dc6 视频详情播放优化 2019-10-23 14:51:49 +08:00
23721ad189 视频上传,视频类型使用真实的视频类型(使用MimeType获取) 2019-10-22 18:24:28 +08:00
50c7f6514e 弹窗偏移 2019-10-22 17:27:41 +08:00
7818370d7e Merge remote-tracking branch 'origin/dev' into dev 2019-10-21 23:49:51 +08:00
2f05256103 播放完立马刷新游戏详情顶部视频封面图 2019-10-21 23:49:34 +08:00
ed1dc14bc5 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-21 23:40:26 +08:00
ae2b0e9d7e 修改视频上传文案 2019-10-21 23:39:11 +08:00
b9d23115c6 还原启动页的权限申请 2019-10-21 23:33:24 +08:00
c72da10e56 修复游戏详情页顶部视频全屏播放完以后没有封面图的问题,修复游戏详情顶部视频无网络有缓存时会弹错误toast的问题 2019-10-21 23:19:51 +08:00
a4f4b0c3f9 视频投稿优化 2019-10-21 22:54:32 +08:00
5c0a51be73 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2019-10-21 22:52:51 +08:00
069b6d7df6 上传优化 2019-10-21 22:51:31 +08:00
fea7aee20b Merge remote-tracking branch 'origin/dev' into dev 2019-10-21 22:44:58 +08:00
26dd26d7c0 修复资讯文章评论内容点击效果失效的问题 2019-10-21 22:44:48 +08:00
4e06147b82 去除toast生命周期限制 2019-10-21 22:16:52 +08:00
1065abcd44 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-21 22:06:52 +08:00
cf5e40788b 视频上传修改toast文案 2019-10-21 22:06:43 +08:00
93ff2651c4 Merge remote-tracking branch 'origin/dev' into dev 2019-10-21 21:49:50 +08:00
de9689c1a2 webview 支持 scheme 为 ghzhushou 的超链接 2019-10-21 21:49:40 +08:00
24379be99d Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-21 21:25:08 +08:00
75bec6e967 光环助手V3.7.0 RELEASE(20191021-1000)视频测试汇总 (1.2.3.4.5.12.13.14.15) https://gitlab.ghzs.com/pm/halo-app-issues/issues/672 2019-10-21 21:24:56 +08:00
c3eb5f8d08 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-21 21:24:34 +08:00
13c1866fa2 点击评论内容无反应 2019-10-21 21:24:29 +08:00
4ab8a5b7bb 微调 UI 2019-10-21 21:22:00 +08:00
821434bd7c 光环助手V3.7.0 DEV(20191021-0955)前端测试汇总(5,10)https://gitlab.ghzs.com/pm/halo-app-issues/issues/673 2019-10-21 21:20:09 +08:00
ab3d29d449 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-21 20:37:12 +08:00
1ee5a1d110 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailFragment.kt
2019-10-21 20:37:07 +08:00
19910ab0a8 调整分享视频的图片尺寸 https://gitlab.ghzs.com/pm/halo-app-issues/issues/672 2019-10-21 20:36:31 +08:00
727f513431 光环助手V3.7.0 DEV(20191019-1830)视频测试汇总(3,5,6) https://gitlab.ghzs.com/pm/halo-app-issues/issues/671 2019-10-21 20:35:43 +08:00
5eac22f0be 修复游戏详情页多次进入/退出全屏以后出现的异常问题 2019-10-21 20:34:16 +08:00
360efccf4c Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-21 19:38:09 +08:00
57ac0a0bb9 社区选择图片页面只显示图片内容
开服表优化
2019-10-21 19:38:03 +08:00
80c2e34460 调整开服表曝光的来源 2019-10-21 18:09:46 +08:00
78e652ea27 Merge remote-tracking branch 'origin/dev' into dev 2019-10-21 17:49:35 +08:00
fc7d36ac22 补充3.7.0 MTA遗漏事件 https://gitlab.ghzs.com/pm/halo-app-issues/issues/660 2019-10-21 17:49:26 +08:00
1a4e4fedb6 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-21 17:38:13 +08:00
5ff7c58503 光环助手V3.7.0 DEV(20191019-1830)视频测试汇总(12) https://gitlab.ghzs.com/pm/halo-app-issues/issues/671 2019-10-21 17:38:08 +08:00
25488e9100 完成开服表的 MTA 统计 https://gitlab.ghzs.com/pm/halo-app-issues/issues/660 2019-10-21 17:35:12 +08:00
d4bf86f717 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-21 17:28:44 +08:00
1cd463968e 视频上传相关优化 2019-10-21 17:28:37 +08:00
6388941e81 完成3.7.0(1019测试汇总)(1~2, 17~19, 23~27) https://gitlab.ghzs.com/pm/halo-app-issues/issues/671 2019-10-21 16:54:39 +08:00
48dd87ce26 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-21 16:42:41 +08:00
76643aae59 光环助手V3.7.0 DEV(20191019-1820)前端测试汇总(2.3.4.5.6.7.13.14)https://gitlab.ghzs.com/pm/halo-app-issues/issues/670 2019-10-21 16:42:24 +08:00
86c9c077bf 3.7.0 DEV(20191019-1830)(4、7-11、13-16、29)https://gitlab.ghzs.com/pm/halo-app-issues/issues/671 2019-10-21 16:37:01 +08:00
6510e620ba 完成3.7.0(1820测试汇总)(9,10,16~18) https://gitlab.ghzs.com/pm/halo-app-issues/issues/670 2019-10-21 12:35:17 +08:00
7d2149ad23 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-21 10:50:13 +08:00
87b3c35ba2 视频详情缓存失败,点重试视频从失败位置播放 2019-10-21 10:50:08 +08:00
f7fdadd4f4 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-20 17:47:15 +08:00
d6ef599b08 光环助手V3.7.0 DEV(20191017-2125)前端测试汇总(7.8.9) https://gitlab.ghzs.com/pm/halo-app-issues/issues/669 2019-10-20 17:47:06 +08:00
4b7a5ad049 视频详情游戏信息逻辑修改 2019-10-20 16:18:52 +08:00
6f3ad4bec4 游戏详情开服表相关修改 2019-10-20 14:46:16 +08:00
87047fe38d 光环助手V3.7.0 DEV(20191017-2125)前端测试汇总(12、13)https://gitlab.ghzs.com/pm/halo-app-issues/issues/669 2019-10-20 10:28:44 +08:00
5627cd9ca2 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/kaifu/refactor/GameServersContentFragment.java
2019-10-20 10:14:06 +08:00
0bfab3ba9c 删除总开服表旧代码
总开服表增加时间栏悬挂
2019-10-20 10:12:29 +08:00
10b692bb2b 曝光区分开测表和开服表 2019-10-19 18:22:24 +08:00
663c415a57 调整隐私弹窗样式 2019-10-19 18:03:11 +08:00
5f60126333 完成MTA数据统计需求(1019测试问题) https://gitlab.ghzs.com/pm/halo-app-issues/issues/660 2019-10-19 17:04:29 +08:00
986b99479d 完成光环助手3.7.0(1017测试汇总)(1~2, 17~19) https://gitlab.ghzs.com/pm/halo-app-issues/issues/669 2019-10-19 16:33:50 +08:00
cbbf4b71c2 完成权限弹窗优化(三) https://gitlab.ghzs.com/pm/halo-app-issues/issues/668 2019-10-19 11:49:21 +08:00
4398bea8d4 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-18 18:30:18 +08:00
e85ac755ae 光环助手V3.7.0 DEV(20191015-1100)视频测试汇总(20)https://gitlab.ghzs.com/pm/halo-app-issues/issues/666 2019-10-18 18:30:12 +08:00
fa2f91cb24 捕获空指针异常 2019-10-18 18:27:43 +08:00
ff30c8d288 修复游戏详情页页面重建会闪退的问题 2019-10-18 18:17:55 +08:00
fd5807d404 社区用户引导提示UI修改 2019-10-18 17:46:01 +08:00
719133a636 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-18 17:33:18 +08:00
5650f65214 光环助手V3.7.0 DEV(20191015-1100)视频测试汇总1(18.22)https://gitlab.ghzs.com/pm/halo-app-issues/issues/667 2019-10-18 17:33:12 +08:00
7bc4c8e661 Base64 图片增加保存后缀 2019-10-18 14:53:38 +08:00
48c7d94edc Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-18 11:38:09 +08:00
2d63db64b2 光环助手V3.7.0 DEV(20191015-1100)视频测试汇总(9-17)https://gitlab.ghzs.com/pm/halo-app-issues/issues/667 2019-10-18 11:38:04 +08:00
3a26750e15 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-18 11:23:34 +08:00
517bd63ac0 光环助手V3.7.0 DEV(20191015-1100)视频测试汇总1(1.2.3.4.5.6.7.8)https://gitlab.ghzs.com/pm/halo-app-issues/issues/667 2019-10-18 11:23:28 +08:00
ef77fca3bb 修复消息中心的闪退问题 2019-10-18 11:11:32 +08:00
dde7ed096a 查看图片支持 BASE64 图片 2019-10-18 10:59:13 +08:00
834db84d43 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-17 21:02:58 +08:00
93e81879fd 光环助手V3.7.0 DEV(20191015-1100)视频测试汇总1(20.21.23.24.25)https://gitlab.ghzs.com/pm/halo-app-issues/issues/667 2019-10-17 21:02:47 +08:00
9263805bb4 隐藏我的关注和我的预约的游戏大小 2019-10-17 21:01:44 +08:00
5467df5850 完成视频测试汇总(18, 19) https://gitlab.ghzs.com/pm/halo-app-issues/issues/666 2019-10-17 20:38:33 +08:00
02836a2dee 修复覆盖安装问题 2019-10-17 19:29:37 +08:00
9747ff1056 修复覆盖安装闪退问题 2019-10-17 18:25:50 +08:00
ce38932e86 光环助手V3.7.0 DEV(20191015-1100)视频测试汇总(一、二)https://gitlab.ghzs.com/pm/halo-app-issues/issues/666 2019-10-17 18:17:19 +08:00
fc76d98fbc 修复撰写社区文章无法显示默认标签问题 2019-10-17 15:25:16 +08:00
4a4f1b86df Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev
# Conflicts:
#	app/src/main/java/com/gh/common/util/ErrorHelper.kt
2019-10-17 15:05:24 +08:00
6f75f212b8 修复由于禁言数据always_block字段缺失造成的闪退问题 2019-10-17 15:03:45 +08:00
1051d46a79 完成视频详情汇总(16, 17) https://gitlab.ghzs.com/pm/halo-app-issues/issues/666 2019-10-17 14:50:12 +08:00
41bb08d899 处理闪退问题 2019-10-17 11:50:08 +08:00
afef9847b1 处理一些闪退问题 2019-10-17 11:28:58 +08:00
2fe83bcf14 新增供 HTML5 调用的方法 2019-10-17 11:03:11 +08:00
8529980040 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-17 10:30:16 +08:00
fbf11eff3d 修改首页专题UI 2019-10-17 10:30:06 +08:00
1d0e8505f6 适配首页/板块的竖屏滑动专题的曝光统计 2019-10-15 18:26:10 +08:00
332f63e823 调整文案 2019-10-15 18:25:15 +08:00
f5062d554e 修复首页游戏多个竖屏滑动专题闪退问题
竖屏滑动专题适配头图
2019-10-15 17:31:24 +08:00
5d6f3f249b Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-15 14:23:56 +08:00
f6e524ca14 数据库AnswerEntity表增加字段 2019-10-15 14:23:50 +08:00
f5768ee8ae 完成我的游戏-玩过&关注&预约页面优化(20191014测试) https://gitlab.ghzs.com/pm/halo-app-issues/issues/612 2019-10-15 14:22:20 +08:00
53df43b5a8 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-15 14:17:35 +08:00
817004f96d 开服表修改 2019-10-15 14:17:27 +08:00
e54262a320 调整跳转至视频详情的视频列表排序 2019-10-15 11:52:34 +08:00
26ab8355fd 修改游戏上传协议文案 2019-10-15 11:06:10 +08:00
633b5532e2 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/qa/answer/detail/AnswerDetailFragment.kt
#	app/src/main/java/com/gh/gamecenter/qa/article/detail/ArticleDetailActivity.kt
2019-10-15 10:19:44 +08:00
68809149c5 光环助手V3.7.0-游戏视频功能-前端5(问答相关)(20191014测试汇总(1.2.4.5))https://gitlab.ghzs.com/pm/halo-app-issues/issues/626 2019-10-15 10:16:27 +08:00
5d8d65f5b5 捕抓空指针异常 2019-10-15 09:44:27 +08:00
d29122af52 完成 Loghub 进入问答上报 https://gitlab.ghzs.com/pm/halo-app-issues/issues/661 2019-10-14 20:57:04 +08:00
53898a0465 调整评论详情关闭下载的按钮UI 2019-10-14 20:41:44 +08:00
9038a41301 微调个人主页UI https://gitlab.ghzs.com/pm/halo-app-issues/issues/640 2019-10-14 20:08:17 +08:00
52349dc043 完成3.7数据统计需求(MTA) https://gitlab.ghzs.com/pm/halo-app-issues/issues/660 2019-10-14 19:59:57 +08:00
26eca76036 问答社区首页UI优化 (1014测试问题)https://gitlab.ghzs.com/pm/halo-app-issues/issues/610 2019-10-14 17:42:25 +08:00
7deb934b5a Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-14 17:05:33 +08:00
b8e02f1ab9 update LGLibrary version 2019-10-14 17:04:56 +08:00
07b2cf3d95 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-14 16:54:36 +08:00
0f06b1e401 修改游戏介绍文字 2019-10-14 16:54:28 +08:00
432553d90b Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-14 16:51:36 +08:00
8a51187f01 修复问答-选择问答专区 游戏名字 和 “当前选择” 显示异常问题 2019-10-14 16:51:27 +08:00
c63a1a1fd2 光环前端优化汇总(2019年10月第3周)(2~4,7~10) https://gitlab.ghzs.com/pm/halo-app-issues/issues/664 2019-10-14 16:49:52 +08:00
ab03b4d88e Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-14 16:47:29 +08:00
bcce233795 光环助手V3.7.0-开服表功能优化(20191014测试) https://gitlab.ghzs.com/pm/halo-app-issues/issues/628 2019-10-14 16:47:19 +08:00
fe77112ca6 修改反射获取bufferPoint导致的NoSuchFieldException问题 2019-10-14 14:17:21 +08:00
e3a4dbbbb3 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/qa/all/AskAllFragment.kt
2019-10-14 10:12:16 +08:00
4a19e7beed 社区相关UI修改 2019-10-14 10:09:07 +08:00
6b6ed81c4a 升级gsyVideo、解决视频详情不能播放问题 2019-10-14 09:56:02 +08:00
d69717d08d Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-10-14 09:34:27 +08:00
e8e43a28d2 完成部分3.7数据统计需求(MTA)(7~10) https://gitlab.ghzs.com/pm/halo-app-issues/issues/660 2019-10-14 09:33:47 +08:00
03a89a1553 完成部分视频测试汇总(游戏详情)(7~10) https://gitlab.ghzs.com/pm/halo-app-issues/issues/660 2019-10-12 18:29:02 +08:00
71eb06ba2c 修改缓冲未完成循环播放问题 2019-10-12 18:00:27 +08:00
4e7a73a450 光环助手V3.7.0-开服表功能优化(20191012测试)https://gitlab.ghzs.com/pm/halo-app-issues/issues/628 2019-10-12 17:42:02 +08:00
a893303517 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-12 15:42:44 +08:00
4ccb5fe7f2 对接社区文章详情和回答详情的视频跳转 2019-10-12 15:42:32 +08:00
21f3ff57bc Merge remote-tracking branch 'origin/dev' into dev 2019-10-12 14:38:36 +08:00
d07d743de9 用户评分点击游戏跳转到游戏详情不再锁定评论tab https://gitlab.ghzs.com/pm/halo-app-issues/issues/650 2019-10-12 14:38:23 +08:00
6c41b1cb9f Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-12 11:24:01 +08:00
1d5206fa8d 光环助手V3.7.0 DEV(20190927-1830)视频详情(测试汇总)(6、7)https://gitlab.ghzs.com/pm/halo-app-issues/issues/659#note_30652 2019-10-12 11:23:54 +08:00
d2d7a84446 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-10-12 09:36:52 +08:00
91218c90fb 调整文案 2019-10-12 09:36:39 +08:00
1db3872cbb Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-12 09:36:21 +08:00
766aca3708 撰写文章文案修改 2019-10-12 09:36:09 +08:00
04a05a4017 完成部分3.7数据统计需求(MTA)(1~6) https://gitlab.ghzs.com/pm/halo-app-issues/issues/660 2019-10-11 18:25:41 +08:00
a46cee919f 完成个人主页改版(第一期)(1011测试问题) https://gitlab.ghzs.com/pm/halo-app-issues/issues/640 2019-10-11 18:18:31 +08:00
f2877e36a6 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-11 17:04:05 +08:00
c8056c5ba9 调整 选择问答专区
UI
2019-10-11 17:03:54 +08:00
1eb95269e8 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-11 16:31:14 +08:00
23906131ec 光环助手V3.7.0 DEV(20190927-1830)视频详情(测试汇总)(5、8、9、10-15)https://gitlab.ghzs.com/pm/halo-app-issues/issues/659 2019-10-11 16:31:09 +08:00
23ca0bfb6f Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-11 16:29:34 +08:00
8c055620d0 光环助手V3.7.0-开服表功能优化(20191011测试) https://gitlab.ghzs.com/pm/halo-app-issues/issues/628 2019-10-11 16:29:29 +08:00
ead2d66295 更改个人主页和游戏详情-评论的展开选项按钮状态 https://gitlab.ghzs.com/pm/halo-app-issues/issues/640 2019-10-11 11:48:10 +08:00
39b9cce4d8 完成视频测试汇总(游戏详情)(9~18) https://gitlab.ghzs.com/pm/halo-app-issues/issues/662 2019-10-11 11:09:29 +08:00
3567909675 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-11 10:32:50 +08:00
d79cc1499f 修复提交视频后无法及时刷新草稿箱问题 2019-10-11 10:32:39 +08:00
9674515171 完成我的游戏-玩过&关注&预约页面优化 20191010测试 https://gitlab.ghzs.com/pm/halo-app-issues/issues/612 2019-10-10 18:29:20 +08:00
2ee39c249c 视频专题优化 2019-10-10 18:09:57 +08:00
2ae6829a65 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-10 17:40:41 +08:00
9c9fb54932 跳转社区问答专区UI 2019-10-10 17:40:27 +08:00
713cb287bb 修改竖直滚动播放视频 2019-10-10 16:20:15 +08:00
b47805cbbf 竖直滚动播放视频 2019-10-10 15:26:35 +08:00
6aa5c7cd74 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/video/detail/VideoDetailContainerFragment.kt
2019-10-10 11:48:23 +08:00
97da1506dd 竖直滚动播放视频 2019-10-10 11:44:35 +08:00
ed193f99a4 修复视频详情的一些显示问题 2019-10-10 11:38:48 +08:00
96f86ff0eb 微调社区搜索UI 2019-10-09 18:27:00 +08:00
f2bcb18688 社区搜索适配视频缩略图 2019-10-09 18:06:06 +08:00
b5f7d78a26 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-09 17:14:55 +08:00
08cdab0f50 光环助手V3.7.0-游戏详情评论优化(20191009测试汇总:3.4.5.6.7) https://gitlab.ghzs.com/pm/halo-app-issues/issues/634 2019-10-09 17:14:38 +08:00
2a2f5b089d 修改20191008测试bug https://gitlab.ghzs.com/pm/halo-app-issues/issues/652 2019-10-09 17:06:55 +08:00
a21ceabfdf 微调个人主页UI 2019-10-09 17:02:15 +08:00
fe4dc13b84 完成3.7.0前端优化汇总(2019年9月第3周)(5,6) https://gitlab.ghzs.com/pm/halo-app-issues/issues/650 2019-10-09 16:51:46 +08:00
70730e8628 基本完成光环助手V3.7.0-个人主页改版(第一期) https://gitlab.ghzs.com/pm/halo-app-issues/issues/640 2019-10-09 16:04:20 +08:00
adceb92796 tabIndicator 支持自定义颜色 2019-10-09 14:31:16 +08:00
55336f6be4 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-08 16:43:43 +08:00
25663d114a fix window.NativeCallBack.isNativeBuildDebug not function 2019-10-08 16:43:24 +08:00
d80592fbb7 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-08 15:47:36 +08:00
7fab331b90 光环助手V3.7.0-问答社区相关(9-12) 2019-10-08 15:46:17 +08:00
6c5c43d595 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-10-08 15:18:06 +08:00
1b49aaa6fc 微调视频相关UI/字体颜色 2019-10-08 15:17:54 +08:00
ed1725f9cc 光环助手V3.7.0-问答社区相关(13) 2019-10-08 11:21:37 +08:00
8d5cc4e983 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev
# Conflicts:
#	app/src/main/res/values/colors.xml
2019-10-08 10:14:19 +08:00
8a03017ccd 问题/回答/文章详情页面标题靠左 2019-10-08 10:14:01 +08:00
884d5d81f9 视频上传添加失败重试操作 2019-10-07 17:58:24 +08:00
95be563b43 光环助手V3.7.0 DEV(20190918-1830)视频上传(测试汇总)(2.3.7.8.9.10.11.13.15.16.18.19.20.21) https://gitlab.ghzs.com/pm/halo-app-issues/issues/657 2019-10-07 16:09:03 +08:00
6ae6a4e14a 光环助手V3.7.0-游戏视频功能-前端5(问答相关)(2)https://gitlab.ghzs.com/pm/halo-app-issues/issues/626 2019-10-06 17:35:06 +08:00
9b069a97d1 修改游戏评论“精彩评论”显示规则
修复游戏评论回复点赞消息中心红点显示异常问题
2019-10-06 10:31:57 +08:00
25f217217d Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev
# Conflicts:
#	app/src/main/res/values/colors.xml
2019-09-30 18:33:58 +08:00
322f4fd268 修改问题详情/回答详情UI(15.16) https://gitlab.ghzs.com/pm/halo-app-issues/issues/650#note_30101 2019-09-30 18:33:14 +08:00
da55afb712 完成"社区提问相关功能强化"测试问题 https://gitlab.ghzs.com/pm/halo-app-issues/issues/618 2019-09-30 17:22:58 +08:00
5788052262 Merge remote-tracking branch 'origin/dev' into dev 2019-09-30 16:14:32 +08:00
4a56da6f2e 上传游戏(已完成) 2019-09-30 16:14:10 +08:00
770543fea5 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-09-30 16:09:16 +08:00
ed83feb112 评分相关的评论支持文本复制功能 2019-09-30 16:09:01 +08:00
223f264972 完成"光环助手V3.7.0-新增游戏下载状态" https://gitlab.ghzs.com/pm/halo-app-issues/issues/649 2019-09-30 10:33:37 +08:00
6c6f9f63f6 游戏投稿UI 2019-09-29 17:10:27 +08:00
58f761862f Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2019-09-29 17:08:20 +08:00
3a45de8eb3 问答选择社区页面UI更改 2019-09-29 17:07:24 +08:00
9a0ffb29e0 完成基础的新增游戏下载状态的处理逻辑,暂缺设计图 https://gitlab.ghzs.com/pm/halo-app-issues/issues/649 2019-09-29 16:09:06 +08:00
1d62818348 完成"我的游戏-玩过&关注&预约页面优化"测试问题 https://gitlab.ghzs.com/pm/halo-app-issues/issues/612#note_29333 2019-09-29 14:27:26 +08:00
5be789d100 fix RichEditor keyboard not working 2019-09-29 11:45:39 +08:00
7dd79bd4bb 专题合集优化 2019-09-29 09:56:58 +08:00
d0b6ee897c Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-09-28 10:29:26 +08:00
2f03656869 问答相关的UI更改 2019-09-28 10:28:46 +08:00
5ac51c84b7 还原开服表和分类的下载入口传递的代码,与旧版本保持一致 2019-09-27 18:17:14 +08:00
ce71384dd9 完善通知提示弹窗 2019-09-27 18:12:35 +08:00
2a7db59e6b 补充今日头条SDK激活步骤 2019-09-27 18:11:52 +08:00
e561c13f28 完成引导强化系统“通知管理”功能 https://gitlab.ghzs.com/pm/halo-app-issues/issues/635 2019-09-27 18:03:38 +08:00
12981bd7ff 正式包数据接口切换到 3.7 2019-09-27 14:35:39 +08:00
208250d030 正式包数据接口切换到 3.7 2019-09-27 14:28:50 +08:00
d4598ac96f Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-09-27 11:02:39 +08:00
293451e527 光环助手V3.7.0-新增 专题合集 功能(前端) https://gitlab.ghzs.com/pm/halo-app-issues/issues/645 2019-09-27 11:02:14 +08:00
fe19c84049 基本完成光环助手V3.7.0-游戏视频功能-前端4 https://gitlab.ghzs.com/pm/halo-app-issues/issues/625 2019-09-27 09:55:37 +08:00
7e0d5c3416 首页游戏横向item游戏名字适配 2019-09-26 14:53:36 +08:00
319fe2f556 完成游戏详情页游戏视频基本的滚动效果,细节功能待完善 https://gitlab.ghzs.com/pm/halo-app-issues/issues/625 2019-09-25 18:29:37 +08:00
6f6bffdeb7 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2019-09-25 16:30:00 +08:00
7c6271d4e9 修复总开服表下载刷新问题 2019-09-25 16:29:12 +08:00
5d3f082771 Merge remote-tracking branch 'origin/dev' into dev 2019-09-25 15:54:43 +08:00
abf6935653 去掉评论弹窗的状态栏变色 2019-09-25 15:54:19 +08:00
6eecad6bb6 游戏详情开服表优化(只要曾经设置过开服信息就显示) 2019-09-25 15:54:08 +08:00
12cea1f263 remove community hint dialog background 2019-09-24 16:56:35 +08:00
3150a182e6 问答社区首页UI优化(0918测试) https://gitlab.ghzs.com/pm/halo-app-issues/issues/610 2019-09-24 16:54:27 +08:00
56160193a9 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-09-23 19:30:21 +08:00
859470aabf 总开服表重构 https://gitlab.ghzs.com/pm/halo-app-issues/issues/628 2019-09-23 19:30:07 +08:00
ad2dc5ac4b 修复点击游戏详情默认选中动态tab的问题 2019-09-23 18:16:56 +08:00
d32816aa65 预约按钮读取下载补充文字 2019-09-20 14:15:53 +08:00
64e99338b0 发表的内容支持复制文本功能(游戏评分部分未完成) https://gitlab.ghzs.com/pm/halo-app-issues/issues/651 2019-09-20 11:57:53 +08:00
88bcb2883c 修复跳转视频详情播放顺序错乱的问题 2019-09-20 11:03:42 +08:00
a70520f04f 修复首页竖屏滑动类型刷新问题 2019-09-20 10:27:37 +08:00
09521ec26a Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-09-19 18:20:55 +08:00
f5b8049dd7 游戏专题优化(前端)(竖屏滑动类型刷新问题未解决) https://gitlab.ghzs.com/pm/halo-app-issues/issues/643 2019-09-19 18:20:46 +08:00
fe230d647a 补充编译带请求日志的脚本 2019-09-19 10:12:47 +08:00
33daa22e49 debug 模式增加网络请求 inspector 方便调试 2019-09-19 09:42:11 +08:00
80965dcbc9 隐藏我的游戏的大小 2019-09-18 18:29:31 +08:00
89f0cfb6a7 捕抓隐私弹窗异常 2019-09-18 18:15:39 +08:00
89884d4cd7 移除旧视频模块,整理游戏详情页代码 2019-09-18 17:54:46 +08:00
e9590f81be 完成插件跳转助手工具箱需求 https://gitlab.ghzs.com/pm/halo-app-issues/issues/636 2019-09-18 15:01:17 +08:00
83159e4153 更新广点通 SDK https://gitlab.ghzs.com/pm/halo-app-issues/issues/454 2019-09-18 11:30:06 +08:00
21dc20dff1 完成社区提问相关功能强化 https://gitlab.ghzs.com/pm/halo-app-issues/issues/618 2019-09-18 11:12:34 +08:00
3ec6526aa4 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-09-18 09:53:43 +08:00
ba918b9144 删除WEB页面视频播放代码
优化插入视频后与图片的交互
优化插入视频页面
2019-09-18 09:53:30 +08:00
3a63d049dc 将列表的 skeleton 相关代码移动到基类 2019-09-17 11:01:57 +08:00
13011804ab 完成社区提问相关功能强化(1,2) https://gitlab.ghzs.com/pm/halo-app-issues/issues/618 2019-09-16 18:00:22 +08:00
1e2e621055 完成视频详情消息中心部分 https://gitlab.ghzs.com/pm/halo-app-issues/issues/617 2019-09-16 16:09:24 +08:00
f53c3ff8ae 完成视频详情播放失败重试 https://gitlab.ghzs.com/pm/halo-app-issues/issues/617 2019-09-16 11:42:00 +08:00
b30e60dfde 完成视频详情移动网络弹窗功能 https://gitlab.ghzs.com/pm/halo-app-issues/issues/617 2019-09-11 18:27:49 +08:00
34ac30cdfe 完成视频评论部分功能 https://gitlab.ghzs.com/pm/halo-app-issues/issues/617 2019-09-11 17:22:57 +08:00
8bd30d1a0f 富文本编辑框增加插入视频功能 2019-09-11 14:45:51 +08:00
cbc575fcd0 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2019-09-10 17:23:34 +08:00
9720812714 光环助手V3.7.0-游戏视频功能-前端2(视频入口1) https://gitlab.ghzs.com/pm/halo-app-issues/issues/616 2019-09-10 17:22:41 +08:00
b9a8f3217f 完成视频详情页的点赞、收藏和分享功能 https://gitlab.ghzs.com/pm/halo-app-issues/issues/617 2019-09-10 15:50:13 +08:00
cb812d2d6c 引入WEB视频相关的JS/CSS代码 2019-09-10 10:28:03 +08:00
572b35c4dc 修改游戏详情开服表月份切换问题 2019-09-10 10:02:01 +08:00
043486a53f Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-09-09 18:34:36 +08:00
df68f8fb9c 光环前端需求汇总(2019年8月)(3.6.7.9)https://gitlab.ghzs.com/pm/halo-app-issues/issues/633 2019-09-09 18:34:20 +08:00
ee146b20e5 完成还十分粗糙的视频详情显示界面 2019-09-09 18:19:40 +08:00
936ca7d4ba change field name 2019-09-09 17:57:36 +08:00
57e37419cf 光环助手V3.7.0-游戏详情评论优化 https://gitlab.ghzs.com/pm/halo-app-issues/issues/634 2019-09-09 17:19:04 +08:00
86934a789e 对接从WEB页面跳转至视频详情 2019-09-09 14:35:35 +08:00
9552d3ac25 禁止低版本设备使用视频投稿功能 2019-09-09 11:10:40 +08:00
9782e2a615 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-09-06 18:15:40 +08:00
7b8f5dfc5b 个人主页增加我的视频 2019-09-06 18:15:31 +08:00
f3fd311d70 修复开服表和分类的下载入口传递问题 2019-09-06 18:10:11 +08:00
5e7e71f6cc 修复 MTA移动网络下载 网络类型显示错误的问题 2019-09-06 16:10:58 +08:00
6cc4178cb3 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-09-06 14:16:29 +08:00
49be7e9d12 修复上传格式缺失和视频链接错误问题 2019-09-06 14:16:19 +08:00
8f50626a3d Merge remote-tracking branch 'origin/dev' into dev 2019-09-05 20:43:42 +08:00
89cfd1a8ba 完成简单的视频操作逻辑 https://gitlab.ghzs.com/pm/halo-app-issues/issues/617 2019-09-05 20:43:27 +08:00
2e9ec0bde0 调整代码位置,修改视频封面上传路径 2019-09-05 18:34:37 +08:00
b77491e91e 修复上传错误无法回调问题 2019-09-05 18:17:36 +08:00
65b84b0e4a Matisse add apply filter 2019-09-05 17:00:13 +08:00
e9cb8fcde8 视频草稿增加删除操作
优化视频上传页面交互
2019-09-05 16:05:30 +08:00
aa04f67f43 优化视频上传 2019-09-05 10:48:23 +08:00
3710a2b729 视频上传增加草稿保存提示弹窗 2019-09-04 20:14:35 +08:00
96cadd05f1 完善存草稿,投稿操作
完善已投稿,草稿箱页面
增加草稿修改操作
2019-09-04 17:53:11 +08:00
114f014091 打包脚本开始打包前先释放上次打包占用的资源 2019-09-03 20:50:00 +08:00
960c596db8 完成我的游戏-玩过&关注&预约页面优化 https://gitlab.ghzs.com/pm/halo-app-issues/issues/612 2019-09-03 20:22:41 +08:00
fe6ebd8aa7 完成新增 我的游戏-玩过 页面 2019-09-02 18:29:57 +08:00
f121b04e66 修复可能的下载闪退问题 2019-09-02 18:29:14 +08:00
4724b809dd 上传视频页面增加分类,标签,存草稿,投稿等操作 2019-08-31 17:17:35 +08:00
5353581cf1 上传视频相关 2019-08-31 11:23:02 +08:00
68f60db4c0 上传视频相关 2019-08-30 18:20:03 +08:00
e90e514f8b 修复提交评分game_version字段丢失问题
整理视频上传相关
2019-08-29 16:34:41 +08:00
6ab04cf056 完善视频上传、视频投稿页面交互逻辑 2019-08-29 11:33:29 +08:00
219270b10d 新增视频投稿、上传视频页面
新增阿里云上传框架
完成部分上传相关逻辑
2019-08-28 19:41:15 +08:00
b070998a73 修复激活数据的上传问题 2019-08-26 17:10:02 +08:00
14e3edf5dd 修复列表滑动闪退问题 2019-08-26 14:27:25 +08:00
bb604b3922 尝试修复后台下载的闪退问题 2019-08-26 11:33:26 +08:00
f43f8e9fb1 修复在5.0以下设备的分dex问题 2019-08-23 18:27:13 +08:00
9c4c5badcd Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-08-22 14:42:00 +08:00
e511d48667 消息中心支持删除操作 2019-08-22 14:41:34 +08:00
8f6ddfef06 修复可能的后台下载闪退问题 2019-08-21 18:08:39 +08:00
2b9e0b167e 未读消息提示改为显示实际数值 2019-08-21 11:46:37 +08:00
cb874dc77a 新增首页社区引导提示以及修改一些重构遗留的BUG 2019-08-21 10:04:24 +08:00
b561cbc8f7 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2019-08-20 16:33:38 +08:00
f252e004b2 重构首页问答 2019-08-20 16:32:40 +08:00
177c027bf7 在用户选择上传头像前添加存储权限检查 2019-08-19 18:25:43 +08:00
cc386bfe48 回答详情点击问题标题/摘要跳转至问题详情 2019-08-16 17:49:06 +08:00
1254dd7209 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-08-16 17:29:12 +08:00
3054ad8471 首页问答增加一些动画交互 2019-08-16 17:28:54 +08:00
a3cfa69174 移除旧版本分类页面无用代码 2019-08-16 15:23:36 +08:00
82b32da523 删除快传功能残留资源文件 2019-08-16 15:20:54 +08:00
91a1ffe113 完成游戏详情页问题反馈整体优化 https://gitlab.ghzs.com/pm/halo-app-issues/issues/606 2019-08-15 16:59:48 +08:00
d3b6b81e64 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-08-15 14:17:13 +08:00
a2b61a8447 增加问题邀请禁言 2019-08-15 14:17:01 +08:00
cd6c9ca460 修复动态获取权限时可能出现的闪退问题 2019-08-15 09:27:32 +08:00
49a189d19f Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-08-14 18:21:18 +08:00
d972b94ce8 我的游戏-已安装列表移到下载管理 2019-08-14 18:21:07 +08:00
0a552fd378 完成问答社区前端优化汇总(14) https://gitlab.ghzs.com/pm/halo-app-issues/issues/609 2019-08-14 18:08:15 +08:00
3538a629cb 问答社区前端优化汇总(2.3.4.5.6.7.8.10) https://gitlab.ghzs.com/pm/halo-app-issues/issues/609 2019-08-14 16:06:29 +08:00
ef1652c4f4 光环助手V3.7.0-游戏评分&评分回复优化 https://gitlab.ghzs.com/pm/halo-app-issues/issues/607 2019-08-13 15:27:33 +08:00
9d5250294c 游戏插件化/更新,过滤同包名,只显示7天下载最高的一个 2019-08-12 17:16:25 +08:00
8e2aab5dbe Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-08-12 15:53:01 +08:00
75d6267f68 相关页面ToolBar增加Download Menu
下载管理游戏下载为空且更新不为空,则直接定位到游戏更新Tab
2019-08-12 15:52:48 +08:00
63bbee19a4 更新 TalkingData SDK https://gitlab.ghzs.com/pm/halo-app-issues/issues/602 2019-08-09 17:39:35 +08:00
67f78c2f95 版本号升级到 3.7.0 2019-08-09 17:38:22 +08:00
f558954d22 移除快传相关代码 2019-08-09 14:43:43 +08:00
f5b1fff4ed 3.6.6 tinker base 2019-08-09 14:10:56 +08:00
0c00164113 升级数据库版本号 2019-08-09 12:00:56 +08:00
c1a910e2cb 当游戏详情的自定义栏目的基本信息内容大于80也显示展开按钮 2019-08-08 18:29:56 +08:00
4578984a75 修复不用安装游戏也能安装的问题 2019-08-08 18:10:44 +08:00
c8714c0c16 调整游戏详情自定义栏目的标签显示逻辑 2019-08-08 17:46:57 +08:00
28b1a3b7de Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-08-08 17:06:17 +08:00
f35cf6fa99 删除无用的下载监听(横向游戏列表没有下载按钮) 2019-08-08 17:05:59 +08:00
265b9b7ec1 调整游戏详情自定义栏目的展开逻辑 2019-08-08 14:37:22 +08:00
561d5026c9 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-08-08 11:46:38 +08:00
932b39ea09 插件化区域游戏显示的标签从“插件标签”改为“游戏标签” 2019-08-08 11:45:57 +08:00
bfb7e6aa71 fix build issue 2019-08-08 09:10:41 +08:00
13e2694dc0 完成封包测试优化汇总(2) https://gitlab.ghzs.com/pm/halo-app-issues/issues/601 2019-08-07 18:06:42 +08:00
325dd07b4d update CHANGELOG.md 2019-08-07 16:50:17 +08:00
ca197ae2ab Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-08-07 16:48:49 +08:00
8542f3aec6 update CHANGELOG.md 2019-08-07 16:48:35 +08:00
7b23d7a1a3 移除旧游戏详情插件信息/基本信息部分代码 2019-08-07 14:54:15 +08:00
55901c219a 游戏详情去掉基本信息栏目 2019-08-07 14:20:45 +08:00
973f6d2f20 修复V3.6.6-最后优化补充(20, 21, 22) https://gitlab.ghzs.com/pm/halo-app-issues/issues/599 2019-08-06 17:08:27 +08:00
42b05160d8 游戏搜索结果隐藏底部提示文案 2019-08-05 17:38:07 +08:00
729c48b8ad 修复社区专题的跳转问题 2019-08-05 10:45:01 +08:00
4a2d201ac2 更改游戏详情顶部标签的读取字段 2019-08-02 18:06:14 +08:00
22051ab626 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-08-02 14:58:21 +08:00
8188d8495b 修改游戏搜索广告位默认文案 2019-08-02 14:58:04 +08:00
6d3e613214 状态栏通知和系统客服支持跳转至社区专题 2019-08-02 14:25:46 +08:00
b8c2b73874 修复隐私弹窗内容过长导致按钮显示不全的问题 2019-08-01 17:16:56 +08:00
de14cc95ef 修复光环助手V3.6.6-最后优化补充(14, 15) https://gitlab.ghzs.com/pm/halo-app-issues/issues/599 2019-08-01 15:30:37 +08:00
a56814a3aa 修复游戏详情自定义栏目不设置标题设置正文但又有几个标签时显示会错乱的问题 2019-08-01 11:50:03 +08:00
689f1e3b68 修改提交重复/相似问题的弹窗交互 2019-08-01 10:30:16 +08:00
1d280ed079 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-31 17:59:31 +08:00
4a4118958d UserManager singleton add double checked locking pattern 2019-07-31 17:59:18 +08:00
c0010e7bdb 移除游戏详情的插件介绍模块 2019-07-31 17:23:01 +08:00
b03ba1df9d 修复下载弹窗的机型判断问题 2019-07-31 16:51:18 +08:00
5b28be29ac Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-31 16:42:14 +08:00
3ca7b7c9bd 社区相关UI更改 2019-07-31 16:41:44 +08:00
40e5a42212 修复游戏详情标签在 MuMu 模拟器上滑动出现多彩细线的问题 2019-07-31 14:47:43 +08:00
481e2d7925 修复浏览历史没有的游戏没有礼包按钮的问题 2019-07-31 14:03:18 +08:00
6c46d4b090 调整下载弹窗的弹出规则 2019-07-31 11:24:10 +08:00
9e5b8b5f29 优化首次启动 2019-07-31 10:55:31 +08:00
27f0354db5 更换引导图 2019-07-31 10:32:58 +08:00
eb68fe86e6 修改游戏名称颜色 2019-07-31 10:21:24 +08:00
cf4514614a 首次启动去除自动跳转至首页 2019-07-31 10:14:45 +08:00
f26bc062e1 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-07-30 22:56:41 +08:00
9f848594a1 增加申请权限的地方 2019-07-30 22:56:18 +08:00
4cb92f5d8c 编辑框实现逻辑回退到3.6.5 2019-07-30 22:28:34 +08:00
692fec5518 光环助手V3.6.6-最后测试汇总(1.2.10.13)https://gitlab.ghzs.com/pm/halo-app-issues/issues/598 2019-07-30 22:13:24 +08:00
1f978c3039 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-30 20:56:50 +08:00
72ca4958c1 光环助手V3.6.6 RELEASE(20190730-1600)测试问题汇总(前端)(7.8.11.12.17)https://gitlab.ghzs.com/pm/halo-app-issues/issues/597#note_25856 2019-07-30 20:56:43 +08:00
7ef693c6d8 修复闪退问题 2019-07-30 20:44:14 +08:00
32319affb7 完成3.6.6 RELEASE(20190730-1600)测试问题汇总(6,10,15,16,18~22) https://gitlab.ghzs.com/pm/halo-app-issues/issues/597 2019-07-30 20:25:12 +08:00
04458270d3 我的游戏优化 2019-07-30 19:32:25 +08:00
a4e2f4b90f 完成光环助手V3.6.6-权限相关测试汇总 https://gitlab.ghzs.com/pm/halo-app-issues/issues/596 2019-07-30 15:57:21 +08:00
bd390decf4 分类详情自动定位到选中分类位置
文章编辑不限制RichEditor高度
2019-07-30 15:40:00 +08:00
548430e4a8 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-30 11:04:54 +08:00
b29f80942f 光环助手V3.6.6 RELEASE(20190726-1930)测试问题汇总(前端)(8.9.13.22.23.25.26) https://gitlab.ghzs.com/pm/halo-app-issues/issues/594 2019-07-30 11:04:41 +08:00
5be275f8b0 修复自定义栏目的一些问题 2019-07-30 10:13:59 +08:00
1f84195cc9 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-30 09:21:16 +08:00
8204faef7d 修改列表中专题标题的颜色 2019-07-30 09:21:04 +08:00
0a889f4549 修复3.6.6 RELEASE(20190726-1930)测试问题汇总(2, 3, 10, 17, 21, 27) https://gitlab.ghzs.com/pm/halo-app-issues/issues/594 2019-07-29 19:39:41 +08:00
c9edf04a45 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-29 18:27:30 +08:00
5fc5d1f68f 修改游戏列表游戏名字颜色
删除无用代码
2019-07-29 18:27:20 +08:00
b7ae9d82ff 修复一些预约和游戏详情的问题 2019-07-29 18:12:18 +08:00
498c626227 修复V3.6.6 RELEASE(20190723-1830)测试问题汇总(21~23,25~26) https://gitlab.ghzs.com/pm/halo-app-issues/issues/592 2019-07-29 16:12:02 +08:00
24be8be4b2 修复游戏详情介绍模块下的评论内容显示异常问题 2019-07-29 15:43:57 +08:00
7700d3af79 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-29 15:31:51 +08:00
95dd96f7f9 修改游戏详情社区入口提示UI
修改社区搜索UI
2019-07-29 15:31:39 +08:00
2f89ba9707 完成3.6.6数据统计需求(MTA) https://gitlab.ghzs.com/pm/halo-app-issues/issues/579 的补充部分 2019-07-29 15:23:12 +08:00
1460e8cad3 修改游戏详情UI以及更换引导图 2019-07-29 10:00:38 +08:00
9e68a37205 fix build bug 2019-07-26 19:39:39 +08:00
d9591a826a fix bug 2019-07-26 18:46:48 +08:00
843ae23911 修复游戏标签详情以及分类详情下载相同包名不同游戏下载进度更新异常问题 2019-07-26 18:27:22 +08:00
bf1559f3bd 社区顶部tab栏“问题”改“全部” UI 2019-07-26 18:09:39 +08:00
9baf63ded5 问答社区首页增加推荐入口 2019-07-26 16:09:57 +08:00
5a5a4eccf0 https://gitlab.ghzs.com/pm/halo-app-issues/issues/589 (1.2.3.4.6.8.9.13.14.16.17.19.20) 2019-07-26 15:42:46 +08:00
d82270d8e9 评论禁言弹窗 2019-07-26 11:19:24 +08:00
39fd038fde 避免在启动按钮出现进度条 2019-07-25 17:02:17 +08:00
0e6192487e 修复FilterManager插入数据库失败问题 2019-07-25 16:41:05 +08:00
dee19c5961 https://gitlab.ghzs.com/pm/halo-app-issues/issues/588
(1.2.3.4.6.9.10.11.17.18)
2019-07-25 16:06:58 +08:00
e18a66dd68 修改 我的关注/我的游戏/总开服表/游戏搜索 UI 2019-07-24 16:55:25 +08:00
8c7efc7bb4 修改首页游戏/专题(多行Tab)/标签详情UI 2019-07-24 11:41:37 +08:00
5c88db4bc4 Fix Dialog BadTokenException 2019-07-23 11:19:54 +08:00
ccce9759d6 修复个人主页评分回复数量无法显示问题 2019-07-22 17:07:23 +08:00
857541665a 调整默认搜索UI 2019-07-22 14:33:05 +08:00
1737f4ffdc 修改开服表样式 2019-07-22 10:08:37 +08:00
85c839ffc8 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-20 18:23:18 +08:00
37168298ff 修复列表刷新问题 2019-07-20 18:23:11 +08:00
65c004e8cc 修复社区推荐位的一些问题 2019-07-20 17:58:45 +08:00
a87f642473 完成光环助手V3.6.6数据统计需求(MTA)补充部分 https://gitlab.ghzs.com/pm/halo-app-issues/issues/579 2019-07-20 17:16:12 +08:00
69a8f94607 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-07-20 16:23:54 +08:00
52438c682b 调整预约按钮样式 2019-07-20 16:23:45 +08:00
c9ea7e3b79 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-20 16:06:35 +08:00
d4289efbc6 问答社区优化汇总-后台(2, 4)https://gitlab.ghzs.com/pm/halo-app-issues/issues/572 2019-07-20 16:06:27 +08:00
d9b65705ad 完成光环助手V3.6.6 DEV(20190719-0915)测试问题汇总(3,5~7,12,15~19) https://gitlab.ghzs.com/pm/halo-app-issues/issues/585 2019-07-20 15:32:59 +08:00
5b35524f8d Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-20 11:43:10 +08:00
540274d8f5 光环助手V3.6.6 DEV(20190717)游戏评分相关(1.2.8.9.10.12.13.16.17) https://gitlab.ghzs.com/pm/halo-app-issues/issues/582 2019-07-20 11:43:03 +08:00
e4794c60f8 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-07-19 18:29:04 +08:00
95676ee4bd 修复预约弹窗和游戏详情的一些显示问题 2019-07-19 18:28:33 +08:00
42b8a9d5f9 游戏评分相关popupWindow自适应显示方向 2019-07-19 18:27:20 +08:00
a027cb16af Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-19 15:35:27 +08:00
5b75bd4c61 光环助手V3.6.6-新增 隐私政策 说明(一、1 二、三)https://gitlab.ghzs.com/pm/halo-app-issues/issues/577 2019-07-19 15:35:16 +08:00
3d90f9ee34 修复预约的一些问题 2019-07-19 11:59:30 +08:00
52543c828e 移除我的游戏的右滑分享 2019-07-18 18:12:19 +08:00
ed9c780e2d 修复点击下载按钮触发两次点击的问题 2019-07-18 17:50:16 +08:00
904b74be5b data后台数据统计 https://gitlab.ghzs.com/pm/halo-app-issues/issues/580 2019-07-18 16:19:37 +08:00
629fa23237 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-18 15:04:29 +08:00
9f6d441ad1 社区搜索样式修改以及最热模块增加问题内容 2019-07-18 15:04:20 +08:00
b0a99ced20 完成光环助手V3.6.6-用户注销账号功能 https://gitlab.ghzs.com/pm/halo-app-issues/issues/578 2019-07-17 17:46:13 +08:00
101874fd29 完成光环助手V3.6.6数据统计需求(MTA) https://gitlab.ghzs.com/pm/halo-app-issues/issues/579 2019-07-17 17:36:48 +08:00
3bae1a1af7 更新 GID 模块 2019-07-17 14:59:56 +08:00
b6f1138922 将上报推广激活数据延迟至获取到 IMEI 后发送 2019-07-17 11:57:01 +08:00
c90cc405b5 将触发申请权限的条件限制为仅第一次打开 2019-07-16 18:23:16 +08:00
c73690e546 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-16 17:42:51 +08:00
5b4ddcae1f 优化问题提交 2019-07-16 17:42:41 +08:00
1244d838ec 将权限申请添加到具体触发的位置 2019-07-16 17:39:52 +08:00
6c5da2d787 .properties 编码问题 2019-07-16 16:42:03 +08:00
9f2225de3d 修复编译问题 2019-07-16 16:19:54 +08:00
69c809a2c0 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-16 15:44:38 +08:00
ba27bd8a4c 问题提交增加相似/重复处理 2019-07-16 15:44:29 +08:00
1da1c6f86d 发现页面移除快传选项,移除定位权限 2019-07-16 14:51:17 +08:00
012eb42c8a 修复游戏详情标题过长会遮盖菜单按钮的问题 2019-07-16 14:16:10 +08:00
186a5f8d08 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-07-16 11:54:35 +08:00
522dac5c6b 修复搜索列表页面预约游戏点击无效的问题 2019-07-16 11:54:25 +08:00
32c2ab67fb Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-16 10:38:17 +08:00
54e0cdee75 开服表增加合并展开方案(实现方式修改) 2019-07-16 10:38:06 +08:00
d5a23f5239 完成游戏详情功能优化的UI调整 https://gitlab.ghzs.com/pm/halo-app-issues/issues/558 2019-07-16 10:18:08 +08:00
bbd035d7b1 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-16 10:07:20 +08:00
140c048b71 开服表增加合并展开方案 2019-07-16 10:07:06 +08:00
d0306f311a 大致完成游戏详情功能优化的UI调整(缺右上角的几个图标) https://gitlab.ghzs.com/pm/halo-app-issues/issues/558 2019-07-15 18:17:28 +08:00
0c918bd826 默认渠道(GH_TEST)开启JS调试 2019-07-15 16:00:15 +08:00
b2064c3758 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-15 15:45:37 +08:00
11e276a977 编辑器根据当前环境自动引用远程JS/CSS(正式/测试) 2019-07-15 15:45:20 +08:00
14ee8921cf 将社区顶部tab栏"问题"改"全部" https://gitlab.ghzs.com/pm/halo-app-issues/issues/574 2019-07-15 15:21:10 +08:00
2dcc4e974d 兼容社区文章跳转格式 2019-07-15 15:19:05 +08:00
5b639d78cf 删除无用配置 2019-07-15 11:48:22 +08:00
35c4fa1209 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-12 18:31:42 +08:00
8a13d6a60b Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-12 18:30:27 +08:00
b94c742100 调整详情页介绍Tab中游戏介绍的显示样式 2019-07-12 18:28:02 +08:00
967f281210 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-12 18:25:42 +08:00
1dba6f438f 社区文字编辑适配软键盘 2019-07-12 18:25:31 +08:00
fb464aefaa 删掉七陌客服的语音功能 2019-07-12 17:53:22 +08:00
35b6db66b3 去掉读取通讯录、蓝牙和读取用户账户的权限注册 2019-07-12 17:34:14 +08:00
396862fc0a 修改账号被挤掉提示弹窗内容 2019-07-12 16:48:45 +08:00
b6ab058cb4 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-12 16:33:15 +08:00
fb4d1df210 完善选择社区 2019-07-12 16:33:06 +08:00
ffaa32be29 完成问答社区优化汇总-前端(9, 10) https://gitlab.ghzs.com/pm/halo-app-issues/issues/573 2019-07-12 15:09:42 +08:00
18af7c51c8 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-12 11:17:40 +08:00
e45b46e8a5 文章撰写页面编写正文内容时自动调整高度 2019-07-12 11:17:23 +08:00
4419463c01 完成"全部文章"页面 2019-07-12 10:53:15 +08:00
51115e070b 问答社区首页增加推荐入口(全部文章尚未完全接入) https://gitlab.ghzs.com/pm/halo-app-issues/issues/568 2019-07-11 18:26:10 +08:00
783889f050 修复编译问题 2019-07-11 17:47:45 +08:00
547229d017 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-11 17:23:30 +08:00
ad05198be1 社区选择改版初步完成(等待后台接口完成) 2019-07-11 17:23:20 +08:00
f93f31784e 修复详情页更新内容区域的展开问题 2019-07-11 16:10:23 +08:00
05d4109f0b 编辑器 JS 和 CSS 引用切换至测试环境 2019-07-11 14:17:19 +08:00
9ea377b72b 自动打包开启编辑器网页调试 2019-07-11 10:37:36 +08:00
a4eec37467 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-07-10 18:17:29 +08:00
14d6c9d6f4 调整筛选大小控件的项样式 2019-07-10 18:17:20 +08:00
4707112837 优化游戏详情列表代码 2019-07-10 18:16:14 +08:00
d4f78631d9 修复包名相同、游戏ID不同的列表下载进度更新不准确问题(目前只做了SubjectAdapter,待产品需求出来再全局修改) 2019-07-10 17:33:05 +08:00
dc5c2971c8 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-10 15:39:06 +08:00
07f1180ccd 解决分享由于持有activity实例造成的内存泄露 2019-07-10 15:38:37 +08:00
e483540d3d 去掉详情页各模块间的分割线 2019-07-10 10:31:07 +08:00
362518959b 修复详情页自定义栏目展开异常的问题 2019-07-09 19:56:50 +08:00
7b1ac0f70c 修复详情页自定义栏目不显示展开按钮的问题 2019-07-09 18:26:32 +08:00
fc18da47da 将游戏分类详情页面样式换成与标签详情一致(旧代码待完成需求再删除) https://gitlab.ghzs.com/pm/halo-app-issues/issues/566 2019-07-09 17:09:02 +08:00
6d14af968f 当下载过程中用户强制退出APP(直接杀死进程)再重新打开app时,下载状态会从下载中/等待中变成连接Wi-Fi自动下载 2019-07-09 16:14:20 +08:00
2cff450fa4 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-08 18:28:10 +08:00
069b82518d 修复游戏专题接口请求异常问题 2019-07-08 18:27:58 +08:00
91663c4733 接入今日头条 SDK 2019-07-08 17:13:28 +08:00
d7cf91ec5c 游戏专题优化 2019-07-08 14:20:02 +08:00
4854c15f8c Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-08 11:27:44 +08:00
248e63ba04 图片压缩出现OOM/压缩失败时直接返回原图 2019-07-08 11:27:20 +08:00
fc19ce037e 基本完成游戏详情功能优化的逻辑(UI待出图再调整) https://gitlab.ghzs.com/pm/halo-app-issues/issues/558 2019-07-08 11:19:04 +08:00
020b67764b 初步对接详情页自定义栏目 2019-07-05 18:28:03 +08:00
32d25e5490 大致完成对旧游戏详情页面模块的位置变更 2019-07-05 16:57:27 +08:00
d8cd68025e Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-05 09:57:59 +08:00
38a8b190fe 游戏详情 关联关注定位至【动态】Tab 2019-07-05 09:56:32 +08:00
3788e8ce20 修复游戏详情的视频播放统计问题 2019-07-04 10:53:26 +08:00
b02a6377ab 修复新闻详情内容显示不全问题 2019-07-03 17:56:14 +08:00
ac550094df 游戏搜索默认页面增加跳转至标签详情 2019-07-03 14:57:29 +08:00
2ea75c1664 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-03 11:18:08 +08:00
cf07f12cad 更新QQ分享 卡片QQ分享/QQ空间分享未安装QQ时需要显示安装弹窗 2019-07-03 11:17:56 +08:00
fb00833d3f 修复二级分类数量刚好为 7 时不显示展开按钮的问题 2019-07-03 09:33:02 +08:00
91046c350c 光环前端需求汇总(2019年6月第4周)(1.3.4.8) https://gitlab.ghzs.com/pm/halo-app-issues/issues/560 2019-07-02 15:30:13 +08:00
3b2c294323 Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev 2019-07-02 10:59:54 +08:00
4507c7e581 专题详情修改 2019-07-02 10:59:31 +08:00
6d02fb22a2 完成光环前端需求汇总(6月第4周)(7,9,10) https://gitlab.ghzs.com/pm/halo-app-issues/issues/560 2019-07-02 10:52:33 +08:00
e926f2ca77 调整 WorkManager 调用 2019-07-02 10:24:42 +08:00
77267add3b 优化大小选择控件的 API 2019-07-02 10:23:22 +08:00
460a4eed57 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-07-02 10:07:29 +08:00
84ea2cd1af 专题详情增加多行类型 2019-07-02 10:07:06 +08:00
68e1b9b700 修复闪退问题 2019-07-01 18:28:51 +08:00
361d260964 优化后台下载逻辑,提高下载稳定性 2019-07-01 17:03:38 +08:00
3a66d778ed 修复标签详情页下载状态更新错乱的问题 2019-06-28 18:10:08 +08:00
dbf5fcda58 处理内存泄漏 2019-06-28 11:14:43 +08:00
a5309f2c9e Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-06-28 09:54:55 +08:00
13b81fa3e8 专题新增横向行样式 2019-06-28 09:54:47 +08:00
8c60267997 调整标签详情页UI 2019-06-27 18:07:52 +08:00
839efd6e32 处理数组越界异常 2019-06-27 16:45:10 +08:00
54c2788e0a 完成光环助手V3.6.6-游戏标签详情功能(https://gitlab.ghzs.com/pm/halo-app-issues/issues/550) 2019-06-27 16:23:33 +08:00
1439e598fc 整理游戏专题代码(页面传递参数不清晰问题) 2019-06-27 11:43:20 +08:00
7a9e6bdb97 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-06-27 11:17:55 +08:00
3b58aead33 修复专题 TabLayout 模式下显示异常问题 2019-06-27 11:17:48 +08:00
69d379d07b 微调标签详情页页面 2019-06-26 18:28:02 +08:00
cc9d5765d5 完成光环助手V3.6.6-游戏标签详情逻辑 (https://gitlab.ghzs.com/pm/halo-app-issues/issues/550) UI 待微调 2019-06-26 17:50:31 +08:00
aa9cf8b193 修改VersionCode 2019-06-26 11:24:27 +08:00
b8afc028de Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-06-26 11:23:18 +08:00
e7a594003f 修复ExpendTextView收缩状态无法显示Span样式问题 2019-06-26 11:23:03 +08:00
5605df96dc 更新 leakCanary 2019-06-26 09:47:14 +08:00
c499c19e5b 游戏搜索添加部分搜索历史 2019-06-25 17:15:36 +08:00
106f3e932e 评分编辑 字数限制 2019-06-25 10:32:19 +08:00
04b5005218 增加评分修改记录支持修改内容样式(暂时无法'...全文'兼容) 2019-06-25 10:18:31 +08:00
32442985c5 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-06-24 14:40:14 +08:00
1ce6946507 增加评分修改记录(修改内容样式暂时无法支持-HTML) 2019-06-24 14:40:04 +08:00
a1a3481939 优化 BiResponse 2019-06-24 10:59:43 +08:00
2db5b5665c 处理闪退问题 2019-06-24 10:29:11 +08:00
a184d018da 增加游戏评论规(免责声明) 2019-06-23 11:29:19 +08:00
233c3f728a Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-06-23 10:02:10 +08:00
1102d22919 编辑评分增加获取设备别名 2019-06-23 10:02:01 +08:00
6c903ea25e 升级版本号至 3.6.6,正式环境也切换到 3.6.6 的接口 2019-06-22 16:57:24 +08:00
602bc61b89 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-06-22 16:27:54 +08:00
42201b3d28 修复阅读答案、社区文章时会先闪现输入光标的问题 2019-06-22 16:27:45 +08:00
a8889c16eb Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-06-21 18:07:24 +08:00
edaab18894 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-06-21 18:05:33 +08:00
d300e74fbd 支持修改游戏评分 2019-06-21 18:05:25 +08:00
1a804b2096 启用 kapt 增量编译提高编译速度 2019-06-21 17:59:36 +08:00
8c7f1ad596 完成游戏下载弹窗&游戏详情弹窗系统(https://gitlab.ghzs.com/pm/halo-app-issues/issues/548、https://gitlab.ghzs.com/pm/halo-app-issues/issues/549) 2019-06-21 17:17:21 +08:00
b59548d339 游戏评论 跳转部分弹窗(更多,排序) 2019-06-21 15:23:54 +08:00
181caf6dfa Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-06-21 11:41:13 +08:00
2eafb6b31f 个人主页增加评分相关 2019-06-21 11:40:56 +08:00
742f497833 完成光环助手V3.6.6-游戏预约功能 (https://gitlab.ghzs.com/pm/halo-app-issues/issues/542) 2019-06-20 14:49:35 +08:00
5119bdf545 游戏评论 页面数据同步 适配'我的评论'模块 2019-06-20 10:04:55 +08:00
ce44d3b2a7 游戏详情-评论增加'我的评论'模块 2019-06-20 09:48:48 +08:00
bf7ed2cd7d Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-06-20 09:35:22 +08:00
1e287c61fb 更换图标 2019-06-20 09:35:14 +08:00
d3e42aa876 基本完成预约流程,细节待完善 2019-06-19 18:29:20 +08:00
58e3629c32 游戏详情-评论增加 过滤/排序 功能 2019-06-19 18:18:27 +08:00
990f395b4d 修复富文本编辑框插入文章和插入回答闪退问题 2019-06-19 09:23:17 +08:00
b8500b4345 删掉预约测试代码 2019-06-18 18:32:05 +08:00
b52960c47f 初步对接预约接口 2019-06-18 18:15:46 +08:00
50ad63735f 更新混淆规则 2019-06-18 11:24:17 +08:00
89bc3d37f8 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-06-17 19:12:29 +08:00
9cfb820036 全局修改LoadingView 2019-06-17 19:12:16 +08:00
365abc3c1e 删除无用文件 2019-06-17 17:46:22 +08:00
7a1555e8c0 完成前端需求汇总201906第二周(7,8,9,11,14,15) https://gitlab.ghzs.com/pm/halo-app-issues/issues/547 2019-06-17 17:43:24 +08:00
6345bb55d2 全局替换文案 举报->投诉 2019-06-17 17:32:43 +08:00
b48a274707 调整快传相关代码目录 2019-06-17 17:21:46 +08:00
55e9bd681e 页面微调,下载管理移除免流量传送,免流量传送改为独立页面 2019-06-17 17:15:56 +08:00
aec9ec8294 autoscrollviewpager以源码方式引入
原因:项目已经多年无人维护且现在无法支持androidX
2019-06-17 16:05:19 +08:00
4229888cc9 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-06-17 15:46:07 +08:00
103b8d32f5 首页工具栏我的关注换成消息中心以及整理未读消息代码 2019-06-17 15:45:43 +08:00
303c98be96 优化浏览记录页面代码 2019-06-17 09:56:01 +08:00
c84da4c061 修复下拉刷新骨架的显示问题 2019-06-17 09:55:31 +08:00
3a4d466907 优化曝光上报逻辑 2019-06-16 16:32:30 +08:00
e7143d8da4 修复一些闪退问题 2019-06-16 15:05:19 +08:00
99fc35e632 完成简单的预约游戏弹窗样式 2019-06-16 14:18:48 +08:00
95cc8a1484 完成游戏搜索结果交互 2019-06-14 15:37:28 +08:00
c139d6bb8a fix merge bug 2019-06-13 17:47:12 +08:00
3d0b5bb8b6 merge 2019-06-13 16:12:40 +08:00
552ab8e8c4 merge 2019-06-13 16:08:28 +08:00
596e2e9673 完成搜索默认页面 2019-06-13 15:21:53 +08:00
66c7dc6539 修复更新 androidX 后选择标签的显示问题 2019-06-13 11:49:20 +08:00
2585098c20 将 PercentLayout 替换为 ConstraintLayout 2019-06-13 11:35:04 +08:00
1f5f51da68 统一 androidX 依赖版本 2019-06-13 10:49:41 +08:00
25e119202a 统一依赖版本 2019-06-13 10:48:57 +08:00
7b421d0b3a 移除无用的 legacy support 2019-06-12 18:24:07 +08:00
0066135f12 从 git 上移除部分无用文件 2019-06-12 18:12:31 +08:00
b930d3fa54 将 android support library 更新至 androidX (部分手尾仍需后续处理) 2019-06-12 17:58:15 +08:00
129a549110 Merge branch 'xiechanghong' into 'dev'
Xiechanghong

See merge request !7
2019-06-11 10:15:52 +08:00
22883dc195 Merge remote-tracking branch 'origin/xiechanghong' into xiechanghong 2019-06-10 18:52:08 +08:00
516299ee55 给分类页面,资讯中心,礼包中心,资讯文章详情,游戏详情-动态页面加上缺省图
规范格式

规范格式
2019-06-10 18:50:14 +08:00
a9835ba032 规范格式 2019-06-10 18:42:51 +08:00
dda154a927 给分类页面,资讯中心,礼包中心,资讯文章详情,游戏详情-动态页面加上缺省图
规范格式
2019-06-10 18:25:08 +08:00
cd5856778c 修复了保存图片但是系统图库没有显示的问题 2019-06-10 16:28:03 +08:00
d7db950878 尝试修复在 Android 8.0 及以后设备在执行后台任务时的偶发闪退问题 2019-06-10 14:59:25 +08:00
62f184f6ea 修复一些闪退问题 2019-06-10 10:03:18 +08:00
ab0d341bca 整理代码 2019-06-09 14:31:51 +08:00
1b27f481ba 调整文件位置 2019-06-06 17:31:05 +08:00
b68f9be8dd 微调代码 2019-06-06 17:21:02 +08:00
e9b0dbdfb6 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-06-06 17:17:28 +08:00
0b21dca0a4 实现游戏详情评论页面与评论详情的数据同步(回答数/点赞) 2019-06-06 17:17:10 +08:00
5e5d84cb65 添加 GID 获取失败重试 2019-06-06 15:49:24 +08:00
c2661d0586 完成前端需求汇总(2019年6月第1周) (8~11) https://gitlab.ghzs.com/pm/halo-app-issues/issues/538 2019-06-06 15:34:51 +08:00
032348e3fd 将测试环境的接口切换至 3.6.6 2019-06-06 15:31:52 +08:00
840a682665 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-06-05 17:57:27 +08:00
04807a5653 光环前端需求汇总(2019年6月第1周)(4.5.12.13.14.15.16) https://gitlab.ghzs.com/pm/halo-app-issues/issues/538#note_22426 2019-06-05 17:56:40 +08:00
5ebea3f3dd 修复提交应用列表不及时的问题 2019-06-05 17:20:51 +08:00
49ca3835c0 修复游戏图标为 gif 时下载会闪烁的问题 2019-06-05 17:19:33 +08:00
566307105e Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-06-05 15:44:03 +08:00
e8e75408cc 多设备登录同一帐号,取消toast操作 2019-06-05 15:43:31 +08:00
b52aa38552 将获取 GID 失败的信息发送到 MTA 2019-06-05 10:45:09 +08:00
8d55b251c3 3.6.5 tinker-base 2019-06-04 09:35:25 +08:00
386c7b19c1 versionName:3.6.5 versionCode:91
该版本为过度版本(修复3.6.4的bug)
2019-06-03 17:48:46 +08:00
eaaa168ee1 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-06-03 17:46:12 +08:00
d9f5811d86 默认关闭tinker更新弹窗 2019-06-03 16:18:31 +08:00
27d3470abc 修复使用错误上下文的问题 2019-06-03 14:31:54 +08:00
36f7427613 Merge branch '3.6.5' into 'dev'
修复 3.6.4 遗留问题

See merge request !6
2019-06-03 14:30:23 +08:00
929c117ddb 修复使用错误上下文的问题 2019-06-03 10:26:48 +08:00
7d6d77fae5 修复激活数据链接出错的问题 2019-06-03 10:22:20 +08:00
2297461d91 修复数组越界问题 2019-06-03 10:22:12 +08:00
a26a3bebad 修复 jenkins 打包时间时区不对的问题 2019-06-03 10:22:04 +08:00
4a673de424 修复激活数据链接出错的问题 2019-06-03 10:11:29 +08:00
a837c2ccd4 修复数组越界问题 2019-05-31 18:30:11 +08:00
10ee3132fd 修复 jenkins 打包时间时区不对的问题 2019-05-31 09:57:17 +08:00
783fbecb00 3.6.4 封包 2019-05-30 16:11:01 +08:00
de1b5ba2f3 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-30 15:49:21 +08:00
9a9e288c44 3.6.4 封包 2019-05-30 15:37:51 +08:00
424b48f631 更改远端 JS 和 CSS 至正式环境 2019-05-30 15:21:38 +08:00
86d1cd4e12 微调编译脚本 2019-05-30 15:01:02 +08:00
e700ff4744 微调编译脚本 2019-05-30 14:43:56 +08:00
34729c8c28 添加 jenkins 编译脚本 2019-05-30 14:26:54 +08:00
5a08611fdd 测试包在设置关于里显示编译时间 2019-05-30 11:51:57 +08:00
a73da1d6e4 修复游戏评论详情从弹窗回退后无法即时调起软键盘问题 2019-05-29 18:37:14 +08:00
28b8c20756 修复分类展开部分标签会丢失的问题 2019-05-29 14:41:47 +08:00
6941821b71 矫正网页资源的时间戳 2019-05-29 14:15:18 +08:00
3c2244701c 关闭 webview 调试 2019-05-29 14:07:21 +08:00
38dc873e2e Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-29 10:58:51 +08:00
c24ffb2489 修复插入数据造成浏览记录出现多个空格的问题 2019-05-29 10:58:34 +08:00
929864be30 优化游戏评论详情点赞刷新问题 2019-05-28 18:22:10 +08:00
bd87163a9b 显示/隐藏图片是无需回调(RE.callback()) 2019-05-28 17:52:23 +08:00
785c740668 修复图片名存在特殊字符无法显示的问题 2019-05-28 17:35:16 +08:00
25aa16f774 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-28 16:38:05 +08:00
9ec89c0dc1 光环助手V3.6.4测试遗留问题(2.3.5.15.16.17) https://gitlab.ghzs.com/pm/halo-app-issues/issues/536#note_22029 2019-05-28 16:37:25 +08:00
3e5bd2b087 修复我的提问、回答和文章页面分页的顺序变动问题 2019-05-28 15:31:56 +08:00
9de6cff13b 浏览记录的文章和答案过滤掉插入的内容 2019-05-27 17:53:19 +08:00
6b98bc9fca 修复了答案上下滑动可能出现页面偏移的问题 2019-05-27 17:52:39 +08:00
cdf9b0a071 去掉测试 toast 2019-05-26 15:14:49 +08:00
ff57e9c759 merge 2019-05-24 22:48:33 +08:00
b253113843 光环助手V3.6.4 RELEASE(20190524-2130)测试问题汇总(1.2.3.4.11) https://gitlab.ghzs.com/pm/halo-app-issues/issues/534 2019-05-24 22:47:32 +08:00
b7305337bf 修复浏览记录的游戏名字以及推送点击记录的问题 2019-05-24 22:10:34 +08:00
455e2ad723 处理文章隐藏时的弹两个 toast 的问题 2019-05-24 21:16:18 +08:00
8cf87b991b 推送辅助提示变更 2019-05-24 21:12:20 +08:00
ae0b289c3e 光环助手V3.6.4 RELEASE(20190524-1230)(1.2.3.4.5.6.7.8.9.10.11.12.14.15.16)测试问题汇总 https://gitlab.ghzs.com/pm/halo-app-issues/issues/533 2019-05-24 21:06:37 +08:00
9404c3349a 修复游戏评论详情重复点赞toast异常问题 2019-05-24 17:37:53 +08:00
28afbb8d35 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-24 17:16:18 +08:00
5b24443121 富文本编辑器添加样式之前将内容字符进行htmlEncode,防止JS端JSON解释失败 2019-05-24 17:15:37 +08:00
1f9aacbbbd 去掉多余的 toast 2019-05-24 16:52:32 +08:00
d194b33a5d 富文本编辑器初始化代码放置到assets目录,通过本地的rich_editor.js 访问远端的JS和CSS代码
目的:修复低版本内核浏览器的事件无法回调到原生android端问题
2019-05-24 16:02:13 +08:00
55010f0ef7 关闭rich_editor.js log 2019-05-24 14:21:10 +08:00
49fab9ed04 游戏详情判断是否安装该游戏时进行包名过滤 2019-05-24 11:44:04 +08:00
1cd1b578ec merge 2019-05-24 11:27:28 +08:00
184c56aac5 光环助手V3.6.4 DEV(20190517-1020)测试问题汇总(游戏评分)(补充) 2019-05-24 11:25:26 +08:00
7c39037472 修复记录安装新应用时记录了错误应用名的问题 2019-05-24 11:12:13 +08:00
786a803793 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-24 10:58:52 +08:00
273f0e185d 修复关闭插件功能资讯和专题相关操作失效问题
修改游戏评分引用区域样式
2019-05-24 10:58:46 +08:00
eebc2c3940 统一已开通社区的列表排序 2019-05-24 10:25:05 +08:00
3a964d629e Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-24 09:49:57 +08:00
ff041f705e 光环助手V3.6.4 DEV(20190521-1900)测试问题汇总(前端)(2.3.4.5(1).19.20.21) https://gitlab.ghzs.com/pm/halo-app-issues/issues/530#note_21778 2019-05-24 09:49:41 +08:00
af62fc9a68 替换关闭评论图标 2019-05-23 18:20:44 +08:00
6ff415cc0d 完成光环助手应用数据上报功能 https://gitlab.ghzs.com/pm/halo-app-issues/issues/531 2019-05-23 18:04:53 +08:00
41de94e6f5 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-23 16:58:36 +08:00
60d91ca04e 光环助手V3.6.4 DEV(20190521-1900)测试问题汇总(编辑器)(1.5.6.7.9.10.12.13.15.16.17.18) https://gitlab.ghzs.com/pm/halo-app-issues/issues/529 2019-05-23 16:58:29 +08:00
19004b2073 完成V3.6.4DEV(20190521-1900)测试问题汇总(6,7,8,9,10,12,14,16,17,22) https://gitlab.ghzs.com/pm/halo-app-issues/issues/530 2019-05-23 16:42:01 +08:00
70b536e6bd 修复社区编辑器插入自定义样式问题(上次兼容性修改遗留) 2019-05-23 14:36:45 +08:00
5009678587 本地JS与远程同步 2019-05-23 11:07:55 +08:00
a7a01bbe16 修复社区编辑框不兼容个别机型问题(VIVO x7 5.1.1) 2019-05-23 11:04:57 +08:00
9b2ce51c87 更换引导图 2019-05-22 16:46:36 +08:00
c735d4e717 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-22 16:26:10 +08:00
6fb4dac45d update CHANGELOG 2019-05-22 16:26:02 +08:00
3d49258b84 优化代码结构 2019-05-22 16:15:41 +08:00
c23aa12d09 优化编辑回答的接口异常处理 2019-05-22 16:08:58 +08:00
6f6ddf9fbd 更换引导图 2019-05-22 10:33:59 +08:00
63837b5c31 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-21 16:28:31 +08:00
27e245c241 我的关注不能点击关联关注进行关注操作 2019-05-21 16:28:24 +08:00
7775494ade 完成3.6.4 DEV(20190517-1020)测试问题汇总的(3,4,7,8,9,10,11,17,18) https://gitlab.ghzs.com/pm/halo-app-issues/issues/525 2019-05-21 16:12:06 +08:00
a3ce139b86 曝光增加 ROM 字段 2019-05-21 16:11:03 +08:00
ad470f10f4 光环助手V3.6.4 DEV(20190517-1020)测试问题汇总(编辑器)(1.2.3.4.5.6.8.9) https://gitlab.ghzs.com/pm/halo-app-issues/issues/527 2019-05-21 16:06:20 +08:00
302d12083b 光环助手V3.6.4 DEV(20190517-1020)测试问题汇总(游戏评分)(1.4.5.6.7.8.9.10.11) https://gitlab.ghzs.com/pm/halo-app-issues/issues/526 2019-05-21 11:17:29 +08:00
d40dd15af4 撰写回答页面添加我来回答遮罩 2019-05-20 15:28:18 +08:00
440eb8a07b 完成DEV(20190515-1900)测试问题汇总(1,2,3,16,17,18) https://gitlab.ghzs.com/pm/halo-app-issues/issues/524 2019-05-20 11:47:17 +08:00
361b861d5f 修复部分(关注/收藏)按钮,登录后不能即时刷新问题 2019-05-20 11:24:20 +08:00
b518b2961a Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-17 18:24:38 +08:00
bfae4e1501 光环助手V3.6.4 DEV(20190515-1900)测试问题汇总(前端)(10.14.15) https://gitlab.ghzs.com/pm/halo-app-issues/issues/524#note_21505 2019-05-17 18:24:32 +08:00
d3e13dd8c6 完成需求 MTA 补充需求 2019-05-17 17:27:42 +08:00
073c35ca08 浏览记录去掉游戏名称后缀 2019-05-17 17:27:19 +08:00
99b4373561 处理闪退问题 2019-05-17 17:26:51 +08:00
52dcea477e 评分相关间距调整 2019-05-17 17:03:53 +08:00
6abb8d715b Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-17 16:36:53 +08:00
51016b0704 社区编辑框插入链接样式时先将当前blockquote标签换成p标签再插入 2019-05-17 16:36:47 +08:00
d14c150070 完成需求'所有游戏名字处理成“名称+后缀”的格式的' https://gitlab.ghzs.com/pm/halo-app-issues/issues/521 2019-05-17 16:28:32 +08:00
f59f8a3e5b 完成光环前端需求汇总(2019年5月第3周)(1,3,11,12,13) https://gitlab.ghzs.com/pm/halo-app-issues/issues/522 2019-05-17 15:02:56 +08:00
965be0b5cd Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-17 14:40:46 +08:00
716900fc5d 社区编辑框增加长按选择回调 2019-05-17 14:40:31 +08:00
14280d802e 更改回答详情和文章详情底部按钮图标 2019-05-17 11:32:03 +08:00
39924857e5 我的游戏页面进行包名过滤处理 2019-05-17 10:51:47 +08:00
c88bda6615 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-16 18:37:47 +08:00
ecb80ca70d 光环助手V3.6.4 DEV(20190513-1900)编辑器相关(1.3.4.6.7.8.9.11.17) https://gitlab.ghzs.com/pm/halo-app-issues/issues/519#note_21413 2019-05-16 18:37:38 +08:00
51b03b78ce 在插入内容的 div 里添加 class 帮助后端生成摘要时去掉不需要的内容 2019-05-16 18:20:28 +08:00
a7fd029ed2 反馈提交的字段修改 2019-05-16 16:01:31 +08:00
5beb29ad09 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-16 15:03:57 +08:00
e7dc2ca810 光环前端需求汇总(2019年5月第3周)(5.6.7.9) https://gitlab.ghzs.com/pm/halo-app-issues/issues/522#note_21366 2019-05-16 15:03:45 +08:00
b5ce0db1ff 将 JS 和 CSS 的引用改为远端 2019-05-16 10:22:41 +08:00
c8b52902e9 评分相关的POST请求进行错误处理 2019-05-16 09:36:28 +08:00
dbc4e0ac26 历史搜索清空图标自适应宽高 2019-05-15 18:18:22 +08:00
a0d2860970 修改游戏搜索历史页面样式 2019-05-15 18:06:37 +08:00
77c1a05a4a 修改资讯中心标签样式 2019-05-15 17:59:23 +08:00
aeee2e049d 回答/文章 插入链接的默认图片换成网络图片 2019-05-15 17:13:21 +08:00
525b184ad4 游戏评论详情增加下载相关逻辑 2019-05-15 16:14:05 +08:00
76e0fe9f9a 光环助手V3.6.4 DEV(20190513-1900)游戏评分相关(2.4.5.6.8.9.12.13.16.18.19.20.21) https://gitlab.ghzs.com/pm/halo-app-issues/issues/520 2019-05-15 15:14:30 +08:00
06ddef114c Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-14 14:48:52 +08:00
32cdcc1304 光环助手V3.6.4 DEV(20190509-1900)测试问题汇总(前端)(3.4.5)https://gitlab.ghzs.com/pm/halo-app-issues/issues/516#note_21124 2019-05-14 14:48:40 +08:00
4a2b414b59 社区选择列表增加关联置顶 2019-05-14 11:29:04 +08:00
937497aec9 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-13 18:18:15 +08:00
38d2c189e8 游戏详情标签样式由后台控制 2019-05-13 18:18:02 +08:00
57aeacf3f5 完成光环前端需求汇总(2019年4月第3周)(1,4,5) https://gitlab.ghzs.com/pm/halo-app-issues/issues/495 2019-05-13 16:53:47 +08:00
fe4036b768 完成光环助手V3.6.4数据统计需求(光环数据后台) https://gitlab.ghzs.com/pm/halo-app-issues/issues/509 2019-05-13 15:43:41 +08:00
5dd479c492 完成光环助手V3.6.4数据统计需求(光环数据后台) https://gitlab.ghzs.com/pm/halo-app-issues/issues/509 2019-05-13 15:15:27 +08:00
5f1ff1fc6f Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-13 14:22:44 +08:00
b08fb1f170 光环前端需求汇总(2019年4月第5周)(3.6.9.10.13) https://gitlab.ghzs.com/pm/halo-app-issues/issues/512#note_21125 2019-05-13 14:20:57 +08:00
e2f6180d6d 完成光环助手V3.6.4数据统计需求(MTA) https://gitlab.ghzs.com/pm/halo-app-issues/issues/510 2019-05-13 11:00:02 +08:00
90d19ea381 补充下载进度超过 100% 的错误回调 2019-05-13 10:58:48 +08:00
13738f08eb 复用 Gson 对象 2019-05-13 10:00:08 +08:00
1b76184946 光环前端需求汇总(2019年4月第4周)(1.3.4.5.6.7.11.13) https://gitlab.ghzs.com/pm/halo-app-issues/issues/501#note_21126 2019-05-12 18:34:50 +08:00
711431f7c9 光环前端需求汇总(2019年4月第4周)(1.3.4.5.6.7.11.13) https://gitlab.ghzs.com/pm/halo-app-issues/issues/501#note_21126 2019-05-12 18:31:42 +08:00
4ea3f7ccf0 完成光环前端需求汇总(2019年4月第5周)的(2, 4, 5, 11, 12) https://gitlab.ghzs.com/pm/halo-app-issues/issues/512 2019-05-12 17:20:44 +08:00
80cd86ea29 优化游戏评论详情刷新问题 2019-05-10 17:05:56 +08:00
f87bb6cd06 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-10 16:41:10 +08:00
ea726a22bd 游戏评论相关优化 2019-05-10 16:41:02 +08:00
7e3afe7d70 Merge branch 'xiechanghong' into 'dev'
UI 变更

See merge request !5
2019-05-10 15:45:50 +08:00
8131c58fbf 规范化代码格式 2019-05-10 15:33:51 +08:00
674e32a096 优化上一版的代码问题 2019-05-10 11:52:40 +08:00
f5d42a3e01 优化上一版的代码问题 2019-05-09 20:48:05 +08:00
a079a03adc 首页猜你喜欢列表增加隐藏包过滤 2019-05-09 17:59:28 +08:00
8485f94133 优化内容:①文本输入框达到字数上限之后,继续输入内容直接出现Toast提示,不会把最后面的内容删掉,且光标停留在当前位置②如果发生闪退,再次打开光环时会提示立即反馈,这时如果玩家提交成功,会再次出现联系客服弹窗,点击"联系客服" 即直接跳转打开客服QQ对话页面 2019-05-09 17:01:59 +08:00
5d60a8f03b Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/retrofit/service/ApiService.java
2019-05-09 16:52:16 +08:00
ec4319b74a 增加游戏评论相关的消息中心操作 2019-05-09 16:50:15 +08:00
41c3f9d073 更改游戏浏览记录的数据库结构 (从上几个测试版覆盖安装将清空所有浏览记录) 2019-05-09 14:04:05 +08:00
c27990b395 完成回答详情/社区文章详情增加反对功能 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/505 2019-05-08 18:43:10 +08:00
2e9a823ee1 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-08 17:42:01 +08:00
590afccae7 游戏详情-评论 增加小编评论 2019-05-08 17:41:53 +08:00
7a82780826 接入新的版主权限管理 2019-05-08 17:26:57 +08:00
c75e363a06 添加浏览记录图标 2019-05-08 17:12:24 +08:00
573b7b61cf Merge remote-tracking branch 'origin/dev' into dev
# Conflicts:
#	app/src/main/java/com/gh/common/util/Extensions.kt
2019-05-08 17:11:51 +08:00
9f9e1bc9fd 游戏评论/游戏评论详情完成'举报/复制'操作 2019-05-08 16:37:36 +08:00
34e11b1569 Merge remote-tracking branch 'origin/dev' into dev 2019-05-08 16:05:40 +08:00
cc7b77a8ad Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-08 11:50:42 +08:00
ed3a75ddc0 游戏评论详情页面用baseList实现 2019-05-08 11:50:26 +08:00
983c01df57 增加清除 HTML 标签的 extension 方法 2019-05-08 10:55:39 +08:00
9d95b7aa6b 修复首页游戏替换下拉刷新时会出现为确保页面游戏唯一而隐藏掉需要的游戏的问题 2019-05-08 10:06:19 +08:00
5319cb8679 回答详情页面增加反对功能(文章详情未完成) 2019-05-07 18:16:33 +08:00
b4b1a63c22 处理空指针异常 2019-05-07 09:52:03 +08:00
2dfd57de80 DataUtils 初始化同步执行 2019-05-06 18:22:56 +08:00
cbc8876656 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-06 15:39:46 +08:00
4e6b8bf6b3 优化游戏评论回复操作 2019-05-06 15:39:33 +08:00
da92826f6a 清理回答详情页面的无用代码 2019-05-06 11:13:44 +08:00
f1a4e429f3 修复回答详情预加载也会产生阅读时长的问题 2019-05-06 09:29:18 +08:00
3cd248a2c5 基本完成我的光环增加浏览记录需求 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/500#note_20735 2019-05-05 17:53:22 +08:00
7f5dd97359 统一游戏评论item数据设置 2019-05-05 17:37:12 +08:00
c0ee431d1f Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-05-05 15:12:53 +08:00
f56de73eb6 完成游戏评论详情(回复)相关页面展示/分页/跳转/点赞操作 2019-05-05 15:12:36 +08:00
a0b5cd00d5 修复一个数组越界问题 2019-05-05 09:45:36 +08:00
66b5f3d896 调整回答详情页面的结构,增加回答详情的浏览记录 2019-05-04 16:48:19 +08:00
a4346a6f34 游戏评分评论详情页面(未完待续...) 2019-05-04 16:32:26 +08:00
83894f6530 修改游戏评分样式
增加游戏评分评论详情页面
2019-04-30 18:30:03 +08:00
9b776bb029 我的关注增加关联关注 2019-04-30 10:48:16 +08:00
ea72fb09e0 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-04-29 10:58:11 +08:00
b2b390cf8b community keep position when update search 2019-04-29 10:57:46 +08:00
926abe248f Merge branch '3.6.3-log-fixd' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-04-29 09:30:58 +08:00
95468cf83e 更新百度推广激活接口 2019-04-28 17:38:16 +08:00
259b93eb25 修复错误的 MTA 事件命名 2019-04-28 16:49:01 +08:00
f59646643f 修复关闭评论页面软键盘没有隐藏的问题 2019-04-28 14:32:31 +08:00
7130417e60 增加记录推送点击事件失败重试 2019-04-28 11:28:50 +08:00
458a9f2a63 更新 API 至 3.6.4 2019-04-28 11:27:03 +08:00
0f85497f75 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-04-27 17:06:56 +08:00
3c0c6afd43 整理代码 2019-04-27 17:06:45 +08:00
345cdb41bc 完成首页游戏替换功能(第二期)https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/498 2019-04-26 18:12:47 +08:00
b78fa40eff 修复在小内存设备上加载本地应用图标会内存不够然后闪退的问题 2019-04-26 16:18:44 +08:00
193831ae7e VersionName:3.6.4 VersionCode:90 2019-04-26 15:43:21 +08:00
bcb9dc3ba8 修复 loghub 启动日志都变成都变成升级安装的问题 2019-04-25 11:57:59 +08:00
7903cdc44a Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-04-23 16:55:49 +08:00
a66c1ea50b 编辑框插入链接样式对以前版本隐藏 2019-04-23 16:55:33 +08:00
978e8f160b 修复 loghub 启动日志都变成都变成升级安装的问题 2019-04-23 14:52:08 +08:00
a49351a146 更改通用库 submodule 的远程地址 2019-04-22 16:27:04 +08:00
07d9b416a3 消息中心和系统推送添加跳转类型 2019-04-22 10:49:26 +08:00
f9edb69370 编辑插入回答/文章支持分享链接插入 2019-04-19 16:47:15 +08:00
deac313ba3 文章/回答详情处理链接跳转 2019-04-19 15:01:42 +08:00
b149f9acf2 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-04-19 09:59:35 +08:00
7c96ba090e 编辑框增加插入链接(文章,回答,游戏) 2019-04-19 09:59:18 +08:00
11ab908848 避免上传图片时闪退 2019-04-18 14:28:24 +08:00
3d2978b2e5 增加下载失败弹窗 2019-04-18 11:01:08 +08:00
7ad3a7ae92 下载进度超过100%的情况处理 2019-04-17 18:15:41 +08:00
9042488a65 把选择社区排序的操作放回主线程避免线程冲突造成闪退 2019-04-17 09:54:30 +08:00
b08e13f05a 捕抓发起网络重试请求时的各种异常 2019-04-17 09:53:20 +08:00
6271fd4998 编辑框增加插入文章 2019-04-16 16:08:09 +08:00
4d747a3df3 Merge branch 'dev-logo' into 'dev'
logo 添加多种尺寸

See merge request !4
2019-04-15 19:10:19 +08:00
5ce057d40e logo 添加多种尺寸 2019-04-15 19:01:55 +08:00
1e2e8f932f 编辑框增加插入游戏和插入回答页面 2019-04-15 18:03:45 +08:00
5accb9c1f1 Merge branch 'answer_animation' into 'dev'
答案详情页优化变更

See merge request !3
2019-04-15 11:52:08 +08:00
5b102d65c7 完成了光环前端需求汇总(2019年4月第2周)的(4,5,6,8) https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/490 2019-04-15 11:51:04 +08:00
c609ddd721 修复了图片后有文字时不能删除图片的问题 2019-04-12 14:38:39 +08:00
0c3783d127 避免重复发送答案阅读事件 2019-04-12 14:24:17 +08:00
f702ab6115 修复回答图片后有文字不能删除的问题 2019-04-11 17:54:00 +08:00
7dd760e0fb 尝试将回答详情的上下滚动改以 viewpager 实现 2019-04-09 18:08:58 +08:00
c6f3b5998c tinkerBase 3.6.3 2019-04-08 19:11:47 +08:00
28440d97de 删除无用代码 2019-04-08 18:00:21 +08:00
2b2b71fe01 资讯文章超链接支持跳转到社区文章 2019-04-04 16:21:50 +08:00
f5a9e7b487 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-04-03 17:56:56 +08:00
d43842a0e6 社区搜索新增页面增加关键字统计和点击跳转时增加到历史搜索 2019-04-03 17:56:42 +08:00
a557962f17 微调UI 2019-04-02 18:32:49 +08:00
560c682157 完成光环助手V3.6.3 RELEASE(20190402-1130)测试问题汇总(6,7,8) 2019-04-02 17:41:48 +08:00
a0ae36f511 修复问题编辑图片数量的显示错误问题 2019-04-02 15:57:21 +08:00
bdee17ffc4 修复社区选择排序问题 2019-04-02 09:59:12 +08:00
5829f09f8c 调整文案 2019-04-01 20:18:00 +08:00
bc6fa5e7db 更换编辑框图标 2019-04-01 18:07:06 +08:00
1607cea9ce Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-04-01 17:58:33 +08:00
426019ea7c 光环助手V3.6.3 RELEASE(20190331-1830)测试问题汇总(前端)(1.3.4.10) https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/483 2019-04-01 17:57:08 +08:00
1b878a50c4 调整关闭评论点击的 toast 文案 2019-04-01 17:13:43 +08:00
97525189b7 调整反馈文案 2019-04-01 16:59:38 +08:00
999947751a 修复回答浮窗在用户退出登录后也有可能显示的问题 2019-04-01 16:40:56 +08:00
2def61ab43 修复光环助手V3.6.3 RELEASE(20190331-1830)测试问题汇总(6,7,8,9) https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/483 2019-04-01 16:28:17 +08:00
5e07ef488c 整理重复定义的权限 2019-04-01 11:10:40 +08:00
7af47c0caf 调整资源位置 2019-04-01 11:10:12 +08:00
1a5ed3c05f 调整代码 2019-03-31 17:05:47 +08:00
9cc9b09861 光环助手V3.6.3 RELEASE(20190328-1930)测试问题汇总(前端)(5.6.7.8.13) https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/480 2019-03-31 15:21:12 +08:00
cef4432d97 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-03-31 14:17:02 +08:00
18be6acc34 光环助手V3.6.3 RELEASE(20190329-1930)测试问题汇总(前端)(1.2.3.8.9) https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/482 2019-03-31 14:16:27 +08:00
27d0dd40d0 修复了版主不能修改问题图片数量的问题 2019-03-30 17:13:33 +08:00
b05fa626f6 处理一些内存泄漏问题 2019-03-30 14:41:31 +08:00
f1fc84ea5f 修复答案被隐藏时的闪退问题 2019-03-30 14:40:55 +08:00
3942154c05 修复缺少路径引起的闪退问题 2019-03-30 14:23:52 +08:00
ff182ee3c7 修复了光环助手V3.6.3 RELEASE(20190328-1930)测试问题汇总的(1,2,9,10,11) https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/480 2019-03-30 10:38:01 +08:00
10cc275970 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/qa/AskFragment.kt
2019-03-29 17:03:41 +08:00
21821d584e 光环助手V3.6.3 DEV(20190328-1830)测试问题汇总(前端)(1.6.7.13.14.15) https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/479 2019-03-29 17:01:43 +08:00
6b8716eff8 补充社区搜索事件 MTA https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/478 2019-03-29 15:58:28 +08:00
47434e2943 处理了环助手V3.6.3 DEV(20190328-1830)测试问题汇总的(3,4,5,8,10,12) 2019-03-29 15:05:29 +08:00
4c3b327cff 完成数据统计需求 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/477 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/478 2019-03-29 11:00:37 +08:00
3454d13e48 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-03-28 20:55:58 +08:00
0aad7c59ee 源码引入matisse库 2019-03-28 20:55:49 +08:00
ee8e4e0338 修复社区文章无法置顶的问题 2019-03-28 18:29:50 +08:00
a430c51c97 让测试社区隐藏了也能点击进入 2019-03-28 18:20:53 +08:00
b59508e9e5 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-03-28 16:58:36 +08:00
08deac1dea 光环助手V3.6.3 DEV(20190327-1830)测试问题汇总(前端)(6.8.13.14.15) https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/476 2019-03-28 16:58:28 +08:00
a2dc3f3d5b 修复了部分 光环助手V3.6.3 DEV(20190327-1830)测试问题 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/476 2019-03-28 16:25:42 +08:00
679cfab088 社区搜索历史页面间距微调 2019-03-28 10:11:22 +08:00
9144595aaf 修复打包错误问题 2019-03-27 18:44:36 +08:00
8a545180a2 文章详情-评论详情UI微调 2019-03-27 17:37:56 +08:00
17c5793558 增加关闭评论确定弹窗 2019-03-27 16:15:05 +08:00
8afc346a2c 添加测试用的推送点击 toast 2019-03-27 15:49:35 +08:00
026bb7f67b 添加 CSS 和 JS 的外联依赖 2019-03-27 15:48:39 +08:00
b971e7dbf6 添加敏感词错误码 2019-03-27 15:48:00 +08:00
ec39ef16e4 优化社区搜索历史数据库操作 2019-03-27 11:14:51 +08:00
ae07bacbb7 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-03-27 10:41:44 +08:00
0f0d8da6cd merge 2019-03-27 10:41:37 +08:00
2a1c99efac 社区搜索热门增加置顶功能 2019-03-27 10:40:01 +08:00
caa89d3f4c 修复了回答详情列表较长上下滑动时会存在偏移的问题 2019-03-27 10:26:24 +08:00
1602816d08 调整回答详情上下滑动动画距离 2019-03-26 19:58:50 +08:00
1062cf5924 处理一些内存泄漏问题 2019-03-26 19:45:46 +08:00
f6e5cd3fd7 更新微信分享、登录SDK 2019-03-26 18:14:06 +08:00
c675196cb2 修复一些闪退问题 2019-03-26 16:35:21 +08:00
8b9c2668d1 完成3月第4周需求汇总 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/475 2019-03-26 15:54:43 +08:00
c1a927ed88 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-03-26 15:09:56 +08:00
4d4416c1df 社区搜索增加文章和用户模块 2019-03-26 15:09:46 +08:00
f4833983c0 完成3月第3周需求汇总 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/473 2019-03-26 11:24:05 +08:00
89eb99d813 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-03-25 18:28:00 +08:00
683a68d179 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/qa/answer/detail/AnswerDetailFragment.kt
#	app/src/main/java/com/gh/gamecenter/retrofit/service/ApiService.java
2019-03-25 18:26:13 +08:00
598af67338 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev
# Conflicts:
#	app/src/main/java/com/gh/gamecenter/qa/answer/detail/AnswerDetailFragment.kt
#	app/src/main/java/com/gh/gamecenter/retrofit/service/ApiService.java
2019-03-25 18:25:41 +08:00
d9d0ffc3b9 基本完成社区前端优化需求汇总 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/470 2019-03-25 18:16:18 +08:00
4d8e04580e 1.问答模块增加提问悬浮按钮
2.问答搜索增加默认搜索文案
3.问答搜索增加热门搜索区域
2019-03-25 18:15:17 +08:00
cfaddf2f22 基本完成社区版主权限强化需求 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/471 2019-03-25 16:45:42 +08:00
c72b194107 优化问答模块社区隐藏的交互 2019-03-25 14:27:09 +08:00
d7f33ff8b1 修复编译问题 2019-03-23 17:33:31 +08:00
91e491b66a 基本完成回答详情与社区文章详情优化 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/463 2019-03-23 17:26:16 +08:00
31b7e40ab0 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-03-22 18:58:53 +08:00
f2b094fff0 统一内容数值显示规则 完成 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/468 2019-03-22 18:54:55 +08:00
185ee7f0f4 调整选择游戏社区的排序,已安装相应游戏的放到最前 2019-03-22 18:25:14 +08:00
f446b15f7a Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-03-22 18:01:03 +08:00
52a833f18b 社区文章/回答 富文本编辑框统一插入样式 2019-03-22 18:00:51 +08:00
37fc68977c 根据接口调整回答详情的可拖动切换设定 2019-03-22 15:50:11 +08:00
96ee71a594 Merge remote-tracking branch 'origin/dev' into dev 2019-03-22 10:55:35 +08:00
1c2dda9353 基本完成提问与问题详情优化需求 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/464 2019-03-22 10:55:07 +08:00
96a9fd0ad7 富文本编辑框增加引用样式 2019-03-22 10:51:37 +08:00
c53c27e350 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-03-21 15:25:39 +08:00
fd4f32bb3c 回答编辑框增加各种内容样式 2019-03-21 15:25:31 +08:00
cbd2d8ed6c 修复图片上传闪退BUG 2019-03-20 18:32:11 +08:00
3dd06bc620 简单处理问题页面多张图片上传 2019-03-20 18:28:17 +08:00
3a829e1cfd 重构回答编辑 2019-03-20 15:40:48 +08:00
183e1a85c3 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-03-20 10:55:09 +08:00
6b696234ab 回答编辑支持批量插入图片 2019-03-20 10:54:58 +08:00
21ac1d1f17 基本完成答案详情上下滑动功能,待接口数据再调试 2019-03-20 10:23:33 +08:00
4163b81f70 Merge head 2019-03-19 18:10:34 +08:00
6c3268ce72 简单包裹答案详情页面以实现上下拖拽切换回答 2019-03-19 18:08:06 +08:00
4d87f86fcd Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-03-19 14:40:20 +08:00
4a37401dc2 RichEditor增加元件样式回调 2019-03-19 14:40:06 +08:00
8cf90193fc 修复一个数组越界造成的闪退问题 2019-03-18 16:12:27 +08:00
9942a51cad Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-03-11 18:24:47 +08:00
4980d96c8c 修复当后台返回错误的游戏标签时会闪退的问题 2019-03-11 18:24:37 +08:00
f32c8748ed Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-03-11 18:10:26 +08:00
7b886679e1 修改礼包图标大小 2019-03-11 18:08:52 +08:00
2620c04b09 捕抓闪退异常 (ObservableUtil 这个地方贡献了得有40%的闪退量) 2019-03-10 10:07:03 +08:00
c22157f2f5 修复了关注页面被销毁网络回调回来会导致闪退的问题 2019-03-08 09:44:54 +08:00
09f02bc225 修复插件化隐藏后无法一键修复问题 2019-03-07 15:57:38 +08:00
9fc9549a28 光环前端需求汇总(2019年3月第1周)(1.4.6.7.8)https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/461 2019-03-07 14:55:35 +08:00
0099afad09 update changelog 2019-03-04 10:00:08 +08:00
3e512634c6 tinkerBase:3.6.2 2019-03-04 09:51:55 +08:00
7045354808 修复推送系统通道内容乱码问题 2019-02-28 23:25:22 +08:00
dbcc97a250 修复版本说明弹窗圆角 2019-02-28 19:28:20 +08:00
050081b7b1 修复版本说明弹窗大小 修改求版本文案 2019-02-28 18:04:57 +08:00
993d1e7635 UI调整 2019-02-28 10:07:48 +08:00
a86a3c1f71 修复了游戏详情下载按钮文字过多导致超出可是范围的问题 2019-02-27 17:54:41 +08:00
b0a192ad9a 修复了未登录时游戏动态的热门推荐区域不显示的问题 2019-02-27 17:31:51 +08:00
ea7b478c6b Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-02-27 16:23:01 +08:00
b673383f59 修复文章详情引用评论隐藏后没有显示"该内容已被隐藏"问题 2019-02-27 16:22:27 +08:00
06ae366b74 修复隐藏入口后一键修复无法即时更新页面问题 2019-02-27 16:20:57 +08:00
6b9cf7094e 修复关注页面刷新不及时的问题 2019-02-27 15:45:38 +08:00
5ae22bd2bc 修复了用户没有登录也能看到消息中心推送的问题 2019-02-27 10:40:46 +08:00
e951551531 修复了答案详情点击更多会闪退的问题 2019-02-27 10:39:50 +08:00
272e5fb6cc 调整专栏阅读日志的默认值 2019-02-26 14:49:42 +08:00
7dc17d09c1 记录专栏的阅读位置信息 2019-02-26 14:29:39 +08:00
cfacbe739d 修复一些空指针异常 2019-02-26 10:10:29 +08:00
0a72226ba5 下载平台面板增加翻页提示 2019-02-25 10:56:25 +08:00
5f22a14643 整理部分代码 2019-02-24 15:14:42 +08:00
5562e38c2f Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-02-24 11:16:58 +08:00
f9027f7a61 消息中心样式修改 2019-02-24 11:16:46 +08:00
6d0e437ad4 完成 MTA 统计需求 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/456 2019-02-23 11:40:19 +08:00
3abc53d3b3 完成首页游戏替换功能 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/447 2019-02-23 10:33:55 +08:00
d0e4c2c3ab 补充注释 2019-02-22 15:39:09 +08:00
5be50c1638 修复数据统计缺失社区ID的问题 2019-02-22 15:38:31 +08:00
7c525aec79 推送功能优化 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/451 2019-02-22 15:35:11 +08:00
63d5edf892 光环前端需求汇总(2019年2月第4周)(2.3.6.7)https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/452 2019-02-22 15:32:34 +08:00
c9f2cf178a 去掉推送通知的本地过滤 2019-02-22 10:14:37 +08:00
fc98de3bc0 更换广点通接入帐号 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/454 2019-02-22 09:59:36 +08:00
dd8360f5e8 游戏下载面板增加公告(补充) 2019-02-21 11:13:06 +08:00
bc9b815b47 DownloadDialog 去除单例 2019-02-20 14:41:15 +08:00
2a93995221 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-02-20 10:32:15 +08:00
0e93f6521c 版本升为3.6.2 2019-02-20 10:32:09 +08:00
b3a6d0ce94 修复横排专题的曝光出现内容错乱的问题 2019-02-19 18:11:38 +08:00
de60d05190 插件游戏求版本功能完善 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/450#note_17274 2019-02-19 15:42:22 +08:00
2a2ce9a490 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-02-19 11:32:42 +08:00
639644e3c3 游戏下载面板增加公告功能 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/449#note_17186 2019-02-19 11:30:52 +08:00
2378e6e94e 基本完成首页游戏替换功能(本地测试通过,暂未与后台调试) https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/447 2019-02-18 15:33:12 +08:00
87d9feae70 修改 Gson 的对象化实现,避免类型擦除 2019-02-18 15:27:49 +08:00
4a93d129bb 游戏下载面板增加公告 2019-02-16 15:46:15 +08:00
39e5e2e9f9 渠道包功能开关控制规则优化(未测试) https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/448 2019-02-15 16:07:30 +08:00
8a5f777c65 社区和文章评论被删除的默认文案颜色修改 2019-02-14 10:48:53 +08:00
22c693e042 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-02-13 18:25:13 +08:00
36d04f5841 意见反馈修改 光环前端需求汇总(2019年2月第3周)(8.9.10.11) https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/445#note_17027 2019-02-13 18:25:05 +08:00
409123337d 统一游戏动态和我的关注页面的游戏推荐样式 2019-02-13 17:32:06 +08:00
b180a210cb Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-02-13 15:38:40 +08:00
32dfdc4d08 更改草稿刷新逻辑 光环前端需求汇总(2019年2月第3周)(3) 2019-02-13 15:38:35 +08:00
4d46888995 修复更新非活跃状态的页面造成的闪退问题 2019-02-13 14:27:31 +08:00
69db836231 修复问题详情和答案详情页面会丢失部分阅读时长统计的问题 2019-02-12 17:46:54 +08:00
f82b9ad308 修复进入有视频的游戏详情时会造成手机被静音的问题 2019-02-12 15:14:46 +08:00
3ac91b1216 修复重复初始化七陌客服SDK造成后台产生空的聊天条目的问题 2019-02-11 15:36:05 +08:00
8d4b3e0851 修复更新非活跃状态的页面造成的闪退问题 2019-02-11 10:39:11 +08:00
67d8f46217 反馈图标大小自适应 2019-01-30 17:18:57 +08:00
f357136936 update CHANGELOG
3.6.1 Tinker Base
2019-01-30 15:48:00 +08:00
9d622d2be9 消息中心标黄内容复制后去除前后空格 2019-01-30 09:46:52 +08:00
800525227d update MessageSpannableTextView 2019-01-29 18:25:09 +08:00
c9dec9a31e 草稿刷新时定位到列表顶部 2019-01-29 16:23:57 +08:00
2ae4fda6e8 优化ListViewModel 2019-01-28 19:26:02 +08:00
609702715f Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-01-28 17:59:06 +08:00
ec7e138208 光环助手V3.6.1 RELEASE(20190128-1200)测试问题汇总(2.4) https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/443 2019-01-28 17:58:25 +08:00
bfd64a8bce 修复开服表曝光的提交问题 2019-01-28 17:12:15 +08:00
5571b6481f Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-01-28 11:31:25 +08:00
6d6574988c 光环助手V3.6.1 RELEASE(20190125-1850)测试问题汇总(4.5.9.10.13) https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/442#note_16676 2019-01-28 11:31:13 +08:00
af8d075bf2 修复了下载插件化应用时的卡顿问题 2019-01-26 17:44:12 +08:00
b7db66e90b 专题答案列表显示发布时间 2019-01-26 11:32:20 +08:00
13ac4658d9 通过微信分享前先检测用户是否安装微信 2019-01-25 18:22:02 +08:00
8ad3420822 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-01-25 15:40:16 +08:00
f842ced67e 更换反馈图标 添加渠道号 2019-01-25 15:39:48 +08:00
e0081e56df Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-01-25 14:22:52 +08:00
3202764f22 屏蔽安卓 5.0 以下设备的视频播放功能 2019-01-25 14:22:39 +08:00
f477876359 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-01-25 14:08:26 +08:00
86ffcb92f8 admin api host -> 3.6.1
1月25补充优化
2019-01-25 14:08:18 +08:00
a2088e5cd9 修复问题详情页面的答案没有显示发布时间的问题 2019-01-25 09:58:38 +08:00
6e1247f393 消息客服跳转过滤无链接数据 2019-01-24 18:19:27 +08:00
c33faa4918 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-01-24 15:39:57 +08:00
d0aeb1c411 修改反馈文案
修复插件化完成后更新不及时问题
2019-01-24 15:39:33 +08:00
485924527e 避免发送无用的关注请求 2019-01-24 15:19:15 +08:00
ca1bfda326 更换反馈图标 2019-01-23 18:31:27 +08:00
c7c786d662 修改社区搜索路径关键字 2019-01-23 17:47:02 +08:00
acf9fe308c 光环助手V3.6.1数据统计需求(光环数据后台) https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/440 2019-01-23 16:59:53 +08:00
3b32231709 修复嵌套 recyclerview 因为焦点获取而触发莫名位移的问题 2019-01-23 16:43:18 +08:00
9dae198af2 修复曝光下载完成事件里 payload 没有游戏 id 的问题 2019-01-23 14:50:53 +08:00
29bfd5bb93 处理空指针异常 2019-01-23 11:49:51 +08:00
8da51d7f5a 回答数量限制弹窗优化
优化消息中心标黄判断
2019-01-23 11:30:42 +08:00
91964a0ffc Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-01-22 19:17:26 +08:00
479ef20859 dev api host -> 3.6.1
光环助手V3.6.1-消息中心优化(测试未通过)  https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/435
2019-01-22 19:17:08 +08:00
f458b7dcb8 将MTA的[游戏详情]计算事件换成普通事件[游戏详情_新] 2019-01-22 18:24:31 +08:00
2d25ff7836 开服表添加曝光统计 2019-01-22 18:13:46 +08:00
57dd5d0584 关注游戏区分自动和手动 2019-01-22 18:13:18 +08:00
757efec05e 回答卡片增加回答发布时间 2019-01-22 18:12:21 +08:00
4979045be2 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-01-21 17:00:59 +08:00
f59af60f70 游戏详情增加社区跳转提示 2019-01-21 17:00:04 +08:00
60bc2a02f4 修复一些闪退问题 2019-01-21 16:21:34 +08:00
996be3906e versionCode->60 versionName->3.6.1 2019-01-21 15:55:50 +08:00
14a054bdbc 游戏详情 增加加载骨架 2019-01-21 15:50:36 +08:00
07a9fd6273 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-01-21 14:43:21 +08:00
a067f7bc43 礼包详情/专题详情 增加加载骨架 2019-01-21 14:43:11 +08:00
a5eefbb6f4 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-01-21 10:57:35 +08:00
8d9f83c432 处理值转换异常 2019-01-21 10:57:24 +08:00
ae0df36a89 处理非空异常 2019-01-21 10:56:44 +08:00
72539671a1 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-01-21 10:31:43 +08:00
94277a4aeb 游戏分类增加加载骨架 2019-01-21 10:31:25 +08:00
e276d148cf 统一文本输入框的超出字数逻辑 2019-01-20 18:34:34 +08:00
a7152034e8 修复上传弹窗重复显示问题 2019-01-20 16:54:16 +08:00
4a5e9da34a 可以由后台控制关闭资讯相关的功能 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/434 2019-01-20 14:23:29 +08:00
1422365cc5 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-01-20 10:17:36 +08:00
7f55ff6340 根据包名过滤下载按钮状态 2019-01-20 10:17:23 +08:00
4722626fb7 添加百度信息流激活统计请求 2019-01-17 17:07:08 +08:00
39d87ad98d 图片加载支持 gif 2019-01-17 17:06:20 +08:00
85333b9eed 更新七陌客服 SDK 2019-01-17 16:03:58 +08:00
c99ae6db3e 修复游戏列表下载状态异常问题 2019-01-17 15:25:48 +08:00
c5be98adc2 修复手机没有图片选择应用时调用会崩溃的问题 2019-01-16 19:08:18 +08:00
5321aa2e9f Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-01-16 19:00:50 +08:00
345707ef42 光环前端需求汇总(2019年1月第3周)1.9.11 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/432 2019-01-16 18:35:22 +08:00
6a9d05d916 修复部分以 .html 结尾的下载链接无法下载的问题 2019-01-16 15:45:40 +08:00
faf2a89706 修复了 GID 初始化顺序不一造成的闪退问题 2019-01-15 11:29:57 +08:00
ada51f90f1 修复了一个数组越界造成的闪退问题 2019-01-15 10:08:18 +08:00
53962116d5 修复了我的游戏中同包名游戏显示错误前缀以及安装包名刷新不及时的问题 2019-01-10 15:26:15 +08:00
3ea52745b3 如果已安装的是光环助手的游戏包那么对应的已安装列表只会存在一条已安装信息 2019-01-10 09:53:21 +08:00
a8f2289b27 Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev 2019-01-09 18:16:31 +08:00
6dd56b5d16 光环前端需求汇总(2019年1月第2周)(1.3.4.5.6.7) https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/428#note_15724 2019-01-09 18:15:45 +08:00
eb739cf6cb 修复了插件化弹窗安装状态更新不及时的问题 2019-01-09 17:08:18 +08:00
4853cd9047 修复了文章详情 gif 图片会闪烁的问题 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/424 2019-01-07 12:03:40 +08:00
4e0f14aeed 首页 tab 添加水波纹效果 2019-01-05 18:01:28 +08:00
5e37dac0f6 处理空指针异常 2019-01-05 10:06:01 +08:00
22bfa9051a 修复由于列表重用机制导致的游戏名字长度异常问题 2019-01-04 14:23:32 +08:00
0a1dca3aa3 修复游戏详情大家都在玩列表会显示下载'暂无'字样的游戏的问题 2019-01-04 10:55:15 +08:00
1733 changed files with 77341 additions and 36449 deletions

2
.gitmodules vendored
View File

@ -1,4 +1,4 @@
[submodule "libraries/LGLibrary"]
path = libraries/LGLibrary
url = git@gitlab.ghzhushou.com:client/client-common.git
url = git@gitlab.ghzs.com:android/common-library.git
branch = master

View File

@ -30,4 +30,60 @@
- 删除TINKER_VERISON_NAME
- tinker打包方式变更(以小版本作为Base包,防止与数据后台小版本更新发生冲突)
* 社区增加版主功能(版主可以对存在的相关内容进行修改/隐藏操作,内容包括问题/回答/回答评论)
* 社区互动引导优化(问答推荐增加`推荐关注`,回答详情增加一些交互动效)
* 社区互动引导优化(问答推荐增加`推荐关注`,回答详情增加一些交互动效)
### Ver 3.6.1
* 可以后台控制关闭资讯功能
* 版块、分类、专题详情、游戏详情、礼包详情增加预览骨架
* 下载按钮状态可以通过接口屏蔽相应的包
### Ver 3.6.2
* 资讯/问答入口和插件功能线上控制(不可逆)
* 首页不显示已安装的游戏
* 插件求版本功能增加内部跳转
* 下载面板增加公告和版本说明功能
* 接入腾讯`广点通`(广告)
### ver 3.6.3
* 社区搜索修改
- 增加 `文章/用户` 模块
- 增加 `搜索置顶` 功能
* 回答详情/社区文章详情修改
- 支持文案样式(加粗/斜体/删除线)和段落样式(引用/标题)
- 支持关闭评论功能
- 回答详情新增上下切换回答
* 社区编辑框(回答/文章)修改
- 支持批量插入图片(使用知乎Matisse实现)
- 新增插入特殊样式,文案样式(加粗/斜体/删除线)和段落样式(引用/标题)
* 编辑框部分 JS/CSS 使用远程文件
### ver 3.6.4
* 增加浏览记录(回答/文章/资讯/游戏)
* 回答/社区文章 增加反对功能
* 社区编辑框增加插入文章/回答/游戏
- 低版本兼容方案: 插入的样式默认隐藏,只有在3.6.4及以上才会显示
* 游戏详情评分模块增加`小编评论`区域以及样式修改
* 游戏评分增加回复功能
### var 3.6.5
* 以补丁方式向外推出并没有增加需求只是单纯的修BUG
### var 3.6.6
* 游戏详情:
- 支持修改评分
- 评分列表增加排序/过滤功能
- 增加弹出系统
* 社区相关:
- 选择社区页面重做
- 首页社区推荐增加推荐入口
- 首页社区问题模块改版,名称改为全部,去除问题分类(统一为问题列表),增加社区文章列表
* 游戏搜索默认页面改版
* 权限系统更改,不授权也可以进去App,申请权限细分到功能(用到某个功能时才需要强制授予权限)
* 增加隐私系统
* 增加游戏预约功能
* 增加标签详情模块
* 进入今日头条广告SDK
* 图片上传压缩机制优化
- 支持从后台修改上传配置(本该在早些版本实现,由于代码问题无法引用后台配置)
- 对压缩失败是进行catch(由于后台对宽高配置放宽,很容易发生OOM),失败后直接上传原图(这步可能会出现问题)
* 游戏相关UI修改

View File

@ -1,7 +1,6 @@
apply plugin: 'com.android.application'
apply plugin: 'org.jetbrains.kotlin.android.extensions'
apply plugin: 'kotlin-android' // kotlin
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
// apkChannelPackage
@ -38,14 +37,8 @@ android {
}
}
/**
* 只支持两种架构减少apk大小有疑问请参考
* https://developer.android.com/ndk/guides/abis.html
* http://allenfeng.com/2016/11/06/what-you-should-know-about-android-abi-and-so/
* 为了性能考虑armeabi可以考虑替换成armeabi-v7a[需要先收集用户设备情况]
*/
ndk {
abiFilters "armeabi", "x86"
abiFilters "armeabi-v7a", "x86"
}
// 由于app只针对中文用户所以仅保留zh资源其他删掉
@ -69,6 +62,11 @@ android {
buildConfigField "String", "MTA_APPKEY", "\"${MTA_APPKEY}\""
buildConfigField "String", "TD_APPID", "\"${TD_APPID}\""
/**
* Build Time 供区分 jenkins 打包时间用
*/
buildConfigField "long", "BUILD_TIME", "0"
}
// gradle 2.2以上默认同时启用v1和v2优先用于Android N
@ -91,7 +89,9 @@ android {
signingConfig signingConfigs.debug
buildConfigField "String", "EXPOSURE_REPO", "\"test\""
buildConfigField "String", "EXPOSURE_VERSION", "\"E2\""
buildConfigField "String", "EXPOSURE_VERSION", "\"E3\""
multiDexKeepProguard file("tinker_multidexkeep.pro")
}
release {
debuggable false
@ -101,7 +101,9 @@ android {
signingConfig signingConfigs.release
buildConfigField "String", "EXPOSURE_REPO", "\"exposure\""
buildConfigField "String", "EXPOSURE_VERSION", "\"E2\""
buildConfigField "String", "EXPOSURE_VERSION", "\"E3\""
multiDexKeepProguard file("tinker_multidexkeep.pro")
}
}
@ -115,10 +117,7 @@ android {
publish {
dimension "nonsense"
buildConfigField "String", "API_HOST", "\"${API_HOST}\""
buildConfigField "String", "USER_HOST", "\"${USER_HOST}\""
buildConfigField "String", "COMMENT_HOST", "\"${COMMENT_HOST}\""
buildConfigField "String", "LIBAO_HOST", "\"${LIBAO_HOST}\""
buildConfigField "String", "MESSAGE_HOST", "\"${MESSAGE_HOST}\""
buildConfigField "String", "DATA_HOST", "\"${DATA_HOST}\""
buildConfigField "String", "UMENG_APPKEY", "\"${UMENG_APPKEY}\""
@ -129,7 +128,6 @@ android {
buildConfigField "String", "MEIZUPUSH_APPKEY", "\"${MEIZUPUSH_APPKEY}\""
buildConfigField "String", "BUGLY_APPID", "\"${BUGLY_APPID}\""
}
// internal test dev host
internal {
@ -137,10 +135,7 @@ android {
versionNameSuffix "-debug"
buildConfigField "String", "API_HOST", "\"${DEV_API_HOST}\""
buildConfigField "String", "USER_HOST", "\"${DEV_USER_HOST}\""
buildConfigField "String", "COMMENT_HOST", "\"${DEV_COMMENT_HOST}\""
buildConfigField "String", "LIBAO_HOST", "\"${DEV_LIBAO_HOST}\""
buildConfigField "String", "MESSAGE_HOST", "\"${DEV_MESSAGE_HOST}\""
buildConfigField "String", "DATA_HOST", "\"${DEV_DATA_HOST}\""
buildConfigField "String", "UMENG_APPKEY", "\"${DEBUG_UMENG_APPKEY}\""
@ -153,11 +148,6 @@ android {
buildConfigField "String", "BUGLY_APPID", "\"${DEBUG_BUGLY_APPID}\""
}
}
// productFlavors.all { flavor ->
// flavor.manifestPlaceholders = [CHANNEL_VALUE: name]//命令 gradlew assembleRelease
// }
}
// apkChannelPackage
@ -194,14 +184,25 @@ dependencies {
debugImplementation "com.facebook.stetho:stetho-okhttp3:${stetho}"
debugImplementation "com.squareup.okhttp3:logging-interceptor:${okHttp}"
implementation "com.android.support:multidex:${multidex}"
implementation "com.android.support:design:${androidSupport}"
implementation "com.android.support:support-v4:${androidSupport}"
implementation "com.android.support:appcompat-v7:${androidSupport}"
implementation "com.android.support:cardview-v7:${androidSupport}"
implementation "com.android.support:support-annotations:${androidSupport}"
implementation "com.android.support:percent:${androidSupport}"
implementation "com.android.support.constraint:constraint-layout:${constraintLayout}"
implementation "androidx.core:core:${core}"
implementation "androidx.fragment:fragment:${fragment}"
implementation "androidx.multidex:multidex:${multiDex}"
implementation "androidx.appcompat:appcompat:${appCompat}"
implementation "androidx.cardview:cardview:${cardView}"
implementation "androidx.annotation:annotation:${annotation}"
implementation "androidx.constraintlayout:constraintlayout:${constraintLayout}"
implementation "androidx.recyclerview:recyclerview:${recyclerView}"
implementation "androidx.lifecycle:lifecycle-runtime:${lifeCycle}"
implementation "androidx.lifecycle:lifecycle-extensions:${lifeCycle}"
kapt "androidx.lifecycle:lifecycle-compiler:${lifeCycle}"
implementation "androidx.room:room-runtime:${room}"
implementation "androidx.room:room-rxjava2:${room}"
implementation "androidx.core:core-ktx:${ktx}"
kapt "androidx.room:room-compiler:${room}"
kapt "androidx.databinding:databinding-compiler:${databinding}"
implementation "com.google.android.material:material:${material}"
implementation "com.kyleduo.switchbutton:library:${switchButton}"
implementation "com.facebook.fresco:fresco:${fresco}"
@ -233,27 +234,17 @@ dependencies {
implementation "com.google.zxing:android-core:${zxing}"
implementation "com.daimajia.swipelayout:library:${swipeLayout}"
implementation("cn.trinea.android.view.autoscrollviewpager:android-auto-scroll-view-pager:${autoScrollViewPager}") {
exclude module: 'support-v4'
}
implementation "com.sina.weibo.sdk:core:${weiboSDK}"
// bugly with tinker support
implementation "com.tencent.bugly:crashreport_upgrade:${buglyTinkerSupport}"
implementation "pub.devrel:easypermissions:${easypermissions}"
// mvvm
implementation "android.arch.lifecycle:runtime:${archLifecycleVersion}"
kapt "android.arch.lifecycle:compiler:${archLifecycleVersion}"
implementation "android.arch.lifecycle:extensions:${archLifecycleVersion}"
implementation "android.arch.persistence.room:runtime:${archRoomVersion}"
kapt "android.arch.persistence.room:compiler:${archRoomVersion}"
implementation 'com.google.android:flexbox:1.1.0'
implementation 'com.google.android:flexbox:0.2.2'
implementation "pub.devrel:easypermissions:${easypermissions}"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
kapt 'com.android.databinding:compiler:3.1.3'
implementation 'com.contrarywind:Android-PickerView:4.1.3'
@ -265,24 +256,42 @@ dependencies {
implementation "top.zibin:Luban:${luban}"
implementation "com.squareup.picasso:picasso:${picasso}"
// for video streaming
implementation "cn.jzvd:jiaozivideoplayer:${jiaoziVideoView}"
implementation "com.danikula:videocache:${videoCache}"
implementation "com.shuyu:gsyVideoPlayer-java:$gsyVideo"
implementation "com.shuyu:gsyVideoPlayer-armv7a:$gsyVideo"
implementation "com.shuyu:gsyVideoPlayer-x86:$gsyVideo"
implementation "com.github.wendux:DSBridge-Android:$dsBridge"
implementation "android.arch.work:work-runtime:${workManager}"
implementation "com.llew.huawei:verifier:1.0.6"
implementation "com.github.tbruyelle:rxpermissions:${rxPermissions}"
implementation 'com.ethanhua:skeleton:1.1.1'
implementation 'io.supercharge:shimmerlayout:2.1.0'
implementation "com.tencent.mm.opensdk:wechat-sdk-android-without-mta:5.3.1"
implementation 'com.walkud.rom.checker:RomChecker:1.0.0'
debugImplementation "com.github.nichbar.chucker:library:$chucker"
releaseImplementation "com.github.nichbar.chucker:library-no-op:$chucker"
implementation 'com.aliyun.dpa:oss-android-sdk:2.9.2'
implementation "com.airbnb.android:lottie:$lottie"
implementation project(':libraries:gid')
implementation project(':libraries:LGLibrary')
implementation project(':libraries:MTA')
implementation project(':libraries:QQShare')
implementation project(':libraries:TalkingData')
implementation project(':libraries:UmengPush')
implementation project(':libraries:WechatShare')
// implementation project(':libraries:WechatShare')
implementation project(':libraries:LogHub')
implementation project(':libraries:im')
implementation project(':libraries:Matisse')
}
File propFile = file('sign.properties')
if (propFile.exists()) {

Binary file not shown.

Binary file not shown.

BIN
app/libs/applog-release.aar Normal file

Binary file not shown.

BIN
app/libs/gid-1.0.jar Normal file

Binary file not shown.

View File

@ -194,9 +194,9 @@
-ignorewarnings
-keep @android.support.annotation.Keep class *
-keep @androidx.annotation.Keep class *
-keepclassmembers class ** {
@android.support.annotation.Keep *;
@androidx.annotation.Keep *;
}
-keep class com.gh.loghub.** { *; }
@ -222,4 +222,22 @@
### 广点通
-dontwarn com.qq.gdt.action.**
-keep class com.qq.gdt.action.** {*;}
-keep class com.qq.gdt.action.** {*;}
### AndroidX
-keep class androidx.core.app.CoreComponentFactory { *; }
#阿里云上传
-keep class com.alibaba.sdk.android.oss.** { *; }
-dontwarn okio.**
-dontwarn org.apache.commons.codec.binary.**
#视频相关
-keep class com.shuyu.gsyvideoplayer.video.** { *; }
-dontwarn com.shuyu.gsyvideoplayer.video.**
-keep class com.shuyu.gsyvideoplayer.video.base.** { *; }
-dontwarn com.shuyu.gsyvideoplayer.video.base.**
-keep class com.shuyu.gsyvideoplayer.utils.** { *; }
-dontwarn com.shuyu.gsyvideoplayer.utils.**
-keep class tv.danmaku.ijk.** { *; }
-dontwarn tv.danmaku.ijk.**

View File

@ -1,472 +1,559 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android = "http://schemas.android.com/apk/res/android"
xmlns:tools = "http://schemas.android.com/tools"
package = "com.gh.gamecenter" >
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.gh.gamecenter">
<!-- 允许应用程序访问网络连接 -->
<uses-permission android:name = "android.permission.INTERNET" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- 允许应用程序写入外部存储如SD卡上写文件 -->
<uses-permission android:name = "android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- 允许应用程序读取扩展存储器 -->
<uses-permission android:name = "android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!-- 允许挂载和反挂载文件系统可移动存储 -->
<uses-permission android:name = "android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<!-- 允许应用程序访问Wi-Fi网络状态信息 -->
<uses-permission android:name = "android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!-- 允许应用程序获取网络信息状态 -->
<uses-permission android:name = "android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- 允许应用程序读取电话状态 -->
<uses-permission android:name = "android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!-- 允许应用程序获取当前或最近运行的应用 -->
<uses-permission android:name = "android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.GET_TASKS" />
<!-- 允许访问振动设备 -->
<uses-permission android:name = "android.permission.VIBRATE" />
<!-- 允许应用程序通过WiFi或移动基站获取粗略的位置信息 -->
<uses-permission android:name = "android.permission.ACCESS_COARSE_LOCATION" />
<!-- 允许应用程序通过GPS获取精确的位置信息 -->
<uses-permission android:name = "android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- 允许应用程序改变Wi-Fi连接状态 -->
<uses-permission android:name = "android.permission.CHANGE_WIFI_STATE" />
<!-- 允许应用程序管理AccountManager中的账户列表 -->
<uses-permission android:name = "android.permission.MANAGE_ACCOUNTS" />
<!-- 允许应用程序访问GMail账户列表 -->
<uses-permission android:name = "android.permission.GET_ACCOUNTS" />
<!-- 允许应用程序连接配对过的蓝牙设备 -->
<uses-permission android:name = "android.permission.BLUETOOTH" />
<!-- 允许应用程序管理蓝牙,搜索和配对新的蓝牙设备 -->
<uses-permission android:name = "android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<!-- 允许应用程序打开系统窗口,显示其他应用程序 -->
<uses-permission android:name = "android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<!-- 修改系统设置的权限 -->
<uses-permission android:name = "android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<!-- bugly with tinker -->
<uses-permission android:name = "android.permission.READ_PHONE_STATE" />
<uses-permission android:name = "android.permission.INTERNET" />
<uses-permission android:name = "android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name = "android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name = "android.permission.READ_LOGS" />
<uses-permission android:name = "android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name = "android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.READ_LOGS" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-sdk tools:overrideLibrary="com.shuyu.gsyvideoplayer,
com.shuyu.gsyvideoplayer.lib,
com.shuyu.gsyvideoplayer.armv7a,
com.shuyu.gsyvideoplayer.x86,
com.shuyu.gsy.base,
shuyu.com.androidvideocache" />
<!-- 去掉 SDK 一些流氓权限 -->
<uses-permission
android:name="android.permission.READ_CONTACTS"
tools:node="remove" />
<supports-screens
android:anyDensity = "true"
android:largeScreens = "true"
android:normalScreens = "true"
android:resizeable = "true"
android:smallScreens = "true" />
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true" />
<!--android:largeHeap = "true"-->
<application
android:name = "com.halo.assistant.TinkerApp"
android:allowBackup = "true"
android:icon = "@drawable/logo"
android:label = "@string/app_name"
android:resizeableActivity = "true"
android:theme = "@style/AppCompatTheme.APP"
tools:targetApi = "n" >
android:name="com.halo.assistant.TinkerApp"
android:allowBackup="true"
android:icon="@mipmap/logo"
android:label="@string/app_name"
android:largeHeap="true"
android:resizeableActivity="true"
android:theme="@style/AppCompatTheme.APP"
tools:targetApi="n">
<!--android:launchMode = "singleTask"-->
<activity
android:name = "com.gh.gamecenter.SplashScreenActivity"
android:configChanges = "keyboardHidden|orientation|screenSize"
android:screenOrientation = "portrait"
android:theme = "@style/AppGuideTheme" >
<intent-filter >
<action android:name = "android.intent.action.MAIN" />
android:name="com.gh.gamecenter.SplashScreenActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.Launcher">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name = "android.intent.category.LAUNCHER" />
</intent-filter >
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity >
</activity>
<activity
android:name = "com.gh.gamecenter.MainActivity"
android:launchMode = "singleTask"
android:screenOrientation = "portrait"
android:windowSoftInputMode = "stateAlwaysHidden|adjustResize" />
android:name="com.gh.gamecenter.MainActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@style/AppCompatTheme.APP"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
<activity
android:name = "com.gh.gamecenter.DownloadManagerActivity"
android:launchMode = "singleTask"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.DownloadManagerActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait" />
<!--android:theme = "@android:style/Theme.Black.NoTitleBar.Fullscreen" 退出时屏幕抖动 -->
<activity android:name = "com.gh.gamecenter.ViewImageActivity" />
<activity
android:name = "com.gh.gamecenter.SearchActivity"
android:configChanges = "keyboardHidden"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.NewsDetailActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.SettingActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.ConcernActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.subject.SubjectActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.NewsSearchActivity"
android:screenOrientation = "portrait"
android:windowSoftInputMode = "stateHidden" />
<activity
android:name = "com.gh.gamecenter.GameNewsActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.CropImageActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.WebActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.ShareCardPicActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.ShareCardActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.MessageDetailActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.LibaoActivity"
android:screenOrientation = "portrait"
android:windowSoftInputMode = "stateHidden" />
<activity
android:name = "com.gh.gamecenter.LibaoDetailActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.ShareGhWfifActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.ShareGhActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.CleanApkActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.KcSelectGameActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.ChooseReceiverActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.ReceiverWaitingActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.FileSenderActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.FileReceiverActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.SelectUserIconActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.AboutActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.CommentDetailActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.GameDetailActivity"
android:configChanges = "orientation|screenSize|keyboardHidden"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.SuggestSelectActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.SuggestionActivity"
android:screenOrientation = "portrait" />
<activity
android:name = "com.gh.gamecenter.VoteActivity"
android:screenOrientation = "portrait"
android:windowSoftInputMode = "stateAlwaysHidden|adjustResize" />
<activity
android:name = "com.gh.gamecenter.ToolBoxActivity"
android:screenOrientation = "portrait"
android:windowSoftInputMode = "stateHidden" />
<activity android:name="com.gh.gamecenter.ViewImageActivity" />
<activity
android:name = "com.gh.gamecenter.WeiBoShareActivity"
android:screenOrientation = "portrait"
android:windowSoftInputMode = "stateHidden" />
android:name="com.gh.gamecenter.SearchActivity"
android:configChanges="keyboardHidden"
android:screenOrientation="portrait"
android:theme="@style/AppCompatTheme.APP" />
<activity
android:name = "com.gh.gamecenter.InstallActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.amway.search.AmwaySearchActivity"
android:configChanges="keyboardHidden"
android:screenOrientation="portrait"
android:theme="@style/AppCompatTheme.APP" />
<activity
android:name = ".category.CategoryDirectoryActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.ShellActivity"
android:screenOrientation="portrait" />
<activity
android:name = ".category.CategoryListActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.NewsDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.LoginActivity"
android:screenOrientation = "portrait"
android:windowSoftInputMode = "stateHidden" />
android:name="com.gh.gamecenter.SettingActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.UserInfoActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.ConcernActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.UserRegionActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.subject.SubjectActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.CollectionActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.NewsSearchActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden" />
<activity
android:name = "com.gh.gamecenter.MessageActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.GameNewsActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.UserInfoEditActivity"
android:screenOrientation = "portrait"
android:windowSoftInputMode = "stateHidden" />
<activity
android:name = "com.gh.gamecenter.KaiFuActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.CropImageActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.qa.search.AskSearchActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.WebActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.qa.answer.detail.AnswerDetailActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.ShareCardPicActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.qa.questions.detail.QuestionsDetailActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.ShareCardActivity"
android:screenOrientation="portrait" />
<activity
android:name = ".qa.answer.fold.AnswerFoldActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.MessageDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.qa.answer.edit.AnswerEditActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.LibaoActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden" />
<activity
android:name = "com.gh.gamecenter.ConcernInfoActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.LibaoDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.InfoActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.ShareGhActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.MessageKeFuActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.CleanApkActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.qa.select.CommunitiesSelectActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.SelectUserIconActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.qa.subject.CommunitySubjectActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.AboutActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.MessageInviteActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.CommentDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.MessageVoteActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.mygame.MyGameActivity"
android:screenOrientation="portrait" />
<activity
android:name = ".qa.questions.invite.QuestionsInviteActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.GameDetailActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.qa.myqa.MyAskActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.SuggestSelectActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.qa.column.order.AskTabOrderActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.SuggestionActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.VoteActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
<activity
android:name = "com.gh.gamecenter.qa.questions.edit.QuestionEditActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.ToolBoxActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden" />
<activity
android:name = "com.gh.gamecenter.kaifu.add.AddKaiFuActivity"
android:screenOrientation = "portrait"
android:windowSoftInputMode = "stateHidden" />
android:name="com.gh.gamecenter.WeiBoShareActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden" />
<activity
android:name = "com.gh.gamecenter.kaifu.patch.PatchKaifuActivity"
android:screenOrientation = "portrait" />
android:name=".category.CategoryDirectoryActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.BlockActivity"
android:screenOrientation = "portrait" />
android:name=".category.CategoryListActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.qa.column.detail.AskColumnDetailActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.LoginActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden" />
<activity
android:name = "com.gh.gamecenter.NetworkDiagnosisActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.UserInfoActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.personalhome.fans.FansActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.UserRegionActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.personalhome.followers.FollowersActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.CollectionActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.PersonalHomeActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.MessageActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.personalhome.answer.PersonalAnswerActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.UserInfoEditActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden" />
<activity
android:name = "com.gh.gamecenter.personalhome.question.PersonalQuestionActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.qa.search.AskSearchActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.qa.article.edit.ArticleEditActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.qa.answer.detail.AnswerDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.qa.article.MyArticleActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.qa.questions.detail.QuestionsDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.qa.article.draft.ArticleDraftActivity"
android:screenOrientation = "portrait" />
android:name=".qa.answer.fold.AnswerFoldActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.qa.article.detail.ArticleDetailActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.qa.answer.edit.AnswerEditActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.qa.draft.CommunityDraftWrapperActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.ConcernInfoActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.gamedetail.rating.edit.RatingEditActivity"
android:windowSoftInputMode = "stateVisible"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.InfoActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.qa.questions.edit.manager.HistoryDetailActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.MessageKeFuActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.qa.questions.edit.manager.HistoryActivity"
android:screenOrientation = "portrait" />
android:name="com.gh.gamecenter.qa.select.CommunitiesSelectActivity"
android:screenOrientation="portrait" />
<activity
android:name = "com.gh.gamecenter.qa.comment.CommentActivity"
android:screenOrientation = "portrait"
android:theme = "@style/Theme.Transparent"
android:windowSoftInputMode = "adjustNothing" />
android:name="com.gh.gamecenter.qa.subject.CommunitySubjectActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.MessageInviteActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.MessageVoteActivity"
android:screenOrientation="portrait" />
<activity
android:name=".qa.questions.invite.QuestionsInviteActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.myqa.MyAskActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.column.order.AskTabOrderActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.questions.edit.QuestionEditActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.servers.add.AddKaiFuActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.gh.gamecenter.servers.patch.PatchKaifuActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.BlockActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.amway.AmwayActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.column.detail.AskColumnDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.NetworkDiagnosisActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.personalhome.fans.FansActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.personalhome.followers.FollowersActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.personalhome.UserHomeActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.article.edit.ArticleEditActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.article.MyArticleActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.article.draft.ArticleDraftActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.article.detail.ArticleDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.draft.CommunityDraftWrapperActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.gamedetail.rating.edit.RatingEditActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateVisible" />
<activity
android:name="com.gh.gamecenter.qa.questions.edit.manager.HistoryDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.questions.edit.manager.HistoryActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.editor.InsertAnswerWrapperActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.editor.GameActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.editor.InsertArticleWrapperActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.gamedetail.rating.RatingReplyActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.history.HistoryActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.personalhome.rating.RatingActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.gamedetail.rating.logs.CommentLogsActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.tag.TagsActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.article.SimpleArticleListActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.video.videomanager.VideoManagerActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.video.upload.view.UploadVideoActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.video.game.GameVideoActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.editor.VideoActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.mygame.PlayedGameActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.servers.GameServersActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.game.columncollection.detail.ColumnCollectionDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.game.upload.GameSubmissionActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.gh.gamecenter.qa.comment.CommentActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.Transparent"
android:windowSoftInputMode="adjustNothing" />
<activity
android:name="com.gh.gamecenter.video.detail.VideoDetailActivity"
android:screenOrientation="portrait"
android:theme="@style/TransparentStatusBarAndNavigationBar" />
<!-- 使用小米/华为推送弹窗功能提高推送成功率-->
<activity
android:name = "com.gh.gamecenter.PushProxyActivity"
android:exported = "true"
android:theme = "@android:style/Theme.Translucent" />
android:name="com.gh.gamecenter.PushProxyActivity"
android:exported="true"
android:theme="@android:style/Theme.Translucent" />
<activity
android:name = "com.gh.gamecenter.SkipActivity"
android:theme = "@style/Theme.AppCompat.Light.Fullscreen.Transparent" >
<intent-filter >
<data android:scheme = "ghzhushou" />
android:name="com.gh.gamecenter.SkipActivity"
android:theme="@style/Theme.AppCompat.Light.Fullscreen.Transparent">
<intent-filter>
<data android:scheme="ghzhushou" />
<category android:name = "android.intent.category.DEFAULT" />
<action android:name = "android.intent.action.VIEW" />
<category android:name = "android.intent.category.BROWSABLE" />
</intent-filter >
</activity >
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
<activity
android:name="${applicationId}.wxapi.WXEntryActivity"
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Translucent.NoTitleBar"></activity>
<provider
android:name = "android.support.v4.content.FileProvider"
android:authorities = "${applicationId}"
android:exported = "false"
android:grantUriPermissions = "true" >
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name = "android.support.FILE_PROVIDER_PATHS"
android:resource = "@xml/provider_paths" />
</provider >
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>
<receiver
android:name = "com.gh.gamecenter.receiver.DownloadReceiver"
android:exported = "false" >
<intent-filter >
<action android:name = "com.gh.gamecenter.DOWNLOAD" />
</intent-filter >
</receiver >
android:name="com.gh.gamecenter.receiver.DownloadReceiver"
android:exported="false">
<intent-filter>
<action android:name="com.gh.gamecenter.DOWNLOAD" />
</intent-filter>
</receiver>
<receiver
android:name = "com.gh.gamecenter.receiver.InstallReceiver"
android:exported = "false" >
<intent-filter >
<action android:name = "com.gh.gamecenter.INSTALL" />
</intent-filter >
</receiver >
android:name="com.gh.gamecenter.receiver.InstallReceiver"
android:exported="false">
<intent-filter>
<action android:name="com.gh.gamecenter.INSTALL" />
</intent-filter>
</receiver>
<receiver
android:name = "com.gh.gamecenter.receiver.ActivitySkipReceiver"
android:exported = "true" >
<intent-filter >
<action android:name = "com.gh.gamecenter.ACTIVITYSKIP" />
</intent-filter >
</receiver >
android:name="com.gh.gamecenter.receiver.ActivitySkipReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.gh.gamecenter.ACTIVITYSKIP" />
</intent-filter>
</receiver>
<receiver android:name = "com.gh.gamecenter.receiver.UmengMessageReceiver" >
<intent-filter >
<action android:name = "com.gh.gamecenter.UMENG" />
</intent-filter >
</receiver >
<receiver android:name="com.gh.gamecenter.receiver.UmengMessageReceiver">
<intent-filter>
<action android:name="com.gh.gamecenter.UMENG" />
</intent-filter>
</receiver>
<!--魅族push应用定义消息receiver声明 -->
<receiver android:name = "com.gh.gamecenter.receiver.MeizuPushReceiver" >
<intent-filter >
<receiver android:name="com.gh.gamecenter.receiver.MeizuPushReceiver">
<intent-filter>
<!-- 接收push消息 -->
<action android:name = "com.meizu.flyme.push.intent.MESSAGE" />
<action android:name="com.meizu.flyme.push.intent.MESSAGE" />
<!-- 接收register消息 -->
<action android:name = "com.meizu.flyme.push.intent.REGISTER.FEEDBACK" />
<action android:name="com.meizu.flyme.push.intent.REGISTER.FEEDBACK" />
<!-- 接收unregister消息-->
<action android:name = "com.meizu.flyme.push.intent.UNREGISTER.FEEDBACK" />
<action android:name="com.meizu.flyme.push.intent.UNREGISTER.FEEDBACK" />
<!-- 兼容低版本Flyme3推送服务配置 -->
<action android:name = "com.meizu.c2dm.intent.REGISTRATION" />
<action android:name = "com.meizu.c2dm.intent.RECEIVE" />
<action android:name="com.meizu.c2dm.intent.REGISTRATION" />
<action android:name="com.meizu.c2dm.intent.RECEIVE" />
<category android:name = "${applicationId}" />
</intent-filter >
</receiver >
<category android:name="${applicationId}" />
</intent-filter>
</receiver>
<receiver
android:name = "com.gh.common.im.ImReceiver"
android:enabled = "true" >
<intent-filter android:priority = "2147483647" >
<action android:name = "com.gh.im" />
<action android:name = "action_finish" />
</intent-filter >
</receiver >
android:name="com.gh.common.im.ImReceiver"
android:enabled="true">
<intent-filter android:priority="2147483647">
<action android:name="com.gh.im" />
<action android:name="action_finish" />
</intent-filter>
</receiver>
<service android:name = "com.gh.base.GHUmengNotificationService" />
<service android:name="com.gh.base.GHUmengNotificationService" />
<!--<service android:name = "com.gh.gamecenter.statistics.AppStaticService" />-->
</application >
</application>
</manifest >
</manifest>

View File

@ -1,69 +0,0 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="utf-8">
<title>光环助手</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
body {
font: 100%/1.0 'Microsoft YaHei','Helvetica Neue',Helvetica,Arial,sans-serif;
background-color: #fff;
margin: 0;
padding: 0;
}
header {
}
article {
width:100%;
max-width:720px;
clear: both;
margin: 0 auto;
margin-top: 20%;
text-align: center;
margin-bottom:20%;
}
.title{margin-top: 4%;font-size:1.7em;color:#191919;text-align:center;}
.info{margin-top: 18%;font-size:1.0em;color:#191919;line-height:1.3em;}
.download {text-align: center;}
.download a{font-size:1.8em;padding:0.2em; text-align:center;color:#ffffff;margin: 0 auto;width:56%;background-color:#2999f9;border-radius:8px; text-decoration:none;display:block;line-height:1.8em;}
@media only screen and (min-width: 1080px) {
article {
width:100%;
max-width:720px;
clear: both;
margin: 0 auto;
margin-top: 5%;
text-align: center;
margin-bottom:20%;
}
}
</style>
</head>
<body>
<header>
</header>
<article>
<img src="http://192.168.43.1:3100/image/gh_icon.png" width="28%">
<p class="title">光环助手</p>
<br class="info">乐于分享的人是最帅的^_^ </p>
<div class="download">
<a href="http://192.168.43.1:3100/download/ghzs.apk">免流量下载</a>
</div>
<p class="title"><font color="#9A9A9A" size="3em">仅限安卓系统 </font></p>
</article>
</body>
</html>

View File

@ -1,28 +1,163 @@
function requestContentFocus() {
$('#editor').focus();
$("#editor").focus();
}
function setupWhenContentEditable() {
var editor = $('#editor');
if (!editor[0].hasAttribute('contenteditable')) {
return;
var editor = $("#editor");
if (!editor[0].hasAttribute("contenteditable")) {
return;
}
// paste
editor.on("paste", function(e) {
e.preventDefault();
var text = (e.originalEvent || e).clipboardData.getData("text/plain");
text = text.replace(/\n/g, "<br>");
if ("" != text) {
document.execCommand("insertHTML", false, text);
} else {
window.onPasteListener.onPaste();
}
});
// paste 回调只会获取粘贴之前的光标位置,需要自己手动加上粘贴文本的长度,并保证粘贴的是纯文本
editor.on('paste', function(e) {
e.preventDefault();
var text = (e.originalEvent || e).clipboardData.getData('text/plain');
text = text.replace(/\n/g, '<br>');
if("" != text) {
document.execCommand("insertHTML", false, text);
} else {
window.onPasteListener.onPaste();
}
});
requestContentFocus();
requestContentFocus();
}
$(document).ready(function() {
setupWhenContentEditable();
function getStyle(dom, name) {
return window.getComputedStyle(dom)[name];
}
function customLinkgo(self) {
var datas = self.dataset.datas;
console.log(datas)
window.OnLinkClickListener.onClick(datas);
}
var typeClassList = [
"community_article-container",
"answer-container",
"game-container"
];
function removeDomByParent(curDom) {
if (curDom.parentElement) {
curDom.parentElement.removeChild(curDom);
}
}
window.addEventListener("load", function() {
var EditorDom = document.querySelector("#editor");
setupWhenContentEditable();
document.addEventListener("keydown", function(e) {
var event = e || window.event;
if (event.keyCode === 8) {
var s = document.getSelection();
var r = s.getRangeAt(0);
if (r.startOffset === r.endOffset && r.endOffset === 0) {
var preDOM = s.focusNode.previousElementSibling;
if (
preDOM &&
preDOM instanceof Element &&
preDOM.nodeName === "IMG" &&
getStyle(preDOM, "display") === "block"
) {
preDOM.parentElement.removeChild(preDOM);
}
}
var customDom = s.focusNode;
if (customDom) {
if (
r.startContainer.nodeName.toLowerCase() === "blockquote" &&
r.startOffset === 0
) {
RE.formatBlock();
e.preventDefault();
} else if (
customDom.nodeName === "#text" &&
customDom.previousElementSibling &&
typeClassList.indexOf(customDom.previousElementSibling.className) >
-1 &&
r.startOffset === 1
) {
var needDeleteDom = customDom.previousElementSibling;
needDeleteDom.insertAdjacentElement(
"afterend",
document.createElement("br")
);
} else if (
customDom instanceof Element &&
customDom.childNodes[s.focusOffset] &&
customDom.childNodes[s.focusOffset].previousElementSibling &&
typeClassList.indexOf(
customDom.childNodes[s.focusOffset].previousElementSibling.className
) > -1
) {
customDom =
customDom.childNodes[s.focusOffset].previousElementSibling;
customDom.parentElement.removeChild(customDom);
}
}
}
});
document.addEventListener("keyup", function(e) {
var event = e || window.event;
if (event.keyCode === 13) {
var s = document.getSelection();
var curDom = s.focusNode;
var preDom = curDom.previousElementSibling;
if (
curDom.nodeName.toLowerCase() === "blockquote" &&
preDom.nodeName.toLowerCase() === "blockquote"
) {
if (
preDom.childNodes.length > 1 ||
(preDom.childNodes.length === 1 &&
preDom.childNodes[0].tagName !== "BR")
) {
curDom.style.marginTop = 0;
preDom.style.marginBottom = 0;
} else if (
(curDom.childNodes.length === 0 ||
(curDom.childNodes.length === 1 &&
curDom.childNodes[0].tagName === "BR")) &&
(preDom.childNodes.length === 0 ||
(preDom.childNodes.length === 1 &&
preDom.childNodes[0].tagName === "BR"))
) {
removeDomByParent(curDom);
var startQuoteDom = preDom.previousElementSibling;
startQuoteDom && startQuoteDom.nodeName.toLowerCase() === "blockquote"
? (startQuoteDom.style.marginBottom = "10px")
: null;
var range = document.createRange();
range.selectNode(preDom);
s.removeAllRanges();
s.addRange(range);
RE.formatBlock();
}
}
}
});
document.addEventListener("selectionchange", function(e) {
var event = e || window.event;
var targetDom = event.target.activeElement;
if (targetDom.id === "editor" && targetDom.lastElementChild) {
if (typeClassList.indexOf(targetDom.lastElementChild.className) > -1) {
var brDom = document.createElement("br");
EditorDom.appendChild(brDom);
}
}
});
});

View File

@ -1,16 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="user-scalable=no">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="normalize.css">
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="video-js.min.css">
<!--<link rel="stylesheet" type="text/css" href="https://resource.ghzs.com/css/halo_app.css">-->
</head>
<body>
<div id="editor" contenteditable="true"></div>
<div id="editor" contenteditable="false"></div>
<script type="text/javascript" src="zepto.min.js"></script>
<script type="text/javascript" src="rich_editor.js"></script>
<script type="text/javascript" src="content.js"></script>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/vanilla-lazyload/10.15.0/lazyload.min.js"></script>-->
<script type="text/javascript" src="video.min.js"></script>
<!--<script type="text/javascript" src="content.js"></script>-->
<!--<script type="text/javascript" src="https://resource.ghzs.com/js/halo_app.js"></script>-->
</body>
</html>

View File

@ -14,6 +14,8 @@
* limitations under the License.
*/
// alert("")
var RE = {};
RE.currentSelection = {
@ -22,6 +24,32 @@ RE.currentSelection = {
"endContainer": 0,
"endOffset": 0};
var isDebug = false;
try {
isDebug = window.NativeCallBack.isNativeBuildDebug()
} catch(error) {
}
// 引用远端的JS 和 CSS
var script = document.createElement("script")
document.body.appendChild(script)
if (isDebug) {
script.src = "https://resource.ghzs.com/js/halo_app_test.js" + "?timestamp=" + Math.round(new Date().getTime() / 1000)
} else {
script.src = "https://resource.ghzs.com/js/halo.js" + "?timestamp=" + Math.round(new Date().getTime() / 1000 / 1000)
}
var style = document.createElement("link")
style.rel = "stylesheet"
style.type = "text/css"
if (isDebug) {
style.href = "https://resource.ghzs.com/css/halo_app_test.css" + "?timestamp=" + Math.round(new Date().getTime() / 1000)
} else {
style.href = "https://resource.ghzs.com/css/halo.css" + "?timestamp=" + Math.round(new Date().getTime() / 1000 / 1000)
}
document.head.appendChild(style)
RE.editor = document.getElementById('editor');
document.addEventListener("selectionchange", function() { RE.backuprange(); });
@ -94,16 +122,8 @@ RE.setInputEnabled = function(inputEnabled) {
RE.editor.contentEditable = String(inputEnabled);
}
RE.setFocusByEnd = function() {
//alert("111111")
// var txt =RE.editor.createTextRange();
// ("22222")
// txt.moveStart('character',-1);
// ("333333")
// txt.collapse(true);
// ("444444")
// txt.select();
// alert("ddddddd")
RE.formatBlock = function() {
document.execCommand('formatBlock', false, 'p');
}
RE.undo = function() {
@ -166,6 +186,7 @@ RE.setFontSize = function(fontSize){
RE.setHeading = function(heading) {
document.execCommand('formatBlock', false, '<h'+heading+'>');
RE.sendElementNameToNative()
}
RE.setIndent = function() {
@ -190,6 +211,9 @@ RE.setJustifyRight = function() {
RE.setBlockquote = function() {
document.execCommand('formatBlock', false, '<blockquote>');
// var blockId = window.getSelection().focusNode.parentNode;
// $(blockId).addClass("haloBlock")
RE.sendElementNameToNative()
}
RE.insertImage = function(url) {
@ -197,19 +221,17 @@ RE.insertImage = function(url) {
RE.insertHTML(html);
}
//RE.lazyLoad = function() {
// var myLazyLoad = new LazyLoad({
// elements_selector: ".lazy"
// })
//}
// 替换成缩略图
RE.replaceTbImage = function(imgRuleFlag, gifRuleFlag) {
var imgs = document.getElementsByTagName("img");
var index = 0
for (var i = 0; i < imgs.length; i++) {
var img = imgs[i];
var imageClassName = img.className;
// console.log(imageClassName)
if (imageClassName == "image-link" || img.className == "poster") continue;
if(img.src.indexOf("?") > 0) continue;
// console.log(i)
var tbImg
if(img.src.indexOf(".gif") > 0) {
tbImg = img.src + gifRuleFlag
@ -220,7 +242,7 @@ RE.replaceTbImage = function(imgRuleFlag, gifRuleFlag) {
img.style.cssText = "max-width: 60%; display:block; margin:15px auto; height: auto;"
img.src = tbImg;
if (i == 0) {
if (index == 0) {
var bigImg = document.createElement('img');
bigImg.src = "file:///android_asset/web_load_dfimg_icon.png";
bigImg.style.cssText = "max-width: 20%; margin:15px 0 0 0; height: auto;"
@ -236,6 +258,7 @@ RE.replaceTbImage = function(imgRuleFlag, gifRuleFlag) {
}
}
index ++;
}
}
@ -244,6 +267,8 @@ RE.replaceAllDfImage = function(imgRuleFlag, gifRuleFlag) {
var imgs = document.getElementsByTagName("img");
for (var i = 0; i < imgs.length; i++) {
var img = imgs[i];
var imageClassName = img.className;
if (imageClassName == "image-link" || img.className == "poster") continue;
if(img.src.indexOf("web_load_dfimg_icon") > 0) {
img.parentNode.removeChild(img.parentNode.childNodes[0]);
i--;
@ -268,6 +293,8 @@ RE.hideShowBigPic = function() {
var j = 0;
for (var i = 0; i < imgs.length; i++) {
var img = imgs[i];
var imageClassName = img.className;
if (imageClassName == "image-link" || img.className == "poster") continue;
if(img.src.indexOf(",thumbnail") > 0 && img.src.indexOf(".gif") == -1) {
j++;
}
@ -277,6 +304,8 @@ RE.hideShowBigPic = function() {
var imgs = document.getElementsByTagName("img");
for (var i = 0; i < imgs.length; i++) {
var img = imgs[i];
var imageClassName = img.className;
if (imageClassName == "image-link" || img.className == "poster") continue;
if(img.src.indexOf("web_load_dfimg_icon") > 0) {
img.parentNode.removeChild(img.parentNode.childNodes[0]);
break;
@ -289,6 +318,8 @@ RE.replaceDfImageByUrl = function(imgUrl, imgRuleFlag, gifRuleFlag) {
var imgs = document.getElementsByTagName("img");
for (var i = 0; i < imgs.length; i++) {
var img = imgs[i];
var imageClassName = img.className;
if (imageClassName == "image-link" || img.className == "poster") continue;
if (img.src.indexOf(imgUrl) != -1) {
img.style.cssText = "max-width: 100%; display:block; margin:8px auto; height: auto;"
if(img.src.indexOf(".gif") > 0) {
@ -305,6 +336,8 @@ RE.ImageClickListener = function() {
var imgs = document.getElementsByTagName("img");
for (var i = 0; i < imgs.length; i++) {
var img = imgs[i];
var imageClassName = img.className;
if (imageClassName == "image-link"|| img.className == "poster") continue;
window.imagelistener.imageArr(img.src);
img.onclick = function() {
window.imagelistener.imageClick(this.src);
@ -357,12 +390,16 @@ RE.backuprange = function(){
}
RE.restorerange = function(){
var selection = window.getSelection();
selection.removeAllRanges();
var range = document.createRange();
range.setStart(RE.currentSelection.startContainer, RE.currentSelection.startOffset);
range.setEnd(RE.currentSelection.endContainer, RE.currentSelection.endOffset);
selection.addRange(range);
try {
var selection = window.getSelection();
selection.removeAllRanges();
var range = document.createRange();
range.setStart(RE.currentSelection.startContainer, RE.currentSelection.startOffset);
range.setEnd(RE.currentSelection.endContainer, RE.currentSelection.endOffset);
selection.addRange(range);
} catch(error) {
}
}
RE.enabledEditingItems = function(e) {
@ -432,12 +469,145 @@ RE.removeFormat = function() {
document.execCommand('removeFormat', false, null);
}
RE.insertCustomStyleLink = function(data) {
var entity = JSON.parse(data)
var html = "<br/><div class='"+ entity.type +"-container'>\n" +
" <a class='"+ entity.type +"' href=\"javascript:void(0);\" contenteditable=\"false\" onclick=\"customLinkgo(this)\" data-datas='"+ data +"'>\n" +
" <div class='flex-container'>\n" +
" <div class='gh-internal-content img-left'>\n" +
" <img class = \"image-link\" src='"+ entity.icon +"' />\n" +
" </div>\n" +
" <div class='gh-internal-content content-right'>\n" +
" <p class='content-title'>"+ entity.title +"</p>\n" +
" <p class='contents'>"+ entity.brief +"</p>\n" +
" </div>\n" +
" </div>\n" +
" </a>\n" +
" </div><br/>"
var tags = "", gameHtml = ""
if (entity.tags != null) {
for (var i = 0; i < entity.tags.length; i++) {
tags += "<label>"+ entity.tags[i]+"</label>"
}
gameHtml = "<br/><div class='"+ entity.type +"-container'>\n" +
" <a class='"+ entity.type +"' href=\"javascript:void(0);\" contenteditable=\"false\" onclick=\"customLinkgo(this)\" data-datas='"+ data +"'>\n" +
" <div class='flex-container'>\n" +
" <div class='gh-internal-content img-left'>\n" +
" <img class='image-link' src='"+ entity.icon +"' />\n" +
" </div>\n" +
" <div class='gh-internal-content content-right'>\n" +
" <p class='content-title'>"+ entity.title +"</p>\n" +
" <p class='tags'>"+ tags +"</p>\n" +
" </div>\n" +
" </div>\n" +
" </a></div><br/>"
}
switch(entity.type) {
case "answer":
document.execCommand("insertHTML",false, html);
break
case "community_article":
document.execCommand("insertHTML",false, html);
break
case "game":
document.execCommand("insertHTML",false, gameHtml);
break
}
RE.callback();
}
RE.showLinkStyle = function() {
var answerElement = document.getElementsByClassName("answer-container");
for (var i=0;i<answerElement.length;i+=1){
answerElement[i].style.display = 'inline';
}
var articleElement = document.getElementsByClassName("community_article-container");
for (var i=0;i<articleElement.length;i+=1){
articleElement[i].style.display = 'inline';
}
var gameElement = document.getElementsByClassName("game-container");
for (var i=0;i<gameElement.length;i+=1){
gameElement[i].style.display = 'inline';
}
}
RE.hideLinkStyle = function() {
var answerElement = document.getElementsByClassName("answer-container");
for (var i=0;i<answerElement.length;i+=1){
answerElement[i].style.display = 'none';
}
var articleElement = document.getElementsByClassName("community_article-container");
for (var i=0;i<articleElement.length;i+=1){
articleElement[i].style.display = 'none';
}
var gameElement = document.getElementsByClassName("game-container");
for (var i=0;i<gameElement.length;i+=1){
gameElement[i].style.display = 'none';
}
}
// Event Listeners
RE.editor.addEventListener("input", RE.callback);
RE.editor.addEventListener("keyup", function(e) {
var KEY_LEFT = 37, KEY_RIGHT = 39;
if (e.which == KEY_LEFT || e.which == KEY_RIGHT) {
RE.enabledEditingItems(e);
}
RE.sendElementNameToNative()
});
RE.editor.addEventListener("click", RE.enabledEditingItems);
RE.editor.addEventListener("click", function(e) {
RE.enabledEditingItems
RE.sendElementNameToNative()
var s = document.getSelection()
var isNeedRemoveR = RE.recursion(e.target)
if (isNeedRemoveR && s.rangeCount) {
s.removeAllRanges()
}
});
document.addEventListener("selectionchange", function(e) {
RE.sendElementNameToNative()
});
RE.recursion = function(dom) {
var parenDom = dom.parentElement
if (parenDom && parenDom instanceof Element &&
typeClassList.indexOf(parenDom.className) > -1) {
return parenDom
} else if(parenDom && parenDom instanceof Element &&
typeClassList.indexOf(parenDom.className) === -1 && parenDom.nodeName !== 'BODY') {
return RE.recursion(parenDom)
} else {
return null
}
}
// 返回组件标签 多个标签以"空格"划分
RE.sendElementNameToNative = function() {
if (window.getSelection) {
var selection = window.getSelection()
if (selection.rangeCount > 0) {
var range = selection.getRangeAt(0);
var container = range.startContainer;
var elements = " " + container.localName + " ";
var parentElement;
while(true) {
if(parentElement != null) {
parentElement = parentElement.parentElement
} else {
parentElement = container.parentElement
}
if (parentElement == null || parentElement.localName == null) {
break;
}
elements = elements + " " + parentElement.localName + " "
}
// console.log(elements)
window.OnCursorChangeListener.onElements(elements);
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,53 +0,0 @@
package com.gc.materialdesign.views;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.util.AttributeSet;
import android.widget.RelativeLayout;
public class CustomView extends RelativeLayout {
final static String MATERIALDESIGNXML = "http://schemas.android.com/apk/res-auto";
final static String ANDROIDXML = "http://schemas.android.com/apk/res/android";
final int disabledBackgroundColor = Color.parseColor("#E2E2E2");
// Indicate if user touched this view the last time
public boolean isLastTouch = false;
int beforeBackground;
boolean animation = false;
public CustomView(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
if (enabled)
setBackgroundColor(beforeBackground);
else
setBackgroundColor(disabledBackgroundColor);
invalidate();
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
if (animation)
invalidate();
}
@Override
protected void onAnimationStart() {
super.onAnimationStart();
animation = true;
}
@Override
protected void onAnimationEnd() {
super.onAnimationEnd();
animation = false;
}
}

View File

@ -1,174 +0,0 @@
package com.gc.materialdesign.views;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.RectF;
import android.support.v4.content.ContextCompat;
import android.util.AttributeSet;
public class ProgressBarCircularIndeterminate extends CustomView {
final static String ANDROIDXML = "http://schemas.android.com/apk/res/android";
int backgroundColor = Color.parseColor("#1E88E5");
float radius1 = 0;
float radius2 = 0;
int cont = 0;
boolean firstAnimationOver = false;
int arcD = 1;
int arcO = 0;
float rotateAngle = 0;
int limite = 0;
public ProgressBarCircularIndeterminate(Context context, AttributeSet attrs) {
super(context, attrs);
setAttributes(attrs);
}
// Set atributtes of XML to View
protected void setAttributes(AttributeSet attrs) {
setMinimumHeight(Utils.dpToPx(32, getResources()));
setMinimumWidth(Utils.dpToPx(32, getResources()));
// Set background Color
// Color by resource
int bacgroundColor = attrs.getAttributeResourceValue(ANDROIDXML, "background", -1);
if (bacgroundColor != -1) {
setBackgroundColor(ContextCompat.getColor(getContext(), bacgroundColor));
} else {
// Color by hexadecimal
int background = attrs.getAttributeIntValue(ANDROIDXML, "background", -1);
if (background != -1) {
setBackgroundColor(background);
} else {
setBackgroundColor(Color.parseColor("#1E88E5"));
}
}
setMinimumHeight(Utils.dpToPx(3, getResources()));
}
// Set color of background
public void setBackgroundColor(int color) {
super.setBackgroundColor(ContextCompat.getColor(getContext(), android.R.color.transparent));
if (isEnabled()) {
beforeBackground = backgroundColor;
}
this.backgroundColor = color;
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
if (!firstAnimationOver) {
drawFirstAnimation(canvas);
}
if (cont > 0) {
drawSecondAnimation(canvas);
}
invalidate();
}
/**
* Draw first animation of view
*
* @param canvas
*/
private void drawFirstAnimation(Canvas canvas) {
if (radius1 < getWidth() / 2) {
Paint paint = new Paint();
paint.setAntiAlias(true);
paint.setColor(makePressColor());
radius1 = (radius1 >= getWidth() / 2) ? (float) getWidth() / 2 : radius1 + 1;
canvas.drawCircle(getWidth() / 2, getHeight() / 2, radius1, paint);
} else {
Bitmap bitmap = Bitmap.createBitmap(canvas.getWidth(), canvas.getHeight(), Bitmap.Config.ARGB_8888);
Canvas temp = new Canvas(bitmap);
Paint paint = new Paint();
paint.setAntiAlias(true);
paint.setColor(makePressColor());
temp.drawCircle(getWidth() / 2, getHeight() / 2, getHeight() / 2, paint);
Paint transparentPaint = new Paint();
transparentPaint.setAntiAlias(true);
transparentPaint.setColor(ContextCompat.getColor(getContext(), android.R.color.transparent));
transparentPaint.setXfermode(new PorterDuffXfermode(
PorterDuff.Mode.CLEAR));
if (cont >= 50) {
radius2 = (radius2 >= getWidth() / 2) ? (float) getWidth() / 2 : radius2 + 1;
} else {
radius2 = (radius2 >= getWidth() / 2 - Utils.dpToPx(4, getResources())) ?
(float) getWidth() / 2 - Utils.dpToPx(4, getResources()) : radius2 + 1;
}
temp.drawCircle(getWidth() / 2, getHeight() / 2, radius2, transparentPaint);
canvas.drawBitmap(bitmap, 0, 0, new Paint());
if (radius2 >= getWidth() / 2 - Utils.dpToPx(4, getResources())) {
cont++;
}
if (radius2 >= getWidth() / 2) {
firstAnimationOver = true;
}
}
}
/**
* Draw second animation of view
*
* @param canvas
*/
private void drawSecondAnimation(Canvas canvas) {
if (arcO == limite) {
arcD += 6;
}
if (arcD >= 290 || arcO > limite) {
arcO += 6;
arcD -= 6;
}
if (arcO > limite + 290) {
limite = arcO;
arcO = limite;
arcD = 1;
}
rotateAngle += 4;
canvas.rotate(rotateAngle, getWidth() / 2, getHeight() / 2);
Bitmap bitmap = Bitmap.createBitmap(canvas.getWidth(), canvas.getHeight(), Bitmap.Config.ARGB_8888);
Canvas temp = new Canvas(bitmap);
Paint paint = new Paint();
paint.setAntiAlias(true);
paint.setColor(backgroundColor);
// temp.drawARGB(0, 0, 0, 255);
temp.drawArc(new RectF(0, 0, getWidth(), getHeight()), arcO, arcD, true, paint);
Paint transparentPaint = new Paint();
transparentPaint.setAntiAlias(true);
transparentPaint.setColor(ContextCompat.getColor(getContext(), android.R.color.transparent));
transparentPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
temp.drawCircle(getWidth() / 2, getHeight() / 2, (getWidth() / 2)
- Utils.dpToPx(4, getResources()), transparentPaint);
canvas.drawBitmap(bitmap, 0, 0, new Paint());
}
/**
* Make a dark color to ripple effect
*
* @return
*/
protected int makePressColor() {
int r = (this.backgroundColor >> 16) & 0xFF;
int g = (this.backgroundColor >> 8) & 0xFF;
int b = (this.backgroundColor >> 0) & 0xFF;
// r = (r+90 > 245) ? 245 : r+90;
// g = (g+90 > 245) ? 245 : g+90;
// b = (b+90 > 245) ? 245 : b+90;
return Color.argb(128, r, g, b);
}
}

View File

@ -1,34 +0,0 @@
package com.gc.materialdesign.views;
import android.content.res.Resources;
import android.util.TypedValue;
import android.view.View;
public class Utils {
/**
* Convert Dp to Pixel
*/
public static int dpToPx(float dp, Resources resources) {
float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, resources.getDisplayMetrics());
return (int) px;
}
public static int getRelativeTop(View myView) {
// if (myView.getParent() == myView.getRootView())
if (myView.getId() == android.R.id.content)
return myView.getTop();
else
return myView.getTop() + getRelativeTop((View) myView.getParent());
}
public static int getRelativeLeft(View myView) {
// if (myView.getParent() == myView.getRootView())
if (myView.getId() == android.R.id.content)
return myView.getLeft();
else
return myView.getLeft() + getRelativeLeft((View) myView.getParent());
}
}

View File

@ -75,7 +75,7 @@ public class AppUncaughtHandler implements UncaughtExceptionHandler {
// 保存log到本地
public static void saveLocalLog(Context context, Throwable ex) {
String errorMsg = Log.getStackTraceString(ex);
Config.setExceptionMsg(context, errorMsg);
Config.setExceptionMsg(errorMsg);
// 保存到本地
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.getDefault());

View File

@ -1,26 +1,32 @@
package com.gh.base;
import android.app.Activity;
import android.arch.lifecycle.Lifecycle;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import android.view.Window;
import android.view.WindowManager;
import androidx.annotation.NonNull;
import androidx.lifecycle.Lifecycle;
import com.gh.common.constant.Constants;
import com.gh.common.util.DataUtils;
import com.gh.common.util.DialogUtils;
import com.gh.common.util.PackageUtils;
import com.gh.common.util.RunningUtils;
import com.gh.common.util.ShareUtils;
import com.gh.common.util.StringUtils;
import com.gh.common.util.TeaHelper;
import com.gh.gamecenter.BuildConfig;
import com.gh.gamecenter.LoginActivity;
import com.gh.gamecenter.R;
import com.gh.gamecenter.SuggestionActivity;
import com.gh.gamecenter.eventbus.EBShowDialog;
import com.gh.gamecenter.suggest.SuggestType;
import com.lightgame.BaseAppCompatActivity;
import com.lightgame.download.FileUtils;
import com.lightgame.utils.Utils;
import com.tencent.tauth.Tencent;
@ -28,12 +34,9 @@ import com.tencent.tauth.Tencent;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import org.json.JSONException;
import org.json.JSONObject;
import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.List;
import butterknife.ButterKnife;
@ -41,16 +44,29 @@ import pub.devrel.easypermissions.EasyPermissions;
import static com.gh.common.util.EntranceUtils.KEY_ENTRANCE;
public abstract class BaseActivity extends BaseToolBarActivity implements EasyPermissions.PermissionCallbacks {
/**
* 只提供基础的服务(EventBus/ButterKnife/Share/GlobalDialog/Permissions)
* <p>
* 需要通道工具栏的页面请继承{@link ToolBarActivity}
*/
public abstract class BaseActivity extends BaseAppCompatActivity implements EasyPermissions.PermissionCallbacks {
// global dialog key
public final static String DOWNLOAD_HIJACK = "hijack";
public final static String DOWNLOAD_NOT_FOUND = "notfound";
public final static String LOGIN_EXCEPTION = "loginException";
public final static String PLUGGABLE = "plugin";
@NonNull
protected String mEntrance;
private boolean mIsPause;
private boolean mIsExistLogoutDialog;
protected final Handler mBaseHandler = new BaseHandler(this);
protected static class BaseHandler extends Handler {
private final WeakReference<BaseActivity> mActivityWeakReference;
BaseHandler(BaseActivity activity) {
@ -79,28 +95,19 @@ public abstract class BaseActivity extends BaseToolBarActivity implements EasyPe
}
}
// 小米沉浸式黑色字体
public void setStatusBarDarkMode(boolean darkmode, Activity activity) {
Class<? extends Window> clazz = activity.getWindow().getClass();
try {
int darkModeFlag = 0;
Class<?> layoutParams = Class.forName("android.view.MiuiWindowManager$LayoutParams");
Field field = layoutParams.getField("EXTRA_FLAG_STATUS_BAR_DARK_MODE");
darkModeFlag = field.getInt(layoutParams);
Method extraFlagField = clazz.getMethod("setExtraFlags", int.class, int.class);
extraFlagField.invoke(activity.getWindow(), darkmode ? darkModeFlag : 0, darkModeFlag);
} catch (Exception ignore) {
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setStatusBarDarkMode(true, this);
EventBus.getDefault().register(this);
ButterKnife.bind(this);
mEntrance = getIntent().getStringExtra(KEY_ENTRANCE);
if (TextUtils.isEmpty(mEntrance)) {
mEntrance = Constants.ENTRANCE_UNKNOWN;
}
if (BuildConfig.DEBUG) {
Utils.log("ACTIVITY_ENTRANCE -> " + mEntrance);
}
}
@Override
@ -110,26 +117,26 @@ public abstract class BaseActivity extends BaseToolBarActivity implements EasyPe
super.onDestroy();
}
@Override
protected boolean onNavigationIconClicked() {
onBackPressed();
return true;
}
public void toast(String msg) {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
Utils.toast(this, msg);
Utils.toast(this, msg);
}
public void toast(int msg) {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
toast(getString(msg));
toast(getString(msg));
}
public void showShare(String url, String icon, String shareTitle, String shareSummary, ShareUtils.ShareType shareType) {
ShareUtils.getInstance(this).showShareWindows(this, getWindow().getDecorView(), url, icon, shareTitle, shareSummary, shareType);
public void showShare(String url,
String icon,
String shareTitle,
String shareSummary,
ShareUtils.ShareType shareType) {
ShareUtils.getInstance(this).showShareWindows(this,
getWindow().getDecorView(),
url,
icon,
shareTitle,
shareSummary,
shareType);
if (shareType == ShareUtils.ShareType.game || shareType == ShareUtils.ShareType.plugin) {
DataUtils.onEvent(this, "内容分享", shareTitle + shareSummary);
} else {
@ -139,64 +146,62 @@ public abstract class BaseActivity extends BaseToolBarActivity implements EasyPe
@Subscribe(threadMode = ThreadMode.MAIN)
public void onEventMainThread(final EBShowDialog showDialog) {
if (!mIsPause && this.getClass().getName().equals(RunningUtils.getTopActivity(this))) {
if ("hijack".equals(showDialog.getType())) {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED)
&& this.getClass().getName().equals(RunningUtils.getTopActivity(this))) {
if (DOWNLOAD_HIJACK.equals(showDialog.getType())) {
DialogUtils.showQqSessionDialog(this, "2586716223");// 建议用户联系客服
} else if ("plugin".equals(showDialog.getType())) {
DialogUtils.showPluginDialog(this, new DialogUtils.ConfirmListener() {
@Override
public void onConfirm() {
if (FileUtils.isEmptyFile(showDialog.getPath())) {
toast(R.string.install_failure_hint);
} else {
startActivity(PackageUtils.getUninstallIntent(BaseActivity.this, showDialog.getPath()));
}
} else if (PLUGGABLE.equals(showDialog.getType())) {
DialogUtils.showPluginDialog(this, () -> {
if (FileUtils.isEmptyFile(showDialog.getPath())) {
toast(R.string.install_failure_hint);
} else {
startActivity(PackageUtils.getUninstallIntent(BaseActivity.this, showDialog.getPath()));
}
});
} else if ("loginException".equals(showDialog.getType())) {
} else if (LOGIN_EXCEPTION.equals(showDialog.getType())) {
if (mIsExistLogoutDialog) return;
mIsExistLogoutDialog = true;
try {
JSONObject object = new JSONObject(showDialog.getPath());
JSONObject device = object.getJSONObject("device");
String manufacturer = device.getString("manufacturer");
String model = device.getString("model");
DialogUtils.showAlertDialog(this, "你的账号已在另外一台设备登录"
, StringUtils.buildString("", manufacturer, " - ", model, "")
, StringUtils.buildString("", model, "")
, "知道了", "重新登录"
, null
, () -> startActivity(LoginActivity.getIntent(BaseActivity.this,
"你的账号已在另外一台设备登录多设备-重新登录"))
);
mBaseHandler.postDelayed(() -> mIsExistLogoutDialog = false, 5000);
} catch (JSONException e) {
} catch (Exception e) {
e.printStackTrace();
}
} else if ("notfound".equals(showDialog.getType())) {
} else if (DOWNLOAD_NOT_FOUND.equals(showDialog.getType())) {
DialogUtils.showAlertDialog(this, "下载失败", "下载链接已失效,建议提交反馈"
, "立即反馈", "取消"
, () -> {
SuggestionActivity.startSuggestionActivity(this, SuggestType.gameQuestion,
null, showDialog.getPath() + ",问题反馈:下载链接失效");
}, null);
, () -> SuggestionActivity.startSuggestionActivity(this,
SuggestType.gameQuestion, null,
(showDialog.getPath() + ",问题反馈:下载链接失效")), null);
}
}
}
@Override
protected void onPause() {
TeaHelper.onPause(this);
super.onPause();
mIsPause = true;
}
@Override
protected void onResume() {
TeaHelper.onResume(this);
super.onResume();
mIsPause = false;
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
public void onRequestPermissionsResult(int requestCode,
@NonNull String[] permissions,
@NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
@ -211,7 +216,27 @@ public abstract class BaseActivity extends BaseToolBarActivity implements EasyPe
}
protected void setStatusBarColor(int color) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window window = getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
window.setStatusBarColor(color);
}
}
/**
* 提供当前 activity 的中文名 (不重载的话为类名)
*/
public String getActivityNameInChinese() {
return getClass().getSimpleName();
}
/**
* @param entrance 上一个页面的链式入口名称
* @param path 当前页面名称
* @return 完整的链式入口名称
*/
public static String mergeEntranceAndPath(String entrance, String path) {
if (TextUtils.isEmpty(entrance) && TextUtils.isEmpty(path)) return "";
if (TextUtils.isEmpty(entrance) && !TextUtils.isEmpty(path)) {
@ -222,4 +247,5 @@ public abstract class BaseActivity extends BaseToolBarActivity implements EasyPe
}
return StringUtils.buildString(entrance, "+(", path, ")");
}
}

View File

@ -2,15 +2,16 @@ package com.gh.base;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.View;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;
import com.gh.base.adapter.FragmentAdapter;
import com.gh.common.view.TabIndicatorView;
import com.gh.gamecenter.R;
import com.google.android.material.tabs.TabLayout;
import com.lightgame.view.NoScrollableViewPager;
import java.util.ArrayList;
@ -22,7 +23,7 @@ import butterknife.BindView;
* Created by khy on 15/03/18.
*/
public abstract class BaseActivity_TabLayout extends BaseActivity implements ViewPager.OnPageChangeListener {
public abstract class BaseActivity_TabLayout extends ToolBarActivity implements ViewPager.OnPageChangeListener {
public static final String PAGE_INDEX = "PAGE_INDEX";

View File

@ -1,6 +1,6 @@
package com.gh.base;
import android.support.v7.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
import butterknife.ButterKnife;

View File

@ -0,0 +1,249 @@
package com.gh.base
import android.annotation.SuppressLint
import android.app.Activity
import android.content.ClipboardManager
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.text.TextUtils
import android.view.View
import android.webkit.JavascriptInterface
import butterknife.OnClick
import com.gh.common.util.DialogUtils
import com.gh.common.view.RichEditor
import com.gh.gamecenter.R
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.entity.MyVideoEntity
import com.gh.gamecenter.qa.editor.GameActivity
import com.gh.gamecenter.qa.editor.InsertAnswerWrapperActivity
import com.gh.gamecenter.qa.editor.InsertArticleWrapperActivity
import com.gh.gamecenter.qa.editor.VideoActivity
import com.gh.gamecenter.qa.entity.AnswerEntity
import com.gh.gamecenter.qa.entity.ArticleEntity
import com.gh.gamecenter.qa.entity.EditorInsertEntity
import com.halo.assistant.HaloApp
import com.lightgame.utils.Utils
import com.lightgame.view.CheckableImageView
import kotterknife.bindView
abstract class BaseRichEditorActivity : ToolBarActivity() {
val mRichEditor by bindView<RichEditor>(R.id.rich_editor)
private val mEditorFont by bindView<CheckableImageView>(R.id.editor_font)
private val mEditorLink by bindView<CheckableImageView>(R.id.editor_link)
private val mEditorParagraph by bindView<CheckableImageView>(R.id.editor_paragraph)
private val mEditorFontBold by bindView<CheckableImageView>(R.id.editor_font_bold)
private val mEditorFontItalic by bindView<CheckableImageView>(R.id.editor_font_italic)
private val mEditorFontStrikeThrough by bindView<CheckableImageView>(R.id.editor_font_strikethrough)
private val mEditorParagraphH1 by bindView<CheckableImageView>(R.id.editor_paragraph_h1)
private val mEditorParagraphH2 by bindView<CheckableImageView>(R.id.editor_paragraph_h2)
private val mEditorParagraphH3 by bindView<CheckableImageView>(R.id.editor_paragraph_h3)
private val mEditorParagraphH4 by bindView<CheckableImageView>(R.id.editor_paragraph_h4)
private val mEditorParagraphQuote by bindView<CheckableImageView>(R.id.editor_paragraph_quote)
private val mEditorFontContainer by bindView<View>(R.id.editor_font_container)
private val mEditorParagraphContainer by bindView<View>(R.id.editor_paragraph_container)
private val mEditorLinkContainer by bindView<View>(R.id.editor_link_container)
private val mEditorInsertDetail by bindView<View>(R.id.editor_insert_detail)
private var mCurrentParagraphStyle = ""
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
DialogUtils.fixWebViewKeyboardNotWorking(this)
if (resultCode != Activity.RESULT_OK) return
var insertData: EditorInsertEntity? = null
when (requestCode) {
INSERT_ANSWER_CODE -> {
val answer = data?.getParcelableExtra<AnswerEntity>(AnswerEntity::class.java.simpleName)
if (answer != null) insertData = EditorInsertEntity.transform(answer)
}
INSERT_ARTICLE_CODE -> {
val article = data?.getParcelableExtra<ArticleEntity>(ArticleEntity::class.java.simpleName)
if (article != null) insertData = EditorInsertEntity.transform(article)
}
INSERT_GAME_CODE -> {
val game = data?.getParcelableExtra<GameEntity>(GameEntity::class.java.simpleName)
if (game != null) insertData = EditorInsertEntity.transform(game)
}
INSERT_VIDEO_CODE -> {
val video = data?.getParcelableExtra<MyVideoEntity>(MyVideoEntity::class.java.simpleName)
if (video != null) mRichEditor.insertCustomVideo(video)
return
}
}
mRichEditor.insertCustomStyleLink(insertData)
}
@SuppressLint("AddJavascriptInterface")
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
mRichEditor.setPadding(20, 15, 20, 15)
// 防止个别手机在Js里无法获取粘贴内容
mRichEditor.addJavascriptInterface(OnPasteListener(), "onPasteListener")
mRichEditor.addJavascriptInterface(OnCursorChangeListener(), "OnCursorChangeListener")
mRichEditor.setInputEnabled(true)
}
@OnClick(R.id.editor_image, R.id.editor_font, R.id.editor_link, R.id.editor_paragraph,
R.id.editor_font_bold, R.id.editor_font_italic, R.id.editor_font_strikethrough,
R.id.editor_paragraph_h1, R.id.editor_paragraph_h2, R.id.editor_paragraph_h3,
R.id.editor_paragraph_h4, R.id.editor_font_container, R.id.editor_paragraph_container,
R.id.editor_paragraph_quote, R.id.editor_link_answer, R.id.editor_link_article,
R.id.editor_link_game, R.id.editor_link_video)
fun onRichClick(view: View) {
when (view.id) {
R.id.editor_font -> {
mEditorFont.isChecked = !mEditorFont.isChecked
mEditorParagraph.isChecked = false
mEditorLink.isChecked = false
mEditorFontContainer.visibility = if (mEditorFont.isChecked) View.VISIBLE else View.GONE
mEditorParagraphContainer.visibility = if (!mEditorFont.isChecked) View.VISIBLE else View.GONE
mEditorLinkContainer.visibility = if (!mEditorFont.isChecked) View.VISIBLE else View.GONE
mEditorInsertDetail.visibility = mEditorFontContainer.visibility
}
R.id.editor_paragraph -> {
mEditorParagraph.isChecked = !mEditorParagraph.isChecked
mEditorFont.isChecked = false
mEditorLink.isChecked = false
mEditorParagraphContainer.visibility = if (mEditorParagraph.isChecked) View.VISIBLE else View.GONE
mEditorFontContainer.visibility = if (!mEditorParagraph.isChecked) View.VISIBLE else View.GONE
mEditorLinkContainer.visibility = if (!mEditorParagraph.isChecked) View.VISIBLE else View.GONE
mEditorInsertDetail.visibility = mEditorParagraphContainer.visibility
}
R.id.editor_link -> {
mEditorLink.isChecked = !mEditorLink.isChecked
mEditorFont.isChecked = false
mEditorParagraph.isChecked = false
mEditorLinkContainer.visibility = if (mEditorLink.isChecked) View.VISIBLE else View.GONE
mEditorParagraphContainer.visibility = if (!mEditorLink.isChecked) View.VISIBLE else View.GONE
mEditorFontContainer.visibility = if (!mEditorLink.isChecked) View.VISIBLE else View.GONE
mEditorInsertDetail.visibility = mEditorLinkContainer.visibility
}
R.id.editor_font_bold -> {
mEditorFontBold.isChecked = !mEditorFontBold.isChecked
mRichEditor.setBold()
}
R.id.editor_font_italic -> {
mEditorFontItalic.isChecked = !mEditorFontItalic.isChecked
mRichEditor.setItalic()
}
R.id.editor_font_strikethrough -> {
mEditorFontStrikeThrough.isChecked = !mEditorFontStrikeThrough.isChecked
mRichEditor.setStrikeThrough()
}
R.id.editor_paragraph_h1 -> {
if (mEditorParagraphH1.isChecked) {
mRichEditor.formatBlock()
} else {
mRichEditor.setHeading(1)
}
mEditorParagraphH1.isChecked = !mEditorParagraphH1.isChecked
}
R.id.editor_paragraph_h2 -> {
if (mEditorParagraphH2.isChecked) {
mRichEditor.formatBlock()
} else {
mRichEditor.setHeading(2)
}
mEditorParagraphH2.isChecked = !mEditorParagraphH2.isChecked
}
R.id.editor_paragraph_h3 -> {
if (mEditorParagraphH3.isChecked) {
mRichEditor.formatBlock()
} else {
mRichEditor.setHeading(3)
}
mEditorParagraphH3.isChecked = !mEditorParagraphH3.isChecked
}
R.id.editor_paragraph_h4 -> {
if (mEditorParagraphH4.isChecked) {
mRichEditor.formatBlock()
} else {
mRichEditor.setHeading(4)
}
mEditorParagraphH4.isChecked = !mEditorParagraphH4.isChecked
}
R.id.editor_paragraph_quote -> {
if (mEditorParagraphQuote.isChecked) {
mRichEditor.formatBlock()
} else {
mRichEditor.setBlockquote()
}
mEditorParagraphQuote.isChecked = !mEditorParagraphQuote.isChecked
}
R.id.editor_link_answer -> {
startActivityForResult(InsertAnswerWrapperActivity.getIntent(this), INSERT_ANSWER_CODE)
}
R.id.editor_link_article -> {
startActivityForResult(InsertArticleWrapperActivity.getIntent(this), INSERT_ARTICLE_CODE)
}
R.id.editor_link_game -> {
startActivityForResult(GameActivity.getIntent(this, "插入游戏"), INSERT_GAME_CODE)
}
R.id.editor_link_video -> {
startActivityForResult(VideoActivity.getIntent(this), INSERT_VIDEO_CODE)
}
}
}
private inner class OnCursorChangeListener {
@JavascriptInterface
fun onElements(elements: String) {
Utils.log("-----------------------")
Utils.log(elements)
Utils.log(mRichEditor.html)
Utils.log("-----------------------")
mCurrentParagraphStyle = when {
elements.contains(ELEMENT_PARAGRAPH_QUOTE) -> ELEMENT_PARAGRAPH_QUOTE
elements.contains(ELEMENT_PARAGRAPH_P) -> ELEMENT_PARAGRAPH_P
else -> ""
}
mBaseHandler.post {
mEditorFontBold.isChecked = elements.contains(ELEMENT_NAME_BOLD)
mEditorFontItalic.isChecked = elements.contains(ELEMENT_NAME_ITALIC)
mEditorFontStrikeThrough.isChecked = elements.contains(ELEMENT_NAME_STRIKE)
mEditorParagraphH1.isChecked = elements.contains(ELEMENT_PARAGRAPH_H1)
mEditorParagraphH2.isChecked = elements.contains(ELEMENT_PARAGRAPH_H2)
mEditorParagraphH3.isChecked = elements.contains(ELEMENT_PARAGRAPH_H3)
mEditorParagraphH4.isChecked = elements.contains(ELEMENT_PARAGRAPH_H4)
mEditorParagraphQuote.isChecked = elements.contains(ELEMENT_PARAGRAPH_QUOTE)
}
}
}
private inner class OnPasteListener {
@JavascriptInterface
fun onPaste() {
val clipboard =
HaloApp.getInstance().application.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
val clipText = clipboard.text.toString()
if (!TextUtils.isEmpty(clipText)) {
// 替换换行符号否则 插入失败
val text = clipText.replace("[ ]".toRegex(), "&nbsp;").replace("[\r\n]".toRegex(), "<br/>")
mBaseHandler.post { mRichEditor.insertHtml(text) }
}
}
}
companion object {
const val ELEMENT_NAME_BOLD = " b "
const val ELEMENT_NAME_ITALIC = " i "
const val ELEMENT_NAME_STRIKE = " strike "
const val ELEMENT_PARAGRAPH_H1 = " h1 "
const val ELEMENT_PARAGRAPH_H2 = " h2 "
const val ELEMENT_PARAGRAPH_H3 = " h3 "
const val ELEMENT_PARAGRAPH_H4 = " h4 "
const val ELEMENT_PARAGRAPH_P = " p "
const val ELEMENT_PARAGRAPH_QUOTE = " blockquote "
const val INSERT_ANSWER_CODE = 411
const val INSERT_ARTICLE_CODE = 412
const val INSERT_GAME_CODE = 413
const val INSERT_VIDEO_CODE = 414
}
}

View File

@ -1,124 +0,0 @@
package com.gh.base;
import android.os.Bundle;
import android.support.annotation.DrawableRes;
import android.support.annotation.StringRes;
import android.support.v4.app.Fragment;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.gh.common.util.DisplayUtils;
import com.gh.gamecenter.R;
import com.gh.gamecenter.normal.ToolbarController;
import com.lightgame.BaseAppCompatActivity;
import com.lightgame.OnTitleClickListener;
import java.util.List;
/**
* Created by csheng on 15-10-12.
*/
public abstract class BaseToolBarActivity extends BaseAppCompatActivity implements ToolbarController, Toolbar.OnMenuItemClickListener {
private Toolbar mToolbar;
private TextView mTitleTv;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
initToolbar();
}
private void initToolbar() {
mToolbar = findViewById(R.id.normal_toolbar);
mTitleTv = findViewById(R.id.normal_title);
if (mToolbar != null) {
// setSupportActionBar(mToolbar); // 替换actionBar后 toolBar无法控制
mToolbar.setNavigationIcon(provideNavigationIcon());
mToolbar.setNavigationOnClickListener(view -> onBackPressed());
mTitleTv.setOnClickListener(view -> {
final List<Fragment> fragmentList = getSupportFragmentManager().getFragments();
for (Fragment fragment : fragmentList) {
if (fragment instanceof OnTitleClickListener) {
((OnTitleClickListener) fragment).onTitleClick();
}
}
});
}
}
@DrawableRes
public int provideNavigationIcon() {
return R.drawable.ic_bar_back; // default navigation icon
}
@Override
public void setNavigationTitle(String title) {
if (mTitleTv != null) mTitleTv.setText(title);
}
@Override
public void setNavigationTitle(@StringRes int res) {
setNavigationTitle(getString(res));
}
@Override
public void setToolbarMenu(int res) {
if (mToolbar == null) return;
mToolbar.inflateMenu(res);
mToolbar.setOnMenuItemClickListener(this);
Menu menu = mToolbar.getMenu();
for (int i = 0; i < menu.size(); i++) {
MenuItem menuItem = menu.getItem(i);
// menu设置actionLayout后无法捕捉点击事件以icon为tag如果icon is null 手动设置menuItem点击事件
if (menuItem != null && menuItem.getIcon() == null) {
if (menuItem.getActionView() != null) {
menuItem.getActionView().setOnClickListener((v) -> this.onMenuItemClick(menuItem));
}
}
}
// 限制标题实际宽度 防止标题挡住toolbar menu按钮
if (menu.size() > 2 && mTitleTv != null) {
ViewGroup.LayoutParams layoutParams = mTitleTv.getLayoutParams();
if (layoutParams instanceof RelativeLayout.LayoutParams) {
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) layoutParams;
params.setMargins(DisplayUtils.dip2px(90), 0, DisplayUtils.dip2px(90), 0);
mTitleTv.setLayoutParams(params);
}
}
}
@Override
public MenuItem getMenuItem(int res) {
if (mToolbar == null) return null; //后续页面做好判断
return mToolbar.getMenu().findItem(res);
}
public Menu getMenu() {
return mToolbar.getMenu();
}
@Override
public boolean onMenuItemClick(MenuItem item) {
return false;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
return onNavigationIconClicked();
}
return super.onOptionsItemSelected(item);
}
protected abstract boolean onNavigationIconClicked();
}

View File

@ -1,55 +0,0 @@
package com.gh.base;
import android.content.Context;
import android.os.Bundle;
import com.gh.common.util.EntranceUtils;
import com.gh.gamecenter.GameDetailActivity;
import com.gh.gamecenter.NewsDetailActivity;
import com.gh.gamecenter.WebActivity;
import com.gh.gamecenter.subject.SubjectActivity;
import com.umeng.message.UmengNotificationClickHandler;
import com.umeng.message.entity.UMessage;
import org.json.JSONException;
import org.json.JSONObject;
public class GHUmengNotificationClickHandler extends UmengNotificationClickHandler {
@Override
public void launchApp(Context context, UMessage uMessage) {
// super.launchApp(context, uMessage);
try {
String content = uMessage.extra.get(EntranceUtils.KEY_DATA);
JSONObject response = new JSONObject(content);
Bundle bundle = new Bundle();
bundle.putString(EntranceUtils.KEY_ENTRANCE, EntranceUtils.ENTRANCE_UMENG);
String type = response.getString(EntranceUtils.KEY_TYPE);
String target = response.getString(EntranceUtils.KEY_TARGET);
switch (type) {
case EntranceUtils.HOST_ARTICLE:
bundle.putString(EntranceUtils.KEY_TO, NewsDetailActivity.class.getSimpleName());
bundle.putString(EntranceUtils.KEY_NEWSID, target);
break;
case EntranceUtils.HOST_GAME:
bundle.putString(EntranceUtils.KEY_TO, GameDetailActivity.class.getSimpleName());
bundle.putString(EntranceUtils.KEY_GAMEID, target);
break;
case EntranceUtils.HOST_COLUMN:
bundle.putString(EntranceUtils.KEY_TO, SubjectActivity.class.getName());
bundle.putString(EntranceUtils.KEY_ID, target);
break;
case EntranceUtils.HOST_WEB:
bundle.putString(EntranceUtils.KEY_TO, WebActivity.class.getSimpleName());
bundle.putString(EntranceUtils.KEY_URL, target);
break;
}
EntranceUtils.jumpActivity(context, bundle);
} catch (JSONException e) {
e.printStackTrace();
}
}
}

View File

@ -9,15 +9,14 @@ import android.content.Intent
import android.os.Build
import android.os.Bundle
import android.preference.PreferenceManager
import android.support.v4.app.NotificationCompat
import android.text.TextUtils
import android.view.View
import androidx.core.app.NotificationCompat
import com.gh.common.notifier.Notifier
import com.gh.common.util.DataUtils
import com.gh.common.util.EntranceUtils
import com.gh.common.util.PackageUtils
import com.gh.common.util.MtaHelper
import com.gh.common.util.StringUtils
import com.gh.gamecenter.BuildConfig
import com.gh.common.util.toObject
import com.gh.gamecenter.R
import com.gh.gamecenter.entity.PushEntity
import com.gh.gamecenter.entity.PushMessageEntity
@ -32,7 +31,6 @@ import com.gh.gamecenter.receiver.UmengMessageReceiver.Companion.TYPE_REMOVE
import com.gh.gamecenter.retrofit.Response
import com.gh.gamecenter.retrofit.RetrofitManager
import com.google.gson.Gson
import com.halo.assistant.HaloApp
import com.umeng.message.UmengMessageService
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
@ -48,22 +46,17 @@ class GHUmengNotificationService : UmengMessageService() {
companion object {
const val ACTION_UMENG = "com.gh.gamecenter.UMENG"
const val MESSAGE_FROM_SYSTEM = "message_from_system"
const val HALO_MESSAGE_DIALOG = "HALO_MESSAGE_DIALOG"
const val HALO_MESSAGE_CENTER = "HALO_MESSAGE_CENTER"
const val ANSWER = "answer"
const val FOLLOW_QUESTION = "follow_question"
const val NOTIFICATION_ID = 2015
const val DISPLAY_TYPE_NOTIFICATION = "notification"
const val DISPLAY_TYPE_CUSTOM = "custom"
const val MESSAGE_ID = "message_id"
const val NOTIFICATION_MESSAGE_ID = "notification_message_id" // 通知中心消息 ID
const val PUSH_ID = "push_id"
}
val notificationTags = arrayOf("GH_UMENG_TAG_1", "GH_UMENG_TAG_2", "GH_UMENG_TAG_3")
@ -74,7 +67,7 @@ class GHUmengNotificationService : UmengMessageService() {
val isMessageFromSystem = intent.getBooleanExtra(MESSAGE_FROM_SYSTEM, false)
try {
val pushData = gson.fromJson(message, PushEntity::class.java)
val pushData = message.toObject<PushEntity>()
pushData?.let { handlePushData(context, it, message, isMessageFromSystem) }
} catch (e: Exception) {
e.printStackTrace()
@ -87,59 +80,68 @@ class GHUmengNotificationService : UmengMessageService() {
if (pushData.displayType == DISPLAY_TYPE_NOTIFICATION) {
// 其它类型的透传信息
// 显示到通知栏
val msg = gson.fromJson(message, PushNotificationEntity::class.java)
val msg = message.toObject<PushNotificationEntity>()
val data = msg?.extra?.data
// 系统推送,直接处理跳转
// 系统推送(非自定义信息),直接处理跳转
if (isMessageFromSystem) {
val intent = Intent()
intent.setClass(context, UmengMessageReceiver::class.java)
intent.putExtra(EntranceUtils.KEY_DATA, data?.link)
intent.putExtra(EntranceUtils.KEY_TYPE, UmengMessageReceiver.DIRECT_ONLY)
intent.putExtra(EntranceUtils.KEY_MESSAGE, message)
intent.putExtra(NOTIFICATION_MESSAGE_ID, data?.messageId)
context.sendBroadcast(intent)
return
}
// 判断是否过滤该消息
if (validatePush(data?.condition)) {
val clickIntent = Intent()
val removeIntent = Intent()
clickIntent.setClass(context, UmengMessageReceiver::class.java)
clickIntent.putExtra(EntranceUtils.KEY_DATA, data?.link)
clickIntent.putExtra(EntranceUtils.KEY_MESSAGE, message)
clickIntent.putExtra(EntranceUtils.KEY_TYPE, TYPE_CLICK)
removeIntent.setClass(context, UmengMessageReceiver::class.java)
removeIntent.putExtra(EntranceUtils.KEY_TYPE, TYPE_REMOVE)
removeIntent.putExtra(EntranceUtils.KEY_MESSAGE, message)
val clickPendingIntent = PendingIntent.getBroadcast(context, System.currentTimeMillis().toInt(),
clickIntent, PendingIntent.FLAG_UPDATE_CURRENT)
val deletePendingIntent = PendingIntent.getBroadcast(context, System.currentTimeMillis().toInt() + 1,
removeIntent, PendingIntent.FLAG_UPDATE_CURRENT)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val channel = NotificationChannel("Halo_Push", "Halo_Push", NotificationManager.IMPORTANCE_DEFAULT)
notificationManager.createNotificationChannel(channel)
}
val notification = NotificationCompat.Builder(context, "Halo_Push")
.setSmallIcon(R.drawable.ic_notification)
.setTicker(pushData.body?.ticker)
.setContentTitle(pushData.body?.title)
.setContentText(pushData.body?.text)
.setContentIntent(clickPendingIntent)
.setDeleteIntent(deletePendingIntent)
.build()
notification.flags = notification.flags or Notification.FLAG_AUTO_CANCEL
notificationManager.notify(getNotificationTag(context), NOTIFICATION_ID, notification)
// 用户未登录的情况下不生成消息中心通知,避免用户掉登录了还收到跳转至消息中心的通知
if (data != null
&& data.link?.target == "system"
&& !UserManager.getInstance().isLoggedIn) {
return
}
val clickIntent = Intent()
val removeIntent = Intent()
clickIntent.setClass(context, UmengMessageReceiver::class.java)
clickIntent.putExtra(EntranceUtils.KEY_DATA, data?.link)
clickIntent.putExtra(EntranceUtils.KEY_MESSAGE, message)
clickIntent.putExtra(MESSAGE_ID, msg?.msgId)
clickIntent.putExtra(PUSH_ID, data?.pushId)
clickIntent.putExtra(NOTIFICATION_MESSAGE_ID, data?.messageId)
clickIntent.putExtra(EntranceUtils.KEY_TYPE, TYPE_CLICK)
removeIntent.setClass(context, UmengMessageReceiver::class.java)
removeIntent.putExtra(EntranceUtils.KEY_TYPE, TYPE_REMOVE)
removeIntent.putExtra(EntranceUtils.KEY_MESSAGE, message)
val clickPendingIntent = PendingIntent.getBroadcast(context, System.currentTimeMillis().toInt(),
clickIntent, PendingIntent.FLAG_UPDATE_CURRENT)
val deletePendingIntent = PendingIntent.getBroadcast(context, System.currentTimeMillis().toInt() + 1,
removeIntent, PendingIntent.FLAG_UPDATE_CURRENT)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val channel = NotificationChannel("Halo_Push", "Halo_Push", NotificationManager.IMPORTANCE_DEFAULT)
notificationManager.createNotificationChannel(channel)
}
val notification = NotificationCompat.Builder(context, "Halo_Push")
.setSmallIcon(R.drawable.ic_notification)
.setTicker(pushData.body?.ticker)
.setContentTitle(pushData.body?.title)
.setContentText(pushData.body?.text)
.setContentIntent(clickPendingIntent)
.setDeleteIntent(deletePendingIntent)
.build()
notification.flags = notification.flags or Notification.FLAG_AUTO_CANCEL
notificationManager.notify(getNotificationTag(context), NOTIFICATION_ID, notification)
} else {
if (HALO_MESSAGE_DIALOG == pushData.body?.custom) {
if (UserManager.getInstance().isLoggedIn
&& HALO_MESSAGE_DIALOG == pushData.body?.custom) {
// 回答了问题或者关注了问题的消息
val msg = gson.fromJson(message, PushMessageEntity::class.java)
val data = msg?.extra?.data
@ -159,20 +161,20 @@ class GHUmengNotificationService : UmengMessageService() {
.setText(displayText)
.setDuration(5000)
.setIcon(data?.userEntity?.icon)
.setOnClickListener(View.OnClickListener { _ ->
.setOnClickListener(View.OnClickListener {
val bundle = Bundle()
bundle.putString(EntranceUtils.KEY_ANSWER_ID, data?.answer?.id)
bundle.putString(EntranceUtils.KEY_ENTRANCE, EntranceUtils.ENTRANCE_UMENG)
bundle.putString(EntranceUtils.KEY_TO, AnswerDetailActivity::class.java.name)
EntranceUtils.jumpActivity(context, bundle)
DataUtils.onMtaEvent(context, "消息弹窗",
type, "Does not contains any parameter.")
MtaHelper.onEvent("消息弹窗", type, "Does not contains any parameter.")
// 标记已读
val jsonObject = JSONObject()
jsonObject.put("type", type)
val body = RequestBody.create(MediaType.parse("application/json"), jsonObject.toString())
RetrofitManager.getInstance(application).api.postMessageRead(UserManager.getInstance().userId, data?.id, body)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
@ -186,7 +188,6 @@ class GHUmengNotificationService : UmengMessageService() {
e?.printStackTrace()
}
})
Notifier.hide()
})
.show(false)
@ -201,37 +202,6 @@ class GHUmengNotificationService : UmengMessageService() {
}
}
private fun validatePush(condition: PushNotificationEntity.Data.Condition?): Boolean {
if (condition == null) return true
// 校验渠道是否匹配
condition.ghzs?.channel?.let {
if (it.isNotEmpty() && it != HaloApp.getInstance().channel) {
return false
}
}
// 校验光环版本版本是否匹配
condition.ghzs?.version?.let {
if (it.isNotEmpty() && !BuildConfig.VERSION_NAME.contains(it)) {
return false
}
}
// 校验已安装的应用里是否存在条件的包名
if (condition.packageName.isNotEmpty()) {
val installedPackageList = PackageUtils.getAllPackageName(HaloApp.getInstance().application)
for (packageName in installedPackageList) {
if (condition.packageName == packageName) {
return true
}
}
return false
}
return true
}
/**
* 规则:最多三条消息,以旧换新
*

View File

@ -9,15 +9,14 @@ import android.view.View;
* Created by khy on 25/04/18.
*/
public abstract class onDoubleTapListener implements View.OnTouchListener {
public abstract class OnDoubleTapListener implements View.OnTouchListener {
private GestureDetector mGestureDetector;
public onDoubleTapListener(Context context) {
protected OnDoubleTapListener(Context context) {
mGestureDetector = new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() {
@Override
public boolean onDoubleTap(MotionEvent e) {
onDoubleTapListener.this.onDoubleTap();
OnDoubleTapListener.this.onDoubleTap();
return true;
}
});
@ -26,7 +25,7 @@ public abstract class onDoubleTapListener implements View.OnTouchListener {
@Override
public boolean onTouch(View v, MotionEvent event) {
mGestureDetector.onTouchEvent(event);
return true;
return false;
}
public abstract void onDoubleTap();

View File

@ -2,7 +2,11 @@ package com.gh.base;
/**
* Created by Administrator on 2016/9/8.
*
* 逐步移除
*/
@Deprecated
public interface OnRequestCallBackListener<T> {
void loadDone();

View File

@ -2,6 +2,6 @@ package com.gh.base;
import android.view.View;
public interface OnViewClickListener {
void onClick(View v, Object data);
public interface OnViewClickListener<T> {
void onClick(View v, T data);
}

View File

@ -0,0 +1,245 @@
package com.gh.base;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.gh.common.util.DisplayUtils;
import com.gh.common.util.MtaHelper;
import com.gh.download.DownloadManager;
import com.gh.gamecenter.DownloadManagerActivity;
import com.gh.gamecenter.R;
import com.gh.gamecenter.entity.GameUpdateEntity;
import com.gh.gamecenter.eventbus.EBDownloadStatus;
import com.gh.gamecenter.normal.ToolbarController;
import com.gh.gamecenter.packagehelper.PackageViewModel;
import com.lightgame.OnTitleClickListener;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.List;
import androidx.annotation.DrawableRes;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProviders;
/**
* 需要用到工具栏的页面使用
* <p>
* 特殊页面请参考{@link BaseActivity}
*/
public abstract class ToolBarActivity extends BaseActivity implements ToolbarController, Toolbar.OnMenuItemClickListener {
@Nullable
private PackageViewModel mPackageViewModel;
protected Toolbar mToolbar;
protected TextView mTitleTv;
@Nullable
private TextView mDownloadCountHint;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setStatusBarDarkMode(true, this);
initToolbar();
if (showDownloadMenu()) {
mPackageViewModel = ViewModelProviders.of(this, new PackageViewModel.Factory()).get(PackageViewModel.class);
mPackageViewModel.getFilterSameUpdateLiveData().observe(this, this::updateDownloadCountHint);
}
}
// 小米沉浸式黑色字体
@SuppressLint("PrivateApi")
public void setStatusBarDarkMode(boolean darkmode, Activity activity) {
Class<? extends Window> clazz = activity.getWindow().getClass();
try {
Class<?> layoutParams = Class.forName("android.view.MiuiWindowManager$LayoutParams");
Field field = layoutParams.getField("EXTRA_FLAG_STATUS_BAR_DARK_MODE");
int darkModeFlag = field.getInt(layoutParams);
Method extraFlagField = clazz.getMethod("setExtraFlags", int.class, int.class);
extraFlagField.invoke(activity.getWindow(), darkmode ? darkModeFlag : 0, darkModeFlag);
} catch (Exception ignore) {
}
}
private void initToolbar() {
mToolbar = findViewById(R.id.normal_toolbar);
mTitleTv = findViewById(R.id.normal_title);
if (mToolbar != null) {
// setSupportActionBar(mToolbar); // 替换actionBar后 toolBar无法控制
mToolbar.setNavigationIcon(provideNavigationIcon());
mToolbar.setNavigationOnClickListener(provideNavigationItemClickListener());
if (mTitleTv != null) {
mTitleTv.setOnClickListener(view -> {
final List<Fragment> fragmentList = getSupportFragmentManager().getFragments();
for (Fragment fragment : fragmentList) {
if (fragment instanceof OnTitleClickListener) {
((OnTitleClickListener) fragment).onTitleClick();
}
}
});
}
}
}
@DrawableRes
public int provideNavigationIcon() {
return R.drawable.ic_bar_back; // default navigation icon
}
@Override
public void setNavigationTitle(String title) {
if (mTitleTv != null) mTitleTv.setText(title);
}
@Override
public void setNavigationTitle(@StringRes int res) {
setNavigationTitle(getString(res));
}
/**
* 重写此方法以将标题靠左显示
*/
public boolean showToolbarAtLeft() {
return false;
}
@Override
public void setToolbarMenu(int res) {
if (mToolbar == null) return;
mToolbar.inflateMenu(res);
mToolbar.setOnMenuItemClickListener(this);
if (showDownloadMenu()) {
createDownloadMenu(res);
}
Menu menu = mToolbar.getMenu();
for (int i = 0; i < menu.size(); i++) {
MenuItem menuItem = menu.getItem(i);
// menu设置actionLayout后无法捕捉点击事件以icon为tag如果icon is null 手动设置menuItem点击事件
if (menuItem != null && menuItem.getIcon() == null) {
if (menuItem.getActionView() != null) {
menuItem.getActionView().setOnClickListener((v) -> this.onMenuItemClick(menuItem));
}
}
}
// 限制标题实际宽度 防止标题挡住toolbar menu按钮
if (menu.size() > 2 && mTitleTv != null) {
ViewGroup.LayoutParams layoutParams = mTitleTv.getLayoutParams();
if (layoutParams instanceof RelativeLayout.LayoutParams) {
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) layoutParams;
if (showToolbarAtLeft()) {
params.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
params.addRule(RelativeLayout.CENTER_VERTICAL);
params.setMargins(DisplayUtils.dip2px(55), 0, DisplayUtils.dip2px(48 * menu.size()), 0);
} else {
params.setMargins(DisplayUtils.dip2px(90), 0, DisplayUtils.dip2px(90), 0);
}
mTitleTv.setLayoutParams(params);
}
} else {
if (showToolbarAtLeft()) {
ViewGroup.LayoutParams layoutParams = mTitleTv.getLayoutParams();
if (layoutParams instanceof RelativeLayout.LayoutParams) {
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) layoutParams;
params.addRule(RelativeLayout.CENTER_VERTICAL);
params.setMargins(DisplayUtils.dip2px(55), 0, DisplayUtils.dip2px(48 * menu.size()), 0);
mTitleTv.setLayoutParams(params);
}
}
}
}
private void createDownloadMenu(int res) {
if (res != R.menu.menu_download) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu_download, mToolbar.getMenu());
}
if (mPackageViewModel != null) {
updateDownloadCountHint(mPackageViewModel.getFilterSameUpdateLiveData().getValue());
}
View downloadMenuView = mToolbar.getMenu().findItem(R.id.menu_download).getActionView();
mDownloadCountHint = downloadMenuView.findViewById(R.id.menu_download_count_hint);
}
private void updateDownloadCountHint(List<GameUpdateEntity> updateList) {
if (mDownloadCountHint == null) return;
int count = DownloadManager.getInstance(getApplicationContext()).getDownloadOrUpdateCount(updateList);
if (count != 0) {
mDownloadCountHint.setVisibility(View.VISIBLE);
mDownloadCountHint.setText(String.valueOf(count));
} else {
mDownloadCountHint.setVisibility(View.GONE);
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onEventMainThread(EBDownloadStatus status) {
if (showDownloadMenu() && mPackageViewModel != null) {
updateDownloadCountHint(mPackageViewModel.getFilterSameUpdateLiveData().getValue());
}
}
@Override
public MenuItem getMenuItem(int res) {
if (mToolbar == null) return null; //后续页面做好判断
return mToolbar.getMenu().findItem(res);
}
public void clearMenu() {
if (mToolbar != null) {
mToolbar.getMenu().clear();
}
}
public Menu getMenu() {
return mToolbar.getMenu();
}
@Override
public boolean onMenuItemClick(MenuItem item) {
if (item.getItemId() == R.id.menu_download) {
MtaHelper.onEvent("下载管理", "下载管理入口", getActivityNameInChinese());
Intent intent = DownloadManagerActivity.getDownloadMangerIntent(this, mEntrance);
startActivity(intent);
}
return false;
}
protected View.OnClickListener provideNavigationItemClickListener() {
return view -> onBackPressed();
}
protected boolean showDownloadMenu() {
return false;
}
}

View File

@ -1,9 +1,9 @@
package com.gh.base.adapter;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import java.util.List;

View File

@ -1,8 +1,8 @@
package com.gh.base.adapter;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;
import java.util.List;

View File

@ -1,13 +1,14 @@
package com.gh.base.fragment;
import android.app.Dialog;
import android.arch.lifecycle.Lifecycle;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.StringRes;
import android.support.v4.app.DialogFragment;
import android.view.KeyEvent;
import androidx.annotation.NonNull;
import androidx.annotation.StringRes;
import androidx.fragment.app.DialogFragment;
import androidx.lifecycle.Lifecycle;
import com.gh.common.util.ClickUtils;
import com.gh.gamecenter.R;
import com.lightgame.utils.RuntimeUtils;
@ -27,7 +28,7 @@ public class BaseDialogFragment extends DialogFragment {
final Dialog dialog = new Dialog(getActivity(), R.style.DialogWindowTransparent);
dialog.setCanceledOnTouchOutside(false);
dialog.setOnKeyListener((dialog1, keyCode, event) -> {
if (keyCode == KeyEvent.KEYCODE_BACK && ClickUtils.isFastDoubleClick()) { //会多次响应??
if (keyCode == KeyEvent.KEYCODE_BACK && !ClickUtils.isFastDoubleClick()) {
return onBack();
}
return false;

View File

@ -2,9 +2,9 @@ package com.gh.base.fragment;
import android.app.Dialog;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;

View File

@ -1,22 +1,26 @@
package com.gh.base.fragment;
import android.arch.lifecycle.Lifecycle;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.Lifecycle;
import com.gh.base.OnListClickListener;
import com.gh.base.OnRequestCallBackListener;
import com.gh.common.constant.Constants;
import com.gh.gamecenter.BuildConfig;
import com.gh.gamecenter.eventbus.EBMiPush;
import com.lightgame.OnTitleClickListener;
import com.lightgame.utils.RuntimeUtils;
@ -49,6 +53,7 @@ public abstract class BaseFragment<T> extends Fragment implements OnRequestCallB
protected boolean isEverPause;
@NonNull
protected String mEntrance;
protected final Handler mBaseHandler = new BaseFragment.BaseHandler(this);
@ -118,6 +123,14 @@ public abstract class BaseFragment<T> extends Fragment implements OnRequestCallB
mEntrance = getArguments().getString(KEY_ENTRANCE);
}
if (TextUtils.isEmpty(mEntrance)) {
mEntrance = Constants.ENTRANCE_UNKNOWN;
}
if (BuildConfig.DEBUG) {
Utils.log("FRAGMENT_ENTRANCE -> " + mEntrance);
}
isEverPause = false;
EventBus.getDefault().register(this);
@ -168,13 +181,11 @@ public abstract class BaseFragment<T> extends Fragment implements OnRequestCallB
}
public void toast(@StringRes int res) {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
toast(getString(res));
toast(getString(res));
}
public void toast(String msg) {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
Utils.toast(getContext(), msg);
Utils.toast(getContext(), msg);
}
public void toastLong(@StringRes int msg) {
@ -236,4 +247,10 @@ public abstract class BaseFragment<T> extends Fragment implements OnRequestCallB
}
}
// 为 fragment 附加 bundle (setArgument())
public BaseFragment with(Bundle bundle) {
this.setArguments(bundle);
return this;
}
}

View File

@ -2,11 +2,11 @@ package com.gh.base.fragment;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.material.tabs.TabLayout;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;
import android.view.View;
import com.gh.base.adapter.FragmentAdapter;

View File

@ -11,12 +11,12 @@ package com.gh.base.fragment;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.IdRes;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import androidx.annotation.IdRes;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;
import android.view.View;
import com.gh.gamecenter.normal.NormalFragment;

View File

@ -10,13 +10,20 @@
package com.gh.base.fragment;
import android.os.Bundle;
import android.support.annotation.IdRes;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Checkable;
import androidx.annotation.IdRes;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.viewpager.widget.ViewPager;
import com.gh.gamecenter.fragment.MainWrapperFragment;
import java.util.List;
/**
* ViewPager 配合ViewGroup Checkable实现双切换<br/>
@ -31,6 +38,8 @@ public abstract class BaseFragment_ViewPager_Checkable extends BaseFragment_View
protected ViewGroup mCheckableGroup;
private int mLastPosition = MainWrapperFragment.INDEX_HOME;
@IdRes
protected abstract int getCheckableGroupId();
@ -68,6 +77,33 @@ public abstract class BaseFragment_ViewPager_Checkable extends BaseFragment_View
@Override
public void onPageSelected(int index) {
onPageChanged(index);
try {
// 补充Viewpager Fragment的生命周期
if (mFragmentsList.size() > index) {
Fragment fragment = mFragmentsList.get(index);
fragment.onResume();
FragmentManager childFragmentManager = fragment.getChildFragmentManager();
List<Fragment> fragments = childFragmentManager.getFragments();
for (Fragment childFragment : fragments) {
childFragment.onResume();
}
}
if (mFragmentsList.size() > mLastPosition) {
Fragment fragment = mFragmentsList.get(mLastPosition);
fragment.onPause();
FragmentManager childFragmentManager = fragment.getChildFragmentManager();
List<Fragment> fragments = childFragmentManager.getFragments();
for (Fragment childFragment : fragments) {
childFragment.onPause();
}
}
mLastPosition = index;
} catch (Exception ignore) {
}
}
@Override

View File

@ -1,13 +1,15 @@
package com.gh.base.fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentManager;
import com.gh.gamecenter.R;
/**
@ -43,9 +45,9 @@ public class WaitingDialogFragment extends BaseDialogFragment {
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
final View view = inflater.inflate(R.layout.set_wait_dialog, null);
message = (TextView) view.findViewById(R.id.set_wait_message);
message = view.findViewById(R.id.set_wait_message);
message.setText(getArguments().getString(KEY_MSG));
return view;
}
@ -77,6 +79,12 @@ public class WaitingDialogFragment extends BaseDialogFragment {
return super.onBack();
}
@Override
public void dismiss() {
mBackListener = null;
super.dismiss();
}
public static class WaitingDialogData {
private String msg;

View File

@ -22,4 +22,12 @@ object AppExecutor {
mainThreadHandler.postDelayed(command, delay)
}
}
}
fun runOnIoThread(f: () -> Unit) {
AppExecutor.ioExecutor.execute(f)
}
fun runOnUiThread(f: () -> Unit) {
AppExecutor.uiExecutor.execute(f)
}

View File

@ -0,0 +1,5 @@
package com.gh.common
object Base64ImageHolder {
var image: String = ""
}

View File

@ -0,0 +1,153 @@
package com.gh.common
import android.annotation.SuppressLint
import android.content.Context
import android.webkit.JavascriptInterface
import androidx.annotation.Keep
import com.gh.base.CurrentActivityHolder
import com.gh.common.util.*
import com.gh.gamecenter.LoginActivity
import com.gh.gamecenter.ViewImageActivity
import com.gh.gamecenter.entity.Badge
import com.gh.gamecenter.manager.UserManager
import com.gh.gamecenter.retrofit.BiResponse
import com.gh.gamecenter.retrofit.RetrofitManager
import com.gh.gamecenter.room.AppDatabase
import com.gh.gamecenter.user.LoginTag
import com.halo.assistant.HaloApp
import com.lightgame.utils.Utils
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import okhttp3.ResponseBody
import org.json.JSONObject
import retrofit2.HttpException
import wendu.dsbridge.CompletionHandler
class DefaultJsApi(var context: Context) {
@JavascriptInterface
fun isGhzs(msg: Any): String {
return "true"
}
@JavascriptInterface
fun toast(msg: Any) {
Utils.toast(HaloApp.getInstance().application, msg.toString())
}
@JavascriptInterface
fun logMtaEvent(event: Any) {
val mtaEvent = event.toString().toObject() ?: MtaEvent()
MtaHelper.onEvent(mtaEvent.name, mtaEvent.key, mtaEvent.value)
}
@JavascriptInterface
fun getUserInfo(msg: Any): String {
return UserManager.getInstance().userInfoEntity.toJson()
}
@JavascriptInterface
fun getUserToken(msg: Any): String {
return UserManager.getInstance().loginTokenEntity.accessToken.value
}
@JavascriptInterface
fun login(msg: Any) {
val intent = LoginActivity.getIntent(context, "浏览器")
context.startActivity(intent)
}
@JavascriptInterface
fun refreshUserInfoBadge(msg: Any) {
val userInfoEntity = UserManager.getInstance().userInfoEntity
if (msg.toString().isNotEmpty()) {
val badge = msg.toString().toObject() ?: Badge()
userInfoEntity.badge = badge
} else {
userInfoEntity.badge = null
}
UserManager.getInstance().userInfoEntity = userInfoEntity
AppDatabase.getInstance(context).userInfoDao().updateUserInfo(userInfoEntity)
}
@JavascriptInterface
fun getChannel(msg: Any): String {
return HaloApp.getInstance().channel
}
@JavascriptInterface
fun bindWechat(msg: Any, handler: CompletionHandler<Any>) {
context.ifLogin("浏览器") {
LoginHelper.loginWithWechat(object : LoginHelper.LoginCallback {
@SuppressLint("CheckResult")
override fun onLoginSuccess(loginType: LoginTag, jsonContent: JSONObject) {
val wechatLoginInfoMap = hashMapOf<String, String>()
wechatLoginInfoMap["openid"] = jsonContent.getString("openid")
wechatLoginInfoMap["unionid"] = jsonContent.getString("unionid")
wechatLoginInfoMap["access_token"] = jsonContent.getString("access_token")
wechatLoginInfoMap["refresh_token"] = jsonContent.getString("refresh_token")
RetrofitManager.getInstance(HaloApp.getInstance().application)
.api
.postBindWechat(wechatLoginInfoMap.createRequestBody())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : BiResponse<ResponseBody>() {
override fun onSuccess(data: ResponseBody) {
handler.complete(true)
}
override fun onFailure(exception: Exception) {
handler.complete(false)
if (exception is HttpException) {
ErrorHelper.handleError(HaloApp.getInstance().application, exception.response().errorBody()?.string())
}
}
})
}
override fun onLoginFailure(loginType: LoginTag, error: String) {
handler.complete(false)
}
})
}
}
@JavascriptInterface
fun copyText(msg: Any) {
msg.toString().copyTextAndToast()
}
@JavascriptInterface
fun startApp(msg: Any) {
val packageName = msg.toString()
PackageUtils.launchApplicationByPackageName(HaloApp.getInstance().application, packageName)
}
@JavascriptInterface
fun openImage(event: Any) {
val imageEvent = event.toString().toObject() ?: ImageEvent()
val context = CurrentActivityHolder.getCurrentActivity()
context?.startActivity(ViewImageActivity.getViewImageIntent(context, imageEvent.imageList, imageEvent.position, "浏览器"))
}
@JavascriptInterface
fun openBase64Image(event: Any) {
val context = CurrentActivityHolder.getCurrentActivity()
Base64ImageHolder.image = event.toString()
context?.startActivity(ViewImageActivity.getBase64ViewImageIntent(context, true))
}
@Keep
internal data class MtaEvent(var name: String = "", var key: String = "", var value: String = "")
@Keep
internal data class ImageEvent(var imageList: ArrayList<String> = arrayListOf(), var position: Int = 0)
}

View File

@ -0,0 +1,116 @@
package com.gh.common
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.text.TextUtils
import com.gh.common.util.DialogUtils
import com.gh.common.util.DirectUtils
import com.gh.common.util.EntranceUtils
import com.gh.gamecenter.GameDetailActivity
import com.gh.gamecenter.LibaoDetailActivity
import com.gh.gamecenter.NewsDetailActivity
import com.gh.gamecenter.WebActivity
import com.gh.gamecenter.entity.CommunityEntity
import com.gh.gamecenter.subject.SubjectActivity
import com.lightgame.utils.Utils
object DefaultWebViewUrlHandler {
@JvmStatic
fun interceptUrl(context: Context, url: String, entrance: String): Boolean {
val uri = Uri.parse(url)
if ("ghzhushou" == uri.scheme) {
Utils.log("url = $url")
Utils.log("url = " + uri.scheme!!)
val host = uri.host
val path = uri.path
var id = ""
if (!TextUtils.isEmpty(path)) {
id = path!!.substring(1)
}
val intent: Intent
when (host) {
"article" -> context.startActivity(NewsDetailActivity.getIntentById(context, id, entrance))
"game" -> GameDetailActivity.startGameDetailActivity(context, id, entrance)
"column" -> SubjectActivity.startSubjectActivity(context, id, uri.getQueryParameter("name"), false, entrance)
"libao" -> context.startActivity(LibaoDetailActivity.getIntentById(context, id, entrance))
"qq" -> try {
DirectUtils.directToQqConversation(context, id)
} catch (e: Exception) {
Utils.toast(context, "请检查是否已经安装手机QQ")
e.printStackTrace()
}
"qqqun" -> {
val key = uri.getQueryParameter("key")
if (!DirectUtils.directToQqGroup(context, key)) {
Utils.toast(context, "请检查是否已经安装手机QQ")
}
}
"inurl" -> {
intent = Intent(context, WebActivity::class.java)
intent.putExtra(EntranceUtils.KEY_URL, uri.getQueryParameter("url"))
context.startActivity(intent)
}
"outurl" -> {
intent = Intent()
intent.action = Intent.ACTION_VIEW
intent.data = Uri.parse(uri.getQueryParameter("url"))
try {
context.startActivity(intent)
} catch (e: Exception) {
Utils.toast(context, "请检查是否已经安装手机浏览器")
e.printStackTrace()
}
}
"question" -> DirectUtils.directToQuestionDetail(context, id, entrance, "文章链接")
"community" -> {
val community = CommunityEntity()
community.id = id
community.name = uri.getQueryParameter("name")
DirectUtils.directToCommunity(context, community)
}
"answer" -> DirectUtils.directToAnswerDetail(context, id, entrance, "文章链接")
"communities" -> {
// ghzhushou://communities/5a32405b2397ab000f688de3/articles/5c99d262c140b321564f04e3
var communityId = ""
var type = ""
var typeId = ""
val split = id.split("/".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()
for (text in split) {
if (TextUtils.isEmpty(communityId)) {
communityId = text
continue
}
if (TextUtils.isEmpty(type)) {
type = text
continue
}
if (TextUtils.isEmpty(typeId)) {
typeId = text
}
}
if ("articles" == type) {
DirectUtils.directToCommunityArticle(
context, typeId, communityId,
entrance, "文章链接")
}
}
else -> DialogUtils.showLowVersionDialog(context)
}
return true
}
return false
}
}

View File

@ -1,14 +1,16 @@
package com.gh.common
import android.annotation.SuppressLint
import android.preference.PreferenceManager
import com.gh.base.GHUmengNotificationService
import com.gh.common.constant.Config
import com.gh.common.exposure.meta.MetaUtil
import com.gh.common.util.edit
import com.gh.common.util.toJson
import com.gh.common.util.toObject
import com.gh.gamecenter.BuildConfig
import com.gh.gamecenter.entity.AliasEntity
import com.gh.gamecenter.retrofit.RetrofitManager
import com.google.gson.Gson
import com.halo.assistant.HaloApp
import com.lightgame.utils.Utils
import com.umeng.commonsdk.UMConfigure
@ -24,37 +26,37 @@ import org.json.JSONObject
object PushManager {
var gson = Gson()
var deviceToken: String? = ""
var previousAlias: AliasEntity? = null
var application = HaloApp.getInstance().application
private var mPreviousAlias: AliasEntity? = null
private var mApplication = HaloApp.getInstance().application
const val SP_PUSH_ALIAS = "push_alias"
@JvmStatic
fun init(channel: String) {
//初始化友盟推送
UMConfigure.init(application,
UMConfigure.init(mApplication,
Config.UMENG_APPKEY, channel,
UMConfigure.DEVICE_TYPE_PHONE,
Config.UMENG_MESSAGE_SECRET)
// 注册小米、华为和魅族通道
MiPushRegistar.register(application, Config.MIPUSH_APPID, Config.MIPUSH_APPKEY)
HuaWeiRegister.register(application)
MeizuRegister.register(application, BuildConfig.MEIZUPUSH_APPID, BuildConfig.MEIZUPUSH_APPKEY)
MiPushRegistar.register(mApplication, Config.MIPUSH_APPID, Config.MIPUSH_APPKEY)
HuaWeiRegister.register(mApplication)
MeizuRegister.register(mApplication, BuildConfig.MEIZUPUSH_APPID, BuildConfig.MEIZUPUSH_APPKEY)
//友盟推送
val pushAgent = PushAgent.getInstance(application)
val pushAgent = PushAgent.getInstance(mApplication)
pushAgent.onAppStart() // 开启App统计
//注册推送服务每次调用register方法都会回调该接口
registerDevice()
val aliasInSp = PreferenceManager.getDefaultSharedPreferences(application).getString(SP_PUSH_ALIAS, "")
previousAlias = gson.fromJson(aliasInSp, AliasEntity::class.java)
val aliasInSp = PreferenceManager.getDefaultSharedPreferences(mApplication).getString(SP_PUSH_ALIAS, "")
mPreviousAlias = aliasInSp?.toObject()
if (previousAlias == null) {
if (mPreviousAlias == null) {
getAndSetAlias()
}
@ -63,7 +65,7 @@ object PushManager {
}
private fun registerDevice() {
PushAgent.getInstance(application).register(object : IUmengRegisterCallback {
PushAgent.getInstance(mApplication).register(object : IUmengRegisterCallback {
override fun onSuccess(dToken: String) {
//注册成功会返回device token
deviceToken = dToken
@ -77,6 +79,7 @@ object PushManager {
})
}
@SuppressLint("CheckResult")
@JvmStatic
fun getAndSetAlias() {
if (deviceToken.isNullOrEmpty()) {
@ -98,7 +101,7 @@ object PushManager {
val body = RequestBody.create(MediaType.parse("application/json"), jsonObject.toString())
RetrofitManager.getInstance(application).api.getAlias(body)
RetrofitManager.getInstance(mApplication).api.getAlias(body)
.subscribeOn(Schedulers.io())
.subscribe(
{ setAlias(it) },
@ -108,11 +111,11 @@ object PushManager {
@JvmStatic
fun setAlias(alias: AliasEntity) {
val pushAgent = PushAgent.getInstance(application)
val pushAgent = PushAgent.getInstance(mApplication)
previousAlias = alias
PreferenceManager.getDefaultSharedPreferences(application).edit {
putString(SP_PUSH_ALIAS, gson.toJson(previousAlias))
mPreviousAlias = alias
PreferenceManager.getDefaultSharedPreferences(mApplication).edit {
putString(SP_PUSH_ALIAS, mPreviousAlias?.toJson())
}
pushAgent.setAlias(alias.alias, alias.aliasType) { b, s ->
@ -122,16 +125,16 @@ object PushManager {
@JvmStatic
fun deleteAlias() {
val pushAgent = PushAgent.getInstance(application)
val pushAgent = PushAgent.getInstance(mApplication)
previousAlias?.let {
mPreviousAlias?.let {
pushAgent.deleteAlias(it.alias, it.aliasType) { b, s ->
Utils.log("删除别名 $b + $s")
}
}
PreferenceManager.getDefaultSharedPreferences(application).edit {
PreferenceManager.getDefaultSharedPreferences(mApplication).edit {
putString(SP_PUSH_ALIAS, "")
}
previousAlias = null
mPreviousAlias = null
}
}

View File

@ -3,8 +3,8 @@ package com.gh.common
import android.app.Activity
import android.app.Application
import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import com.halo.assistant.HaloApp
import java.util.concurrent.Executors
@ -13,6 +13,8 @@ import java.util.concurrent.Executors
*/
class TimeElapsedHelper(val fragment: Fragment?, val activity: Activity?) {
constructor() : this(null, null)
constructor(fragment: Fragment) : this(fragment, null)
constructor(activity: Activity) : this(null, activity)
@ -59,19 +61,19 @@ class TimeElapsedHelper(val fragment: Fragment?, val activity: Activity?) {
fragment?.fragmentManager?.registerFragmentLifecycleCallbacks(
object : FragmentManager.FragmentLifecycleCallbacks() {
override fun onFragmentResumed(fm: FragmentManager?, f: Fragment?) {
override fun onFragmentResumed(fm: FragmentManager, f: Fragment) {
if (f === fragment) {
resumeCounting()
}
}
override fun onFragmentPaused(fm: FragmentManager?, f: Fragment?) {
override fun onFragmentPaused(fm: FragmentManager, f: Fragment) {
if (f === fragment) {
pauseCounting()
}
}
override fun onFragmentViewDestroyed(fm: FragmentManager?, f: Fragment?) {
override fun onFragmentViewDestroyed(fm: FragmentManager, f: Fragment) {
if (f === fragment) {
fragment.fragmentManager?.unregisterFragmentLifecycleCallbacks(this)
}
@ -79,7 +81,7 @@ class TimeElapsedHelper(val fragment: Fragment?, val activity: Activity?) {
}, false)
}
private fun resumeCounting() {
fun resumeCounting() {
isWorking = true
TimeElapsedThreadHolder.threadService.execute {
while (isWorking) {
@ -100,7 +102,11 @@ class TimeElapsedHelper(val fragment: Fragment?, val activity: Activity?) {
}
}
private fun pauseCounting() {
fun resetCounting() {
elapsedTime = 0
}
fun pauseCounting() {
isWorking = false
}

View File

@ -0,0 +1,11 @@
package com.gh.common.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Synchronize {
}

View File

@ -1,12 +1,15 @@
package com.gh.common.constant;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.text.TextUtils;
import androidx.annotation.Nullable;
import com.gh.common.util.GsonUtils;
import com.gh.common.util.PackageHelper;
import com.gh.common.util.SPUtils;
import com.gh.gamecenter.BuildConfig;
import com.gh.gamecenter.entity.NewsEntity;
import com.gh.gamecenter.entity.SettingsEntity;
@ -18,17 +21,12 @@ import java.util.List;
public class Config {
public static final String API_HOST = BuildConfig.API_HOST;
public static final String USER_HOST = BuildConfig.USER_HOST;
public static final String COMMENT_HOST = BuildConfig.COMMENT_HOST;
public static final String DATA_HOST = BuildConfig.DATA_HOST;
public static final String LIBAO_HOST = BuildConfig.LIBAO_HOST;
public static final String MESSAGE_HOST = BuildConfig.MESSAGE_HOST;
/**
* 需要配置的请使用{@link PreferenceManager#getDefaultSharedPreferences(Context)}
*/
// @Deprecated
// public static final String PREFERENCE = "ghzhushou";
// Third-Party confs
public static final String WECHAT_APPID = BuildConfig.WECHAT_APPID;
@ -46,13 +44,21 @@ public class Config {
public static final String URL_ARTICLE = "http://www.ghzs666.com/article/"; // ghzs/ghzs666 统一
public static final String PATCHES = "patches";
public static final String DEFAULT_CHANNEL = "GH_TEST";
private static String SETTINGS_KEY = "settingsKey";
private static SettingsEntity mSettingsEntity;
public static final String FIX_DOWNLOAD_KEY = "isFixDownload";
public static final String FIX_PLUGIN_KEY = "isFixPlugin";
public static final String FIX_ARTICLE_KEY = "isFixArticle";
public static final String FIX_COMMUNITY_KEY = "isFixCommunity";
public static final int VIDEO_PAGE_SIZE = 21; // 视频列表大多都是一行3个
public static boolean isShow() {
if (PreferenceManager.getDefaultSharedPreferences(HaloApp.getInstance().getApplication())
.getBoolean("isFixDownload", false)) return true;
if (getPreferences().getBoolean(FIX_DOWNLOAD_KEY, false)) return true;
if (!isExistDownloadFilter()) return false;
@ -63,23 +69,20 @@ public class Config {
}
}
}
return false;
}
public static String getExceptionMsg(Context context) {
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
return sp.getString("errMsg", null);
public static String getExceptionMsg() {
return getPreferences().getString("errMsg", null);
}
public static void setExceptionMsg(Context context, String errMsg) {
PreferenceManager.getDefaultSharedPreferences(context).edit().putString("errMsg", errMsg).apply();
public static void setExceptionMsg(String errMsg) {
SPUtils.setString(getPreferences(), "errMsg", errMsg); //先用apply(),保存不了再用commit() 9.0机型保存不了信息
}
public static boolean isShowDownload(String gameId) {
if (PreferenceManager.getDefaultSharedPreferences(HaloApp.getInstance().getApplication())
.getBoolean("isFixDownload", false)) return true;
if (getPreferences().getBoolean(FIX_DOWNLOAD_KEY, false)) return true;
if (TextUtils.isEmpty(gameId) || !isExistDownloadFilter())
return false;
@ -103,6 +106,10 @@ public class Config {
public static boolean isShowPlugin(String gameId) {
SharedPreferences preferences = getPreferences();
boolean isFixPlugin = preferences.getBoolean(FIX_PLUGIN_KEY, false);
if (isFixPlugin) return true;
if (TextUtils.isEmpty(gameId) || !isExistDownloadFilter())
return false;
@ -113,8 +120,11 @@ public class Config {
} else {
return false;
}
} else if ("all".equals(entity.getGame())) {
}
if ("all".equals(entity.getGame())) {
if (entity.getPluginfy() && filterTime(entity.getTime())) {
preferences.edit().putBoolean(FIX_PLUGIN_KEY, true).apply();
return true;
}
}
@ -124,12 +134,17 @@ public class Config {
}
public static boolean isShowPlugin() {
SharedPreferences preferences = getPreferences();
boolean isFixPlugin = preferences.getBoolean(FIX_PLUGIN_KEY, false);
if (isFixPlugin) return true;
if (!isExistDownloadFilter())
return false;
for (SettingsEntity.Download entity : getSettings().getDownload()) {
if ("all".equals(entity.getGame())) {
if (entity.getPluginfy() && filterTime(entity.getTime())) {
preferences.edit().putBoolean(FIX_PLUGIN_KEY, true).apply();
return true;
}
}
@ -151,19 +166,20 @@ public class Config {
}
public static void setSettings(SettingsEntity settingsEntity) {
SharedPreferences.Editor edit = PreferenceManager.getDefaultSharedPreferences(HaloApp.getInstance().getApplication()).edit();
edit.putString(SETTINGS_KEY, GsonUtils.getInstance().toJson(settingsEntity)).apply();
getPreferences().edit().putString(SETTINGS_KEY, GsonUtils.toJson(settingsEntity)).apply();
mSettingsEntity = settingsEntity;
// 加载完设置后刷新下
PackageHelper.initList();
}
@Nullable
public static SettingsEntity getSettings() {
if (mSettingsEntity == null) {
try {
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(HaloApp.getInstance().getApplication());
String json = sp.getString(SETTINGS_KEY, null);
String json = getPreferences().getString(SETTINGS_KEY, null);
if (!TextUtils.isEmpty(json)) {
mSettingsEntity = GsonUtils.getInstance().fromJsonBean(json, SettingsEntity.class);
mSettingsEntity = GsonUtils.fromJson(json, SettingsEntity.class);
}
} catch (Exception e) {
e.printStackTrace();
@ -193,4 +209,27 @@ public class Config {
}
}
public static SharedPreferences getPreferences() {
return PreferenceManager.getDefaultSharedPreferences(HaloApp.getInstance().getApplication());
}
public static boolean isExistHideFunction() {
SharedPreferences preferences = getPreferences();
if (!preferences.getBoolean(FIX_DOWNLOAD_KEY, false)) return true;
if (!preferences.getBoolean(FIX_PLUGIN_KEY, false)) return true;
if (!preferences.getBoolean(FIX_COMMUNITY_KEY, false)) return true;
if (!preferences.getBoolean(FIX_ARTICLE_KEY, false)) return true;
return false;
}
public static void fixHideFunction() {
SharedPreferences preferences = PreferenceManager.
getDefaultSharedPreferences(HaloApp.getInstance().getApplication());
SharedPreferences.Editor editor = preferences.edit();
editor.putBoolean(Config.FIX_DOWNLOAD_KEY, true);
editor.putBoolean(Config.FIX_ARTICLE_KEY, true);
editor.putBoolean(Config.FIX_COMMUNITY_KEY, true);
editor.putBoolean(Config.FIX_PLUGIN_KEY, true);
editor.apply();
}
}

View File

@ -17,12 +17,24 @@ public class Constants {
public static final String DEVICE_KEY = "deviceKey";
public static final String HAS_REQUESTED_NOTIFICATION_PERMISSIONS = "has_requested_notification_permissions";
public static final String SHOULD_SHOW_VIDEO_MOBILE_WARNING = "should_show_video_mobile_warning";
public static final String GAME_DETAIL_COME_IN = "game_detail_come_in"; // 从游戏详情进入
public static final String XPOSED_INSTALLER_PACKAGE_NAME = "de.robv.android.xposed.installer";
public static final String EB_QUIT_LOGIN = "quit_login";
// 最近显示的弹窗信息
public static final String SP_LAST_OPENING_ID = "last_opening_dialog_id";
public static final String SP_LAST_OPENING_TIME = "last_opening_dialog_time";
public static final String SP_SHOWED_NOTIFICATION_HINT = "show_notification_hint";
//标记安装的游戏为已玩过弹窗最多取消2次
public static final String SP_MARK_INSTALLED_GAME = "mark_installed_game";
//手机号码匹配规则
public static final String REGEX_MOBILE = "^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$";
public static final String REGEX_ACCOUNT = "^[a-zA-Z_]\\w{5,17}$";
@ -31,6 +43,14 @@ public class Constants {
//输入规则
public static final String INPUT_RULE = "0123456789abcdefghijklnmopqrstuvwxyzABCDEFGHIJKLNMOPQRSTUVWXYZ_";
// 微信绑定地址地址
public static final String WECHAT_BIND_ADDRESS_DEV = "https://resource.ghzs.com/page/wechat_dev/index.html#/";
public static final String WECHAT_BIND_ADDRESS = "https://resource.ghzs.com/page/wechat_pro/index.html#/";
// 徽章
public static final String BADGE_ADDRESS_DEV = "http://resource.ghzs.com/page/badge_dev/index.html#/";
public static final String BADGE_ADDRESS = "http://resource.ghzs.com/page/badge_pro/index.html#/";
//最少需要多少数据才能上传
public static final int DATA_AMOUNT = 20;
@ -47,4 +67,9 @@ public class Constants {
//评论 cd间隔
public static final int COMMENT_CD = 60 * 1000;
public static final String[] REPORT_LIST = new String[]{"垃圾广告营销", "恶意攻击谩骂", "淫秽色情信息", "违法有害信息", "其它"};
public static final String ENTRANCE_UNKNOWN = "(unknown)";
public static final String DEFAULT_TEXT_WRAPPER = "###";
}

View File

@ -9,6 +9,7 @@ public class ItemViewType {
public static final int GAME_SLIDE = 1; // 滚动图布局
public static final int GAME_NORMAL = 2; // 正常游戏布局
public static final int GAME_SUBJECT = 19;
public static final int GAME_SUBJECT_SLIDE = 26;
public static final int GAME_TEST = 3; // 测试游戏布局
public static final int GAME_IMAGE = 4; // 游戏大图布局
public static final int NEWS_HEADER = 5; // 新闻头部布局
@ -27,13 +28,16 @@ public class ItemViewType {
public static final int ASK_REFRESH = 19; // 问答精选 刷新
public static final int ITEM_EMPTY = 20;
public static final int ASK_CONCERN = 21; // 问答精选 关注
public static final int RATING_ITEM = 22; // 问答精选 关注
public static final int IMAGE_SLIDE_ITEM = 23;
public static final int VERTICAL_SLIDE_ITEM = 24;
public static final int COLUMN_COLLECTION = 25;
/**
* 普通列表
*/
public static final int ITEM_BODY = 100;
public static final int ITEM_FOOTER = 101;
public static final int ITEM_TOP = 102;
public static final int ITEM_HEADER = 102;
}

View File

@ -1,10 +1,11 @@
package com.gh.common.databind;
import android.content.Intent;
import android.databinding.BindingAdapter;
import android.support.v4.content.ContextCompat;
import android.support.v4.widget.SwipeRefreshLayout;
import android.graphics.Color;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.TextUtils;
import android.text.style.ForegroundColorSpan;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
@ -12,25 +13,36 @@ import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat;
import androidx.databinding.BindingAdapter;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.facebook.drawee.view.SimpleDraweeView;
import com.gh.base.OnViewClickListener;
import com.gh.common.constant.Config;
import com.gh.common.dialog.ReserveDialogFragment;
import com.gh.common.exposure.ExposureEvent;
import com.gh.common.exposure.ExposureUtils;
import com.gh.common.repository.ReservationRepository;
import com.gh.common.util.CheckLoginUtils;
import com.gh.common.util.DataUtils;
import com.gh.common.util.DialogUtils;
import com.gh.common.util.DisplayUtils;
import com.gh.common.util.DownloadDialogHelper;
import com.gh.common.util.GameUtils;
import com.gh.common.util.GameViewUtils;
import com.gh.common.util.ImageUtils;
import com.gh.common.util.KaiFuUtils;
import com.gh.common.util.NewsUtils;
import com.gh.common.util.NumberUtils;
import com.gh.common.util.PackageUtils;
import com.gh.common.util.PermissionHelper;
import com.gh.common.util.PlatformUtils;
import com.gh.common.util.StringUtils;
import com.gh.common.util.ReservationHelper;
import com.gh.common.view.DownloadDialog;
import com.gh.common.view.DownloadProgressBar;
import com.gh.common.view.DrawableView;
import com.gh.download.DownloadManager;
import com.gh.gamecenter.DownloadManagerActivity;
import com.gh.gamecenter.R;
@ -39,10 +51,12 @@ import com.gh.gamecenter.databinding.KaifuAddItemBinding;
import com.gh.gamecenter.databinding.KaifuDetailItemRowBinding;
import com.gh.gamecenter.entity.ApkEntity;
import com.gh.gamecenter.entity.GameEntity;
import com.gh.gamecenter.entity.KaiFuCalendarEntity;
import com.gh.gamecenter.entity.PluginLocation;
import com.gh.gamecenter.entity.ServerCalendarEntity;
import com.gh.gamecenter.entity.TagStyleEntity;
import com.gh.gamecenter.eventbus.EBReuse;
import com.gh.gamecenter.manager.PackagesManager;
import com.gh.gamecenter.qa.entity.CommunityVideoEntity;
import com.lightgame.download.DownloadEntity;
import com.lightgame.download.FileUtils;
import com.lightgame.utils.Utils;
@ -64,14 +78,18 @@ public class BindingAdapters {
ImageUtils.displayIcon(view, imageUrl);
}
@BindingAdapter("imageUrl")
public static void loadImage(SimpleDraweeView view, String imageUrl) {
ImageUtils.display(view, imageUrl);
}
@BindingAdapter("setTextSize")
public static void setTextSize(TextView view, int number) {
view.setTextSize(number);
}
@BindingAdapter({"addDetailKaiFuView", "addDetailKaiFuViewListener", "isReadyPatch"})
public static void addDetailKaiFuView(LinearLayout view, List<KaiFuCalendarEntity> list
public static void addDetailKaiFuView(LinearLayout view, List<ServerCalendarEntity> list
, OnViewClickListener listener, Boolean isReadyPatch) {
if (list == null) return;
view.removeAllViews();
@ -83,7 +101,7 @@ public class BindingAdapters {
if (i == 0) {
binding.setIsTitle(true);
} else {
KaiFuCalendarEntity serverEntity = list.get(i - 1);
ServerCalendarEntity serverEntity = list.get(i - 1);
binding.setEntity(serverEntity);
binding.getRoot().setOnClickListener(v -> {
listener.onClick(v, isReadyPatch != null && isReadyPatch ? serverEntity : null);
@ -112,7 +130,7 @@ public class BindingAdapters {
}
@BindingAdapter({"addKaiFuView", "clickListener"})
public static void addKaiFuView(LinearLayout view, List<KaiFuCalendarEntity> list, OnViewClickListener listener) {
public static void addKaiFuView(LinearLayout view, List<ServerCalendarEntity> list, OnViewClickListener listener) {
if (list == null) return;
view.removeAllViews();
view.addView(LayoutInflater.from(view.getContext()).inflate(R.layout.kaifu_add_item_title, null));
@ -300,8 +318,15 @@ public class BindingAdapters {
}
}
@BindingAdapter({"downloadButton", "traceEvent"})
public static void setDownloadButton(DownloadProgressBar progressBar, GameEntity gameEntity, ExposureEvent traceEvent) {
// 大图下的进度条
@BindingAdapter({"downloadButton", "traceEvent", "clickCallBack", "entrance", "location"})
public static void setDownloadButton(DownloadProgressBar progressBar,
GameEntity gameEntity,
ExposureEvent traceEvent,
@Nullable View.OnClickListener clickCallBack,
@Nullable String entrance,
@Nullable String location) {
// 判断是否显示按钮
if (gameEntity != null
&& Config.isShowDownload(gameEntity.getId())
@ -312,9 +337,102 @@ public class BindingAdapters {
return;
}
// 点击事件
progressBar.setOnClickListener(v -> {
if (clickCallBack != null) clickCallBack.onClick(v);
switch (progressBar.getDownloadType()) {
case DOWNLOADING_PLUGIN:
case DOWNLOADING_NORMAL:
Intent intent = DownloadManagerActivity.getDownloadMangerIntent(v.getContext(),
gameEntity.getApk().get(0).getUrl(), entrance);
v.getContext().startActivity(intent);
break;
case NONE:
Utils.toast(v.getContext(), "该游戏已关闭下载");
break;
case NORMAL:
case PLUGIN:
if (gameEntity.getApk().size() == 1) {
ApkEntity apk = gameEntity.getApk().get(0);
DownloadDialogHelper.findAvailableDialogAndShow(
v.getContext(),
gameEntity,
apk,
() -> {
DialogUtils.checkDownload(v.getContext(), apk.getSize(),
isSubscribe -> download(progressBar, gameEntity, traceEvent, isSubscribe, entrance, location));
});
} else {
DownloadDialog.getInstance(v.getContext()).showPopupWindow(v, gameEntity,
entrance, location + gameEntity.getName(), traceEvent);
}
break;
case LAUNCH_OR_OPEN:
if (gameEntity.getApk().size() == 1) {
DataUtils.onGameLaunchEvent(v.getContext(), gameEntity.getName(), gameEntity.getApk().get(0).getPlatform(), location);
PackageUtils.launchApplicationByPackageName(v.getContext(), gameEntity.getApk().get(0).getPackageName());
} else {
DownloadDialog.getInstance(v.getContext()).showPopupWindow(v, gameEntity,
entrance, location + gameEntity.getName(), traceEvent);
}
break;
case INSTALL_PLUGIN:
case INSTALL_NORMAL:
if (gameEntity.getApk().size() == 1) {
DownloadEntity downloadEntity = DownloadManager.getInstance(progressBar.getContext()).getDownloadEntityByUrl(gameEntity.getApk().get(0).getUrl());
if (downloadEntity != null) {
PackageUtils.launchSetup(v.getContext(), downloadEntity.getPath());
}
}
break;
case RESERVABLE:
CheckLoginUtils.checkLogin(progressBar.getContext(), "", () -> {
PermissionHelper.checkReadPhoneStatePermissionBeforeAction(progressBar.getContext(), () -> {
ReserveDialogFragment dialogFragment = ReserveDialogFragment.getInstance(
gameEntity,
() -> updateReservation(progressBar, gameEntity));
dialogFragment.show(((AppCompatActivity) progressBar.getContext()).getSupportFragmentManager(), "reserve");
});
});
break;
case RESERVED:
if ("download".equals(gameEntity.getReserveStatus())) {
ReservationHelper.showDeleteReservationDialog(progressBar.getContext(), () -> {
ReservationHelper.deleteReservation(gameEntity, () -> {
updateReservation(progressBar, gameEntity);
});
});
} else {
ReservationHelper.showCancelReservationDialog(progressBar.getContext(), () -> {
ReservationHelper.cancelReservation(gameEntity, () -> {
updateReservation(progressBar, gameEntity);
});
});
}
break;
}
});
// 显示预约
if (gameEntity.isReservable()) {
if (!ReservationRepository.thisGameHasBeenReserved(gameEntity.getId())) {
progressBar.setText("预约");
progressBar.setDownloadType(DownloadProgressBar.DownloadType.RESERVABLE);
} else {
progressBar.setText("已预约");
progressBar.setDownloadType(DownloadProgressBar.DownloadType.RESERVED);
}
return;
}
// 显示下载按钮状态
if (gameEntity.getApk().isEmpty()) {
progressBar.setText("暂无下载");
if (gameEntity.getApk().isEmpty() || gameEntity.getDownloadOffStatus() != null) {
String offStatus = gameEntity.getDownloadOffStatus();
if (offStatus != null && "dialog".equals(offStatus)) {
progressBar.setText("查看");
} else {
progressBar.setText("暂无");
}
progressBar.setDownloadType(DownloadProgressBar.DownloadType.NONE);
} else {
String status = GameUtils.getDownloadBtnText(progressBar.getContext(), gameEntity, PluginLocation.only_game);
@ -369,54 +487,30 @@ public class BindingAdapters {
}
}
}
// 点击事件
progressBar.setOnClickListener(v -> {
switch (progressBar.getDownloadType()) {
case DOWNLOADING_PLUGIN:
case DOWNLOADING_NORMAL:
Intent intent = DownloadManagerActivity.getDownloadMangerIntent(v.getContext(),
gameEntity.getApk().get(0).getUrl(), "(我的光环:我的游戏)");
v.getContext().startActivity(intent);
break;
case NONE:
Utils.toast(v.getContext(), "该游戏已关闭下载");
break;
case NORMAL:
case PLUGIN:
if (gameEntity.getApk().size() == 1) {
DialogUtils.checkDownload(v.getContext(), gameEntity.getApk().get(0).getSize(),
isSubscribe -> download(progressBar, gameEntity, traceEvent, isSubscribe));
} else {
DownloadDialog.getInstance(v.getContext()).showPopupWindow(v, gameEntity,
"(我的光环:我的游戏)", "我的光环-我的游戏:" + gameEntity.getName(), traceEvent);
}
break;
case LAUNCH_OR_OPEN:
if (gameEntity.getApk().size() == 1) {
DataUtils.onGameLaunchEvent(v.getContext(), gameEntity.getName(), gameEntity.getApk().get(0).getPlatform(), "我的光环-我的游戏");
PackageUtils.launchApplicationByPackageName(v.getContext(), gameEntity.getApk().get(0).getPackageName());
} else {
DownloadDialog.getInstance(v.getContext()).showPopupWindow(v, gameEntity,
"(我的光环:我的游戏)", "我的光环-我的游戏:" + gameEntity.getName(), traceEvent);
}
break;
case INSTALL_PLUGIN:
case INSTALL_NORMAL:
if (gameEntity.getApk().size() == 1) {
DownloadEntity downloadEntity = DownloadManager.getInstance(progressBar.getContext()).getDownloadEntityByUrl(gameEntity.getApk().get(0).getUrl());
if (downloadEntity != null) {
PackageUtils.launchSetup(v.getContext(), downloadEntity.getPath());
}
}
break;
}
});
}
private static void updateReservation(DownloadProgressBar progressBar, GameEntity gameEntity) {
// 显示预约
if (gameEntity.isReservable()) {
if (!ReservationRepository.thisGameHasBeenReserved(gameEntity.getId())) {
progressBar.setText("预约");
progressBar.setDownloadType(DownloadProgressBar.DownloadType.RESERVABLE);
} else {
progressBar.setText("已预约");
progressBar.setDownloadType(DownloadProgressBar.DownloadType.RESERVED);
}
}
}
// 开始下载
private static void download(DownloadProgressBar progressBar, GameEntity
gameEntity, ExposureEvent traceEvent, boolean isSubscribe) {
private static void download(DownloadProgressBar progressBar,
GameEntity gameEntity,
ExposureEvent traceEvent,
boolean isSubscribe,
String entrance,
String location) {
String str = progressBar.getText();
String method;
if (str.contains("更新")) {
@ -429,7 +523,7 @@ public class BindingAdapters {
ApkEntity apkEntity = gameEntity.getApk().get(0);
String msg = FileUtils.isCanDownload(progressBar.getContext(), apkEntity.getSize());
if (TextUtils.isEmpty(msg)) {
DataUtils.onGameDownloadEvent(progressBar.getContext(), gameEntity.getName(), apkEntity.getPlatform(), "(我的光环:我的游戏)", "下载开始", method);
DataUtils.onGameDownloadEvent(progressBar.getContext(), gameEntity.getName(), apkEntity.getPlatform(), entrance, "下载开始", method);
ExposureEvent downloadExposureEvent = ExposureUtils.logADownloadExposureEvent(gameEntity, apkEntity.getPlatform(), traceEvent, ExposureUtils.DownloadType.DOWNLOAD);
@ -437,7 +531,8 @@ public class BindingAdapters {
apkEntity,
gameEntity,
method,
StringUtils.buildString("(我的光环:我的游戏)"), "我的光环-我的游戏:" + gameEntity.getName(),
entrance,
location + gameEntity.getName(),
isSubscribe,
downloadExposureEvent);
@ -457,8 +552,8 @@ public class BindingAdapters {
View testView = LayoutInflater.from(layout.getContext()).inflate(R.layout.game_test_label, null);
TextView testType = testView.findViewById(R.id.test_type);
TextView testTime = testView.findViewById(R.id.test_time);
String type = gameEntity.getTest().getType();
KaiFuUtils.setKaiFuType(testType, type);
testType.setText(gameEntity.getTest().getType());
testType.setBackgroundColor(ContextCompat.getColor(layout.getContext(), R.color.tag_yellow));
if (gameEntity.getTest().getStart() == 0) {
testTime.setVisibility(View.GONE);
@ -474,9 +569,7 @@ public class BindingAdapters {
@BindingAdapter("isRefreshing")
public static void isRefreshing(SwipeRefreshLayout layout, LoadStatus status) {
if (status == LoadStatus.INIT_LOADING) {
layout.setRefreshing(true);
} else {
if (status != LoadStatus.INIT_LOADING && status != LoadStatus.LIST_LOADING) {
layout.setRefreshing(false);
}
}
@ -492,4 +585,59 @@ public class BindingAdapters {
}
}
@BindingAdapter({"setCommunityImage", "setCommunityVideoImage"})
public static void setCommunityImage(SimpleDraweeView imageView, List<String> images, List<CommunityVideoEntity> videos) {
if (videos.size() > 0) {
CommunityVideoEntity videoEntity = videos.get(0);
ImageUtils.display(imageView, videoEntity.getPoster());
imageView.setVisibility(View.VISIBLE);
} else if (images.size() > 0) {
imageView.setVisibility(View.VISIBLE);
ImageUtils.display(imageView, images.get(0));
} else {
imageView.setVisibility(View.GONE);
}
}
@BindingAdapter({"setCommunityVideoDuration"})
public static void setCommunityVideoDuration(TextView mVideoDuration, List<CommunityVideoEntity> videos) {
if (videos != null && videos.size() > 0) {
CommunityVideoEntity videoEntity = videos.get(0);
mVideoDuration.setBackground(DrawableView.getOvalDrawable(R.color.black_alpha_80, 999F));
mVideoDuration.setText(videoEntity.getDuration());
mVideoDuration.setVisibility(View.VISIBLE);
} else {
mVideoDuration.setVisibility(View.GONE);
}
}
@BindingAdapter({"setGameTags", "setMaxGameTags"})
public static void setGameTags(TextView view, List<TagStyleEntity> tags, int maxTags) {
if (tags == null) {
view.setText("");
return;
}
int showCount = tags.size() > maxTags ? maxTags : tags.size(); // 最多显示3个
StringBuilder content = new StringBuilder();
for (int i = 0; i < showCount; i++) {
TagStyleEntity tag = tags.get(i);
content.append(tag.getName());
if (i != showCount - 1) content.append("/");
}
Spannable span = new SpannableString(content);
int index = 0;
for (int i = 0; i < showCount; i++) {
TagStyleEntity tag = tags.get(i);
int start = index;
int end = start + tag.getName().length() + ((i != showCount - 1) ? 1 : 0);
index = end;
span.setSpan(new ForegroundColorSpan(Color.parseColor("#" + tag.getColor())),
start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
}
view.setText(span);
}
}

View File

@ -0,0 +1,62 @@
package com.gh.common.dialog
import android.content.DialogInterface
import android.os.Bundle
import android.view.KeyEvent
import android.view.View
import com.gh.common.util.MtaHelper
import com.lightgame.dialog.BaseDialogFragment
import java.util.concurrent.atomic.AtomicBoolean
/**
* 对 dialog 操作进行 MTA 事件记录的 dialog fragment
*/
abstract class BaseTrackableDialogFragment : BaseDialogFragment() {
abstract fun getEvent(): String
abstract fun getKey(): String
// 区分此 dialog 是点击 dialog 外部取消的还是点击返回取消的
private val mIsCanceledByClickOutsideOfDialog = AtomicBoolean(true)
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
if (getEvent().isEmpty()) {
throw IllegalStateException("需要提供非空的 Event 来供 MTA 进行事件记录")
}
if (getKey().isEmpty()) {
throw IllegalStateException("需要提供非空的 Key 来供 MTA 进行事件记录")
}
onEvent("出现弹窗")
dialog?.setCanceledOnTouchOutside(true)
dialog?.setOnKeyListener { _, keyCode, event ->
if (keyCode == KeyEvent.KEYCODE_BACK && event.action == KeyEvent.ACTION_UP) {
mIsCanceledByClickOutsideOfDialog.set(false)
onEvent("点击返回")
}
false
}
}
fun onEvent(value: String) {
if (trackWithBasicDeviceInfo()) {
MtaHelper.onEventWithBasicDeviceInfo(getEvent(), getKey(), value)
} else {
MtaHelper.onEvent(getEvent(), getKey(), value)
}
}
override fun onCancel(dialog: DialogInterface) {
super.onCancel(dialog)
if (mIsCanceledByClickOutsideOfDialog.get()) {
onEvent("点击空白")
}
}
open fun trackWithBasicDeviceInfo() = false
}

View File

@ -0,0 +1,70 @@
package com.gh.common.dialog
import android.graphics.Paint
import android.os.Bundle
import android.util.TypedValue
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.core.text.HtmlCompat
import com.gh.common.util.DirectUtils
import com.gh.common.util.DisplayUtils
import com.gh.common.util.MtaHelper
import com.gh.gamecenter.R
import com.gh.gamecenter.entity.GameEntity
import kotlinx.android.synthetic.main.dialog_game_off_service.*
// 游戏关闭下载弹窗
class GameOffServiceDialogFragment : BaseTrackableDialogFragment() {
private var mDialog: GameEntity.Dialog? = null
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return inflater.inflate(R.layout.dialog_game_off_service, null)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
mDialog?.run {
titleTv.text = title
contentTv.text = HtmlCompat.fromHtml(content, HtmlCompat.FROM_HTML_MODE_LEGACY)
for (site in sites) {
val siteTv = TextView(context)
siteTv.layoutParams = LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT).apply {
topMargin = DisplayUtils.dip2px(12f)
}
siteTv.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14f)
siteTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.theme))
siteTv.text = site.text
siteTv.paintFlags = siteTv.paintFlags or Paint.UNDERLINE_TEXT_FLAG
siteTv.setOnClickListener {
MtaHelper.onEvent("游戏下载状态按钮", getKey(), site.text)
DirectUtils.directToWebView(requireContext(), site.url, "(关闭下载弹窗)")
dismiss()
}
container.addView(siteTv)
}
}
}
override fun getEvent(): String {
return "游戏下载状态按钮"
}
override fun getKey(): String {
return "查看详情弹窗"
}
companion object {
@JvmStatic
fun getInstance(dialog: GameEntity.Dialog) = GameOffServiceDialogFragment().apply {
mDialog = dialog
}
}
}

View File

@ -0,0 +1,90 @@
package com.gh.common.dialog
import android.annotation.SuppressLint
import android.content.Intent
import android.graphics.Color
import android.os.Build
import android.os.Bundle
import android.provider.Settings
import android.util.TypedValue
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import android.widget.TextView
import com.gh.common.util.DisplayUtils
import com.gh.common.util.MtaHelper
import com.gh.common.util.PermissionHelper
import com.gh.gamecenter.BuildConfig
import com.gh.gamecenter.R
import com.gh.gamecenter.entity.NotificationHint
import kotlinx.android.synthetic.main.dialog_notification_hint.*
// 通知权限弹窗
class NotificationHintDialogFragment : BaseTrackableDialogFragment() {
private var mNotificationHint: NotificationHint? = null
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return inflater.inflate(R.layout.dialog_notification_hint, null)
}
@Suppress("DEPRECATION")
@SuppressLint("SetTextI18n")
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
titleTv.text = mNotificationHint?.title
contentContainer.removeAllViews()
for (item in mNotificationHint?.content!!) {
val tv = TextView(context)
tv.layoutParams = LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT).apply {
topMargin = if (contentContainer.childCount == 0) 0 else DisplayUtils.dip2px(12f)
}
tv.text = item
tv.setTextColor(Color.parseColor("#1383EB"))
tv.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14f)
contentContainer.addView(tv)
}
activateTv.setOnClickListener {
MtaHelper.onEventWithBasicDeviceInfo(getEvent(), getKey(), "点击立即开启")
dismiss()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
//这种方案适用于 API 26, 即8.0含8.0)以上可以用
val intent = Intent()
intent.action = Settings.ACTION_APP_NOTIFICATION_SETTINGS
intent.putExtra(Settings.EXTRA_APP_PACKAGE, BuildConfig.APPLICATION_ID)
startActivity(intent)
} else {
PermissionHelper.toPermissionSetting(requireActivity())
}
}
laterTv.setOnClickListener {
dismiss()
MtaHelper.onEventWithBasicDeviceInfo(getEvent(), getKey(), "点击以后再说")
}
dialog?.setCanceledOnTouchOutside(true)
}
override fun getEvent(): String {
return "推送引导弹窗"
}
override fun getKey(): String {
return "引导弹窗"
}
override fun trackWithBasicDeviceInfo() = true
companion object {
@JvmStatic
fun getInstance(hint: NotificationHint) = NotificationHintDialogFragment().apply {
mNotificationHint = hint
}
}
}

View File

@ -0,0 +1,198 @@
package com.gh.common.dialog
import android.annotation.SuppressLint
import android.app.Application
import android.os.Bundle
import android.text.Html
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.EditText
import android.widget.TextView
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.MutableLiveData
import butterknife.BindView
import butterknife.ButterKnife
import butterknife.OnClick
import com.gh.common.constant.Config
import com.gh.common.repository.ReservationRepository
import com.gh.common.util.*
import com.gh.gamecenter.R
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.manager.UserManager
import com.gh.gamecenter.retrofit.BiResponse
import com.gh.gamecenter.retrofit.RetrofitManager
import com.lightgame.utils.Utils
import io.reactivex.schedulers.Schedulers
import okhttp3.ResponseBody
import org.json.JSONObject
// 预约弹窗
class ReserveDialogFragment : BaseTrackableDialogFragment() {
@BindView(R.id.reserve_hint_tv)
lateinit var reserveHintTv: TextView
@BindView(R.id.reserve_content_tv)
lateinit var reserveContentTv: TextView
@BindView(R.id.reserve_completed_content_tv)
lateinit var reserveCompletedContentTv: TextView
@BindView(R.id.mobile_et)
lateinit var mobileEt: EditText
@BindView(R.id.reserve_container)
lateinit var reserveContainer: View
@BindView(R.id.reserve_completed_container)
lateinit var reserveCompletedContainer: View
@BindView(R.id.customizable_btn)
lateinit var customizableBtn: TextView
private lateinit var mViewModel: ReserveViewModel
private var mSuccessCallback: SuccessCallback? = null
private var mGameId: String = ""
private var mGameName: String = ""
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
mViewModel = viewModelProvider()
}
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return inflater.inflate(R.layout.dialog_reserve_game, null)
}
override fun getEvent(): String {
return "预约游戏"
}
override fun getKey(): String {
return "预约功能操作"
}
@Suppress("DEPRECATION")
@SuppressLint("SetTextI18n")
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
ButterKnife.bind(this, view)
val reserveContent = "游戏上线,您将<font color='#ff4147'>免费</font>收到短信提醒"
reserveContentTv.text = Html.fromHtml(reserveContent)
mobileEt.setText(UserManager.getInstance().userInfoEntity.mobile)
mobileEt.setSelection(mobileEt.text.length)
mViewModel.reservation.observeNonNull(this) {
if (it.success) {
showSuccessDialog(it.withMobile, it.boundWechat)
mSuccessCallback?.onSuccess()
}
}
dialog?.setCanceledOnTouchOutside(true)
}
private fun showSuccessDialog(withMobile: Boolean, boundWechat: Boolean) {
reserveHintTv.text = "游戏预约成功"
reserveContainer.visibility = View.GONE
reserveCompletedContainer.visibility = View.VISIBLE
val reservation = Config.getSettings()?.appointment
val dialogConfig = if (withMobile) reservation?.withMobile else reservation?.withoutMobile
reserveCompletedContentTv.text = dialogConfig?.htmlContent?.fromHtml()
if (dialogConfig?.text.isNullOrEmpty()
|| (dialogConfig?.type == "wechat_bind" && boundWechat)) {
customizableBtn.visibility = View.GONE
} else {
customizableBtn.text = dialogConfig?.text
customizableBtn.setOnClickListener {
MtaHelper.onEvent("预约游戏", "预约功能操作", "点击跳转按钮")
DirectUtils.directToLinkPage(
requireContext(),
dialogConfig!!.toLinkEntity(),
"(游戏预约)",
"")
dismissAllowingStateLoss()
}
}
}
@OnClick(R.id.reserve_with_mobile_btn,
R.id.reserve_without_mobile_btn,
R.id.close_btn,
R.id.customizable_btn)
fun onClick(view: View) {
when (view.id) {
R.id.reserve_without_mobile_btn -> {
MtaHelper.onEvent("预约游戏", "预约功能操作", "点击无手机号预约")
mViewModel.reserve(gameId = mGameId, gameName = mGameName)
}
R.id.reserve_with_mobile_btn -> {
val mobile = mobileEt.text.toString()
if (mobile.length < 11 || !mobile.startsWith("1")) {
Utils.toast(context, "手机号格式错误,请检查并重新输入")
return
}
MtaHelper.onEvent("预约游戏", "预约功能操作", "点击立即预约")
mViewModel.reserve(gameId = mGameId, gameName = mGameName, mobile = mobile)
}
R.id.close_btn -> {
MtaHelper.onEvent("预约游戏", "预约功能操作", "点击关闭")
dismissAllowingStateLoss()
}
}
}
companion object {
@JvmStatic
fun getInstance(gameEntity: GameEntity, successCallback: SuccessCallback) = ReserveDialogFragment().apply {
this.mGameId = gameEntity.id
this.mGameName = gameEntity.name ?: ""
this.mSuccessCallback = successCallback
}
}
interface SuccessCallback {
fun onSuccess()
}
}
class ReserveViewModel(application: Application) : AndroidViewModel(application) {
val reservation = MutableLiveData<Reservation>()
@SuppressLint("CheckResult")
fun reserve(gameId: String, gameName: String, mobile: String = "") {
val requestMap = hashMapOf<String, String>()
requestMap["game_id"] = gameId
if (mobile.isNotEmpty()) {
requestMap["mobile"] = mobile
}
RetrofitManager.getInstance(getApplication()).api
.createNewGameReservation(requestMap.createRequestBody())
.subscribeOn(Schedulers.io())
.subscribe(object : BiResponse<ResponseBody>() {
override fun onSuccess(data: ResponseBody) {
var boundWechat = false
tryWithDefaultCatch {
boundWechat = JSONObject(data.string() ?: "").getBoolean("wechat_bind")
}
reservation.postValue(Reservation(success = true, withMobile = mobile.isNotEmpty(), boundWechat = boundWechat))
ReservationRepository.addReservationToMemoryAndRefresh(gameId)
MtaHelper.onEvent("预约游戏", "预约", gameName)
}
override fun onFailure(exception: Exception) {
Utils.toast(getApplication(), exception.message)
}
})
}
class Reservation(var success: Boolean = false, var withMobile: Boolean = false, var boundWechat: Boolean = false)
}

View File

@ -0,0 +1,47 @@
package com.gh.common.dialog
import android.app.Dialog
import android.content.Context
import android.os.Bundle
import android.view.KeyEvent
import com.gh.common.util.MtaHelper
import java.util.concurrent.atomic.AtomicBoolean
open class TrackableDialog(context: Context,
themeResId: Int,
private var mEvent: String,
private var mKey: String,
private var mCancelValue: String? = null,
private var mKeyBackValue: String? = null,
private var mLogShowEvent: Boolean = true)
: Dialog(context, themeResId) {
// 区分此 dialog 是点击 dialog 外部取消的还是点击返回取消的
private val mIsCanceledByClickOutsideOfDialog = AtomicBoolean(true)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setOnCancelListener {
if (mIsCanceledByClickOutsideOfDialog.get()) {
MtaHelper.onEvent(mEvent, mKey, mCancelValue ?: "点击空白")
}
}
setOnKeyListener { _, keyCode, event ->
if (keyCode == KeyEvent.KEYCODE_BACK && event.action == KeyEvent.ACTION_UP) {
mIsCanceledByClickOutsideOfDialog.set(false)
MtaHelper.onEvent(mEvent, mKey, mKeyBackValue ?: "点击返回")
}
false
}
}
override fun show() {
super.show()
if (mLogShowEvent) {
MtaHelper.onEvent(mEvent, mKey, "出现弹窗")
}
}
}

View File

@ -1,9 +1,8 @@
package com.gh.common.exposure
import android.arch.persistence.room.TypeConverter
import androidx.room.TypeConverter
import com.gh.common.exposure.meta.Meta
import com.gh.common.util.GsonUtils
import com.google.gson.Gson
import java.util.*
import kotlin.collections.ArrayList
@ -11,32 +10,32 @@ class ExposureConverters {
@TypeConverter
fun convertPayload2String(any: ExposureEntity): String {
return GsonUtils.getInstance().mGson.toJson(any)
return GsonUtils.toJson(any)
}
@TypeConverter
fun convertString2Payload(string: String): ExposureEntity {
return GsonUtils.getInstance().mGson.fromJson(string, ExposureEntity::class.java)
return GsonUtils.fromJson(string, ExposureEntity::class.java)
}
@TypeConverter
fun convertSource2String(sourceList: List<ExposureSource>): String {
return GsonUtils.getInstance().mGson.toJson(sourceList)
return GsonUtils.toJson(sourceList)
}
@TypeConverter
fun convertString2Source(sourceList: String): List<ExposureSource> {
return ArrayList(Arrays.asList(GsonUtils.getInstance().mGson.fromJson(sourceList, Array<ExposureSource>::class.java))) as List<ExposureSource>
return ArrayList(Arrays.asList(GsonUtils.fromJson(sourceList, Array<ExposureSource>::class.java))) as List<ExposureSource>
}
@TypeConverter
fun convertETrace2String(sourceList: List<ExposureEvent>?): String {
return GsonUtils.getInstance().mGson.toJson(sourceList)
return GsonUtils.toJson(sourceList)
}
@TypeConverter
fun convertStringToETrace(sourceList: String): List<ExposureEvent> {
return ArrayList(Arrays.asList(Gson().fromJson(sourceList, Array<ExposureEvent>::class.java))) as List<ExposureEvent>
return ArrayList(Arrays.asList(GsonUtils.fromJson(sourceList, Array<ExposureEvent>::class.java))) as List<ExposureEvent>
}
@TypeConverter
@ -51,12 +50,12 @@ class ExposureConverters {
@TypeConverter
fun convertMeta2String(any: Meta): String {
return GsonUtils.getInstance().mGson.toJson(any)
return GsonUtils.toJson(any)
}
@TypeConverter
fun convertString2Meta(string: String): Meta {
return GsonUtils.getInstance().mGson.fromJson(string, Meta::class.java)
return GsonUtils.fromJson(string, Meta::class.java)
}
}

View File

@ -1,9 +1,9 @@
package com.gh.common.exposure
import android.arch.persistence.room.Database
import android.arch.persistence.room.Room
import android.arch.persistence.room.RoomDatabase
import android.arch.persistence.room.TypeConverters
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
import androidx.room.TypeConverters
import android.content.Context
@TypeConverters(ExposureConverters::class)

View File

@ -1,7 +1,7 @@
package com.gh.common.exposure
import android.os.Parcelable
import android.support.annotation.Keep
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kotlinx.android.parcel.Parcelize

View File

@ -1,9 +1,9 @@
package com.gh.common.exposure
import android.arch.persistence.room.Entity
import android.arch.persistence.room.PrimaryKey
import androidx.room.Entity
import androidx.room.PrimaryKey
import android.os.Parcelable
import android.support.annotation.Keep
import androidx.annotation.Keep
import com.gh.common.exposure.meta.Meta
import com.gh.common.exposure.meta.MetaUtil
import com.gh.common.exposure.time.TimeUtil
@ -15,7 +15,7 @@ import java.util.*
@Parcelize
@Entity(tableName = "exposureEvent")
data class ExposureEvent(
val payload: ExposureEntity,
var payload: ExposureEntity,
val source: List<ExposureSource>,
var eTrace: List<ExposureEvent>? = arrayListOf(),
val event: ExposureType,
@ -26,7 +26,7 @@ data class ExposureEvent(
companion object {
fun createEvent(gameEntity: GameEntity?, source: List<ExposureSource>, eTrace: List<ExposureEvent>?, event: ExposureType): ExposureEvent {
return ExposureEvent(
ExposureEntity(gameId = gameEntity?.id,
payload = ExposureEntity(gameId = gameEntity?.id,
gameName = gameEntity?.name,
sequence = gameEntity?.sequence,
platform = gameEntity?.platform,

View File

@ -1,6 +1,6 @@
package com.gh.common.exposure
import android.arch.persistence.room.*
import androidx.room.*
@Dao
interface ExposureEventDao {

View File

@ -1,9 +1,9 @@
package com.gh.common.exposure
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.RecyclerView
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import io.reactivex.functions.Consumer
/**
@ -18,11 +18,11 @@ class ExposureListener(var fragment: Fragment, var exposable: IExposable) : Recy
init {
fragment.fragmentManager?.registerFragmentLifecycleCallbacks(
object : FragmentManager.FragmentLifecycleCallbacks() {
override fun onFragmentResumed(fm: FragmentManager?, f: Fragment?) {
override fun onFragmentResumed(fm: FragmentManager, f: Fragment) {
throttleBus = ExposureThrottleBus(Consumer { commitExposure(it) }, Consumer(Throwable::printStackTrace))
}
override fun onFragmentPaused(fm: FragmentManager?, f: Fragment?) {
override fun onFragmentPaused(fm: FragmentManager, f: Fragment) {
visibleState?.let { commitExposure(it) }
throttleBus?.clear()
}

View File

@ -2,10 +2,10 @@ package com.gh.common.exposure
import com.aliyun.sls.android.sdk.model.LogGroup
import com.gh.common.exposure.time.TimeUtil
import com.gh.common.util.toJson
import com.gh.gamecenter.BuildConfig
import com.gh.loghub.LgLOG
import com.gh.loghub.LoghubHelper
import com.google.gson.Gson
import com.halo.assistant.HaloApp
import com.lightgame.utils.Utils
import java.util.concurrent.Executors
@ -30,8 +30,6 @@ object ExposureManager {
private val loghubHelper = LoghubHelper.getInstance()
private val gson = Gson()
// exposureCache 用来过滤掉具有相同 id 的曝光事件,避免重复发送事件
private val exposureCache = FixedSizeLinkedHashSet<String>(100)
private val exposureSet = hashSetOf<ExposureEvent>()
@ -97,9 +95,9 @@ object ExposureManager {
}
}
private fun commitSavedExposureEvent(force: Boolean = false) {
fun commitSavedExposureEvent(forced: Boolean = false) {
exposureExecutor.execute {
if (exposureSet.size < STORE_SIZE && !force || exposureSet.size == 0) return@execute
if (exposureSet.size < STORE_SIZE && !forced || exposureSet.size == 0) return@execute
val exposureList = exposureSet.toList()
// uploadLogGroup 是一个异步方法LoghubHelper 里面实现了重传功能,所以这里交给它就好了
@ -127,11 +125,13 @@ object ExposureManager {
val log = LgLOG(TimeUtil.currentTime())
log.PutContent("id", event.id)
log.PutContent("payload", gson.toJson(event.payload))
log.PutContent("payload", event.payload.toJson())
log.PutContent("event", event.event.toString())
log.PutContent("source", eliminateMultipleBrackets(gson.toJson(event.source)))
log.PutContent("meta", gson.toJson(event.meta))
log.PutContent("e-traces", if (event.eTrace != null) eliminateMultipleBrackets(gson.toJson(event.eTrace)) else "")
log.PutContent("source", eliminateMultipleBrackets(event.source.toJson()))
log.PutContent("meta", event.meta.toJson())
log.PutContent("e-traces", if (event.eTrace != null) {
eliminateMultipleBrackets(event.eTrace?.toJson() ?: "")
} else "")
log.PutTime(event.time)
return log

View File

@ -1,7 +1,7 @@
package com.gh.common.exposure
import android.os.Parcelable
import android.support.annotation.Keep
import androidx.annotation.Keep
import kotlinx.android.parcel.Parcelize
@Keep

View File

@ -1,6 +1,6 @@
package com.gh.common.exposure
import com.gh.common.util.fromObject
import com.gh.common.util.toObject
import com.gh.gamecenter.entity.GameEntity
import java.util.*
@ -30,12 +30,13 @@ object ExposureUtils {
val gameEntity = entity.clone()
gameEntity.platform = platform
gameEntity.downloadCompleteType = downloadType.toString()
val traceEvent = trace?.fromObject<ExposureEvent>()
val traceEvent = trace?.toObject<ExposureEvent>()
val exposureEvent = ExposureEvent.createEvent(gameEntity = gameEntity,
source = traceEvent?.source ?: ArrayList(),
eTrace = ExposureTraceUtils.appendTrace(traceEvent),
event = ExposureType.DOWNLOAD_COMPLETE)
ExposureManager.log(exposureEvent)
ExposureManager.commitSavedExposureEvent(forced = true)
}
enum class DownloadType {

View File

@ -1,7 +1,7 @@
package com.gh.common.exposure.meta
import android.os.Parcelable
import android.support.annotation.Keep
import androidx.annotation.Keep
import kotlinx.android.parcel.Parcelize
@Keep
@ -20,5 +20,6 @@ data class Meta(
val channel: String? = "",
val appVersion: String? = "",
val userId: String? = "",
val exposureVersion: String? = ""
val exposureVersion: String? = "",
val rom: String? = ""
) : Parcelable

View File

@ -14,6 +14,7 @@ import com.gh.gamecenter.BuildConfig
import com.gh.gamecenter.manager.UserManager
import com.halo.assistant.HaloApp
import com.leon.channel.helper.ChannelReaderUtil
import com.walkud.rom.checker.RomIdentifier
import java.io.File
object MetaUtil {
@ -37,7 +38,8 @@ object MetaUtil {
channel = getChannel(),
appVersion = BuildConfig.VERSION_NAME,
userId = UserManager.getInstance().userId,
exposureVersion = BuildConfig.EXPOSURE_VERSION)
exposureVersion = BuildConfig.EXPOSURE_VERSION,
rom = RomIdentifier.getRom().name + "" + RomIdentifier.getRom().versionName)
}
fun getMeta(): Meta {

View File

@ -0,0 +1,60 @@
package com.gh.common.history
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
import androidx.room.TypeConverters
import androidx.room.migration.Migration
import androidx.sqlite.db.SupportSQLiteDatabase
import com.gh.gamecenter.entity.HistoryGameEntity
import com.gh.gamecenter.entity.NewsEntity
import com.gh.gamecenter.qa.entity.AnswerEntity
import com.gh.gamecenter.qa.entity.ArticleEntity
import com.gh.gamecenter.room.converter.*
import com.gh.gamecenter.room.dao.AnswerHistoryDao
import com.gh.gamecenter.room.dao.ArticleHistoryDao
import com.gh.gamecenter.room.dao.GameDao
import com.gh.gamecenter.room.dao.NewsHistoryDao
import com.halo.assistant.HaloApp
@Database(entities = [AnswerEntity::class, ArticleEntity::class, NewsEntity::class, HistoryGameEntity::class], version = 4, exportSchema = false)
@TypeConverters(CountConverter::class,
CommunityConverter::class,
TimeConverter::class,
AnswerUserConverter::class,
ThumbnailConverter::class,
TagStyleListConverter::class,
StringArrayListConverter::class,
CommunityVideoConverter::class)
abstract class HistoryDatabase : RoomDatabase() {
abstract fun answerDao(): AnswerHistoryDao
abstract fun articleDao(): ArticleHistoryDao
abstract fun newsDao(): NewsHistoryDao
abstract fun gameDao(): GameDao
companion object {
val MIGRATION_2_3: Migration = object : Migration(2, 3) {
override fun migrate(database: SupportSQLiteDatabase) {
database.execSQL("Alter TABLE HistoryGameEntity add isLibaoExist INTEGER NOT NULL DEFAULT 0")
}
}
val MIGRATION_3_4: Migration = object : Migration(3, 4) {
override fun migrate(database: SupportSQLiteDatabase) {
database.execSQL("Alter TABLE AnswerEntity add videos TEXT NOT NULL DEFAULT ''")
database.execSQL("Alter TABLE ArticleEntity add videos TEXT NOT NULL DEFAULT ''")
}
}
val instance by lazy {
Room.databaseBuilder(HaloApp.getInstance().application, HistoryDatabase::class.java, "USER_TRACK_HISTORY_DATABASE")
.addMigrations(MIGRATION_2_3)
.addMigrations(MIGRATION_3_4)
.build()
}
}
}

View File

@ -0,0 +1,117 @@
package com.gh.common.history
import com.gh.common.runOnIoThread
import com.gh.common.util.clearHtmlFormatCompletely
import com.gh.common.util.removeInsertedContent
import com.gh.common.util.removeVideoContent
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.entity.HistoryGameEntity
import com.gh.gamecenter.entity.NewsEntity
import com.gh.gamecenter.qa.entity.AnswerDetailEntity
import com.gh.gamecenter.qa.entity.AnswerEntity
import com.gh.gamecenter.qa.entity.ArticleDetailEntity
import com.gh.gamecenter.qa.entity.ArticleEntity
object HistoryHelper {
fun insertAnswerEntity(answerDetailEntity: AnswerDetailEntity) {
val answerEntity = convertAnswerDetailToAnswer(answerDetailEntity)
runOnIoThread { HistoryDatabase.instance.answerDao().addAnswer(answerEntity) }
}
fun insertArticleEntity(articleDetailEntity: ArticleDetailEntity) {
val articleEntity = convertArticleDetailToArticle(articleDetailEntity)
runOnIoThread { HistoryDatabase.instance.articleDao().addArticle(articleEntity) }
}
fun insertGameEntity(gameEntity: GameEntity) {
val historyGameEntity = convertGameEntityToHistoryGameEntity(gameEntity)
runOnIoThread { HistoryDatabase.instance.gameDao().addGame(historyGameEntity) }
}
private fun convertGameEntityToHistoryGameEntity(gameEntity: GameEntity): HistoryGameEntity {
val historyGame = HistoryGameEntity()
historyGame.orderTag = System.currentTimeMillis()
historyGame.id = gameEntity.id
historyGame.brief = gameEntity.brief
historyGame.des = gameEntity.des
historyGame.icon = gameEntity.icon
historyGame.name = gameEntity.name
historyGame.tagStyle = gameEntity.tagStyle
historyGame.tag = gameEntity.getTag()
historyGame.isLibaoExist = gameEntity.isLibaoExists
return historyGame
}
@JvmStatic
fun insertNewsEntity(newsEntity: NewsEntity) {
newsEntity.orderTag = System.currentTimeMillis()
runOnIoThread { HistoryDatabase.instance.newsDao().addNews(newsEntity) }
}
@JvmStatic
fun deleteNewsEntity(newsId: String) {
runOnIoThread { HistoryDatabase.instance.newsDao().deleteNews(NewsEntity().apply { id = newsId }) }
}
@JvmStatic
fun deleteGameEntity(gameId: String) {
runOnIoThread { HistoryDatabase.instance.gameDao().deleteGame(HistoryGameEntity(id = gameId)) }
}
@JvmStatic
fun deleteArticleEntity(articleId: String) {
runOnIoThread { HistoryDatabase.instance.articleDao().deleteArticle(ArticleEntity(id = articleId)) }
}
@JvmStatic
fun deleteAnswerEntity(answerId: String) {
runOnIoThread { HistoryDatabase.instance.answerDao().deleteAnswer(AnswerEntity().apply { primaryKey = answerId }) }
}
@JvmStatic
fun emptyDatabase() {
runOnIoThread { HistoryDatabase.instance.clearAllTables() }
}
private fun convertArticleDetailToArticle(articleDetailEntity: ArticleDetailEntity): ArticleEntity {
val articleEntity = ArticleEntity()
articleEntity.id = articleDetailEntity.id
articleEntity.brief = articleDetailEntity.content.
removeVideoContent().
removeInsertedContent().
clearHtmlFormatCompletely().
replace(" +".toRegex()," ")
articleEntity.count = articleDetailEntity.count
articleEntity.community = articleDetailEntity.community
articleEntity.time = articleDetailEntity.time
articleEntity.title = articleDetailEntity.title
articleEntity.user = articleDetailEntity.user
articleEntity.orderTag = System.currentTimeMillis()
return articleEntity
}
private fun convertAnswerDetailToAnswer(answerDetailEntity: AnswerDetailEntity): AnswerEntity {
val answerEntity = AnswerEntity()
answerEntity.id = answerDetailEntity.id
answerEntity.primaryKey = answerDetailEntity.id
answerEntity.commentCount = answerDetailEntity.commentCount
answerEntity.questions = answerDetailEntity.question
answerEntity.vote = answerDetailEntity.vote
answerEntity.user = answerDetailEntity.user
answerEntity.orderTag = System.currentTimeMillis()
answerEntity.brief = answerDetailEntity.content.
removeVideoContent().
removeInsertedContent().
clearHtmlFormatCompletely().
replace(" +".toRegex(), " ")
answerEntity.time = answerDetailEntity.time
return answerEntity
}
}

View File

@ -1,7 +1,7 @@
package com.gh.common.im
import android.app.Activity
import android.support.v4.view.ViewCompat
import androidx.core.view.ViewCompat
import android.view.View
import android.view.ViewGroup

View File

@ -3,7 +3,7 @@ package com.gh.common.im
import android.app.Activity
import android.content.Context
import android.os.Build
import android.support.v4.view.ViewCompat
import androidx.core.view.ViewCompat
import android.util.AttributeSet
import android.util.DisplayMetrics
import android.util.TypedValue

View File

@ -5,16 +5,20 @@ import android.app.NotificationManager
import android.content.Context
import com.gh.base.CurrentActivityHolder
import com.gh.common.util.SPUtils
import com.gh.common.util.tryWithDefaultCatch
import com.gh.gamecenter.BuildConfig
import com.gh.gamecenter.MainActivity
import com.gh.gamecenter.MessageActivity
import com.gh.gamecenter.SuggestSelectActivity
import com.gh.gamecenter.manager.UserManager
import com.halo.assistant.HaloApp
import com.m7.imkfsdk.KfStartHelper
import com.m7.imkfsdk.utils.Utils
import com.moor.imkf.ChatListener
import com.moor.imkf.IMChat
import com.moor.imkf.IMChatManager
import com.moor.imkf.IMMessage
import com.moor.imkf.utils.MoorUtils
object ImManager {
@ -25,10 +29,17 @@ object ImManager {
var shouldShowFloatingWindow = false
var shouldShowFloatingWindowDot = false
// 记录当前用户 ID 避免重复初始化
var currentUserId = ""
@JvmStatic
fun attachIm() {
try {
if (UserManager.getInstance().userInfoEntity != null) {
if (UserManager.getInstance().userInfoEntity != null &&
currentUserId != UserManager.getInstance().userId) {
currentUserId = UserManager.getInstance().userId
MoorUtils.init(HaloApp.getInstance().application)
Utils.init(HaloApp.getInstance().application)
IMChatManager.getInstance().init(
HaloApp.getInstance().application,
ImReceiver.UNIQUE_BROADCAST_ACTION,
@ -67,7 +78,8 @@ object ImManager {
chatHelper.initSdkChat(
ImReceiver.UNIQUE_BROADCAST_ACTION,
IM_KEY,
UserManager.getInstance().userInfoEntity.name + "(" + UserManager.getInstance().userId + ")",
UserManager.getInstance().userInfoEntity.name + "(" + UserManager.getInstance().userId + ")"
+ "[" + BuildConfig.VERSION_NAME + "]",
UserManager.getInstance().userId)
} catch (e: Exception) {
e.printStackTrace()
@ -117,11 +129,13 @@ object ImManager {
fun sendFeedbackMessage(message: String) {
val fromToMessage = IMMessage.createTxtMessage(message)
HaloApp.getInstance().mainExecutor.execute {
IMChat.getInstance().sendMessage(fromToMessage, object : ChatListener {
override fun onProgress(p0: Int) {}
override fun onSuccess() {}
override fun onFailed() {}
})
tryWithDefaultCatch {
IMChat.getInstance().sendMessage(fromToMessage, object : ChatListener {
override fun onProgress(p0: Int) {}
override fun onSuccess() {}
override fun onFailed() {}
})
}
}
}

View File

@ -8,12 +8,12 @@ import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.os.Build
import android.support.v4.app.NotificationCompat
import androidx.core.app.NotificationCompat
import com.gh.base.CurrentActivityHolder
import com.gh.gamecenter.R
import com.m7.imkfsdk.chat.ChatActivity
import com.m7.imkfsdk.utils.Utils
import com.moor.imkf.IMChatManager
import com.moor.imkf.utils.Utils
class ImReceiver : BroadcastReceiver() {

View File

@ -1,7 +1,7 @@
package com.gh.common.notifier
import android.app.Activity
import android.support.v4.view.ViewCompat
import androidx.core.view.ViewCompat
import android.view.View
import android.view.ViewGroup
import com.gh.common.util.SPUtils

View File

@ -5,7 +5,6 @@ import android.app.Activity
import android.content.Context
import android.graphics.Path
import android.os.Build
import android.support.v4.view.ViewCompat
import android.text.TextUtils
import android.util.AttributeSet
import android.util.DisplayMetrics
@ -13,6 +12,7 @@ import android.util.Log
import android.util.TypedValue
import android.view.*
import android.widget.FrameLayout
import androidx.core.view.ViewCompat
import com.gh.common.util.ImageUtils
import com.gh.common.util.doOnEnd
import com.gh.common.util.doOnStart

View File

@ -22,7 +22,7 @@ import android.animation.Animator
import android.animation.AnimatorListenerAdapter
import android.animation.ValueAnimator
import android.os.Build
import android.support.annotation.RequiresApi
import androidx.annotation.RequiresApi
import android.view.MotionEvent
import android.view.VelocityTracker
import android.view.View

View File

@ -28,6 +28,8 @@ object RemenkapaiRepository {
* 选择随机数量的热门卡牌
*/
private fun pickRandomSizeEntity(size: Int): List<GameEntity> {
if (size > remenkapaiList.size) return remenkapaiList
val randomGameList = arrayListOf<GameEntity>()
val randomArray = RandomUtils.getRandomArray(size, remenkapaiList.size)
for (i in randomArray) {

View File

@ -0,0 +1,72 @@
package com.gh.common.repository
import android.annotation.SuppressLint
import com.gh.common.util.CheckLoginUtils
import com.gh.gamecenter.manager.UserManager
import com.gh.gamecenter.retrofit.BiResponse
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import com.lightgame.utils.Utils
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
/**
* 预约游戏仓库,存储了用户已预约的游戏列表
*/
object ReservationRepository {
private var mReservationSet = hashSetOf<String>()
@JvmStatic
fun refreshReservationsIfNeeded() {
if (mReservationSet.isEmpty()) {
refreshReservations()
}
}
fun addReservationToMemoryAndRefresh(gameId: String) {
mReservationSet.add(gameId)
refreshReservations()
}
@JvmStatic
fun removeReservationFromMemoryAndRefresh(gamedId: String) {
mReservationSet.remove(gamedId)
refreshReservations()
}
@SuppressLint("CheckResult")
@JvmStatic
fun refreshReservations() {
if (CheckLoginUtils.isLogin()) {
RetrofitManager.getInstance(HaloApp.getInstance().application).api
.getAllTheGameReservations(UserManager.getInstance().userId, Utils.getTime(HaloApp.getInstance().application))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : BiResponse<List<String>>() {
override fun onSuccess(data: List<String>) {
mReservationSet = HashSet(data)
}
})
}
}
@JvmStatic
fun clearReservations() {
mReservationSet.clear()
}
@JvmStatic
fun thisGameHasBeenReserved(gameId: String): Boolean {
return if (!CheckLoginUtils.isLogin()) false else {
if (mReservationSet.isEmpty()) {
false
} else {
mReservationSet.contains(gameId)
}
}
}
}

View File

@ -0,0 +1,41 @@
package com.gh.common.util
import com.gh.gamecenter.retrofit.Response
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import com.lightgame.utils.Util_System_Phone_State
import io.reactivex.schedulers.Schedulers
import okhttp3.ResponseBody
/**
* 激活信息辅助类
*/
object ActivationHelper {
private const val HAS_SENT_ACTIVATED_INFO = "has_sent_activated_info"
var mHasSentActivatedInfo = SPUtils.getBoolean(HAS_SENT_ACTIVATED_INFO, false)
/**
* 发送激活信息 (用于推广)
*/
@JvmStatic
fun sendActivationInfo() {
// 能获取到 IMEI 并且之前没发送过激活信息才发
if (!mHasSentActivatedInfo
&& Util_System_Phone_State.canGetImei(HaloApp.getInstance().application)) {
RetrofitManager.getInstance(HaloApp.getInstance().application)
.api.postActivationInfo()
.subscribeOn(Schedulers.io())
.subscribe(object : Response<ResponseBody>() {
override fun onResponse(response: ResponseBody?) {
super.onResponse(response)
mHasSentActivatedInfo = true
SPUtils.setBoolean(HAS_SENT_ACTIVATED_INFO, true)
}
})
}
}
}

View File

@ -17,7 +17,8 @@
package com.gh.common.util
import android.animation.Animator
import android.support.annotation.RequiresApi
import androidx.annotation.RequiresApi
import android.view.ViewPropertyAnimator
/**
* Since [Android KTX] has not release a stable build yet,
@ -125,4 +126,26 @@ fun Animator.addPauseListener(
}
addPauseListener(listener)
return listener
}
fun ViewPropertyAnimator.doOnEnd(onEnd: ((animator: Animator?) -> Unit)? = null): ViewPropertyAnimator {
val listener = object : Animator.AnimatorListener {
override fun onAnimationRepeat(animation: Animator?) {
}
override fun onAnimationEnd(animation: Animator?) {
onEnd?.invoke(animation)
}
override fun onAnimationCancel(animation: Animator?) {
}
override fun onAnimationStart(animation: Animator?) {
}
}
this.setListener(listener)
return this
}

View File

@ -1,93 +0,0 @@
package com.gh.common.util;
import android.content.Context;
import com.lightgame.utils.Utils;
import org.json.JSONObject;
import retrofit2.HttpException;
/**
* Created by khy on 28/12/17.
*/
public class AskErrorResponseUtils {
public static void errorResponseControl(Context context, HttpException e) {
if (e == null) return;
int code = e.code();
try {
if (code == 403 || code == 401) {
JSONObject object = new JSONObject(e.response().errorBody().string());
errorResponseControl(context, object);
} else {
Utils.toast(context, "网络错误");
}
} catch (Exception e1) {
e1.printStackTrace();
}
}
public static void errorResponseControl(Context context, JSONObject jsonObject) {
int errorCode = 0;
try {
errorCode = jsonObject.getInt("code");
switch (errorCode) {
case 403001:
Utils.toast(context, "标签名称太长了");
break;
case 403002:
Utils.toast(context, "已经被邀请了");
break;
case 403003:
Utils.toast(context, "每天最多可以邀请10次");
break;
case 403004:
Utils.toast(context, "客户端提供的ID无效空/无效ID");
break;
case 403005:
Utils.toast(context, "已经回答过了(限制频率)");
break;
case 403006:
Utils.toast(context, "图片数量达到限制点");
break;
case 403007:
Utils.toast(context, "不合法的用户");
break;
case 403008:
Utils.toast(context, "已投票");
break;
case 403009:
Utils.toast(context, "已经收藏过了");
break;
case 403010:
Utils.toast(context, "无效的标签栏");
break;
case 403011:
Utils.toast(context, "标题内容过长");
break;
case 403012:
Utils.toast(context, "描述内容过长");
break;
case 403013:
Utils.toast(context, "无效的标签");
break;
case 403014:
Utils.toast(context, "标签数量太多了");
break;
case 403015:
Utils.toast(context, "已经关注过了");
break;
case 404001:
Utils.toast(context, "请求的资源不存在");
break;
default:
Utils.toast(context, "网络错误");
break;
}
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@ -7,6 +7,9 @@ import android.graphics.Matrix;
import android.graphics.PixelFormat;
import android.graphics.drawable.Drawable;
import android.media.ExifInterface;
import android.os.Build;
import com.halo.assistant.HaloApp;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
@ -186,15 +189,30 @@ public class BitmapUtils {
/**
* Drawable转Bitmap
* @param isSquare 是否是正方形
*/
public static Bitmap drawableToBitmap(Drawable drawable) {
public static Bitmap drawableToBitmap(Drawable drawable, boolean isSquare) {
if (drawable == null) {
return null;
}
int w,h;
// 取 drawable 的长宽
int w = drawable.getIntrinsicWidth();
int h = drawable.getIntrinsicHeight();
w = drawable.getIntrinsicWidth();
h = drawable.getIntrinsicHeight();
// 在低于 5.1 和运行内存小于 2G 的设备上减小图片大小,避免 OOM128 * 128 又不是不能看
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP
|| DeviceUtils.getTotalRamSizeOfDevice(HaloApp.getInstance().getApplication()) < 2000) {
if (isSquare) {
w = w > 128 ? 128 : w;
h = h > 128 ? 128 : h;
} else {
w = w > 128 ? w / 2 : w;
h = h > 128 ? h / 2 : h;
}
}
// 取 drawable 的颜色格式
Bitmap.Config config = drawable.getOpacity() != PixelFormat.OPAQUE ? Bitmap.Config.ARGB_8888
: Bitmap.Config.RGB_565;

View File

@ -15,14 +15,16 @@ import com.lightgame.utils.Utils;
public class CheckLoginUtils {
public static void checkLogin(final Context context, String entrance, OnLoginListener listener) {
if (TextUtils.isEmpty(UserManager.getInstance().getToken())) {
if (!isLogin()) {
if (listener != null) Utils.toast(context, "需要登录");
LogUtils.login("dialog", null, entrance);
LogUtils.login("activity", null, entrance);
Intent intent = LoginActivity.getIntent(context, entrance);
context.startActivity(intent);
} else {
listener.onLogin();
if (listener != null) {
listener.onLogin();
}
}
}

View File

@ -1,9 +1,16 @@
package com.gh.common.util;
import android.text.TextUtils;
import androidx.annotation.Nullable;
public class ClassUtils {
@Nullable
public static Class<?> forName(String name) {
if (TextUtils.isEmpty(name)) return null;
if ("NewsActivity".equals(name)) {
name = "NewsDetailActivity";
} else if ("GameDetailsActivity".equals(name)) {

View File

@ -46,7 +46,7 @@ object CollectionUtils {
try {
val string = e.response()?.errorBody()?.string()
val errorBody = JSONObject(string)
if (errorBody.getInt("detail") == 403009) {
if (errorBody.getInt("code") == 403009) {
listener.onSuccess()
return
}

View File

@ -8,6 +8,7 @@ import com.gh.gamecenter.MessageDetailActivity
import com.gh.gamecenter.adapter.OnCommentCallBackListener
import com.gh.gamecenter.entity.CommentEntity
import com.gh.gamecenter.entity.MeEntity
import com.gh.gamecenter.entity.Permissions
import com.gh.gamecenter.retrofit.Response
import com.gh.gamecenter.retrofit.RetrofitManager
import com.lightgame.utils.Utils
@ -21,91 +22,69 @@ import retrofit2.HttpException
object CommentHelper {
// TODO 合并这两个方法的共同部分
@JvmStatic
fun showCommunityArticleCommentOptions(
context: Context,
commentEntity: CommentEntity,
showConversation: Boolean,
articleId: String,
communityId: String,
listener: OnCommentCallBackListener?) {
val dialogOptions = ArrayList<String>()
if (commentEntity.me == null || !commentEntity.me?.isAnswerCommented!!) {
dialogOptions.add("回复")
}
dialogOptions.add("复制")
dialogOptions.add("举报")
if (commentEntity.parentUser != null && showConversation) {
dialogOptions.add("查看对话")
}
DialogUtils.showListDialog(context, dialogOptions, null) {
when (it) {
"回复" -> {
context.ifLogin("社区文章详情-评论-回复") {
if (listener != null) {
listener.onCommentCallback(commentEntity)
} else if (!TextUtils.isEmpty(commentEntity.id)) {
context.startActivity(MessageDetailActivity.getMessageDetailIntent(context, commentEntity, commentEntity.id))
} else {
Utils.toast(context, "缺少关键属性")
}
}
}
"复制" -> copyText(commentEntity.content, context)
"举报" -> context.ifLogin("社区文章详情-评论-举报") {
showReportTypeDialog(context) { reportType ->
PostCommentUtils.reportCommunityArticleComment(context, communityId, articleId, commentEntity.id, reportType,
object : PostCommentUtils.PostCommentListener {
override fun postSuccess(response: JSONObject?) {
Utils.toast(context, "感谢您的举报")
}
override fun postFailed(error: Throwable?) {
if (error == null) {
Utils.toast(context, "举报失败,请稍后重试")
} else {
Utils.toast(context, "举报失败,${error.message}")
}
}
})
}
}
"查看对话" -> {
context.startActivity(CommentDetailActivity
.getCommunityArticleCommentIntent(context, articleId, commentEntity.id, communityId, null))
}
}
}
fun showCommunityArticleCommentOptions(context: Context,
commentEntity: CommentEntity,
showConversation: Boolean,
articleId: String,
communityId: String,
listener: OnCommentCallBackListener?) {
showCommentOptions(context = context,
commentEntity = commentEntity,
showConversation = showConversation,
articleId = articleId,
communityId = communityId,
listener = listener)
}
@JvmStatic
fun showAnswerCommentOptions(
context: Context,
commentEntity: CommentEntity,
showConversation: Boolean,
answerId: String,
listener: OnCommentCallBackListener?) {
fun showAnswerCommentOptions(context: Context,
commentEntity: CommentEntity,
showConversation: Boolean,
answerId: String,
listener: OnCommentCallBackListener?) {
showCommentOptions(context = context,
commentEntity = commentEntity,
showConversation = showConversation,
answerId = answerId,
listener = listener)
}
@JvmStatic
fun showVideoCommentOptions(context: Context,
commentEntity: CommentEntity,
showConversation: Boolean,
videoId: String,
listener: OnCommentCallBackListener?) {
showCommentOptions(context = context,
commentEntity = commentEntity,
showConversation = showConversation,
videoId = videoId,
listener = listener)
}
private fun showCommentOptions(context: Context,
commentEntity: CommentEntity,
showConversation: Boolean,
articleId: String? = null,
communityId: String? = null,
answerId: String? = null,
videoId: String? = null,
listener: OnCommentCallBackListener? = null) {
val dialogOptions = ArrayList<String>()
if (commentEntity.me == null || !commentEntity.me?.isAnswerCommented!!) {
if (commentEntity.me == null || !commentEntity.me?.isCommentOwner!!) {
dialogOptions.add("回复")
}
dialogOptions.add("复制")
dialogOptions.add("举报")
dialogOptions.add("投诉")
commentEntity.me?.let {
if (it.isModerator && (
it.moderatorPermissions.contains(MeEntity.HIDE_ANSWER_COMMENT)
|| it.moderatorPermissions.contains(MeEntity.TOP_ANSWER_COMMENT))) {
if (it.isModerator || (it.moderatorPermissions.hideAnswerComment > Permissions.GUEST
|| it.moderatorPermissions.topAnswerComment > Permissions.GUEST
|| it.moderatorPermissions.hideCommunityArticleComment > Permissions.GUEST
|| it.moderatorPermissions.topCommunityArticleComment > Permissions.GUEST)) {
dialogOptions.add("管理")
}
}
@ -116,7 +95,7 @@ object CommentHelper {
DialogUtils.showListDialog(context, dialogOptions, null) {
when (it) {
"管理" -> showControlDialog(context, answerId, commentEntity, commentEntity.me!!)
"管理" -> showControlDialog(context, answerId, articleId, communityId, commentEntity, commentEntity.me!!)
"回复" -> {
context.ifLogin("回答详情-评论-回复") {
@ -132,58 +111,102 @@ object CommentHelper {
"复制" -> copyText(commentEntity.content, context)
"举报" -> context.ifLogin("回答详情-评论-举报") {
showReportTypeDialog(context) { reportType ->
PostCommentUtils.postAnswerReportData(context, commentEntity.id, answerId, reportType,
object : PostCommentUtils.PostCommentListener {
override fun postSuccess(response: JSONObject?) {
Utils.toast(context, "感谢您的举报")
}
"投诉" -> {
context.ifLogin("回答详情-评论-投诉") {
showReportTypeDialog(context) { reportType ->
override fun postFailed(error: Throwable?) {
if (error == null) {
Utils.toast(context, "举报失败,请稍后重试")
} else {
Utils.toast(context, "举报失败,${error.message}")
}
val commentListener = object : PostCommentUtils.PostCommentListener {
override fun postSuccess(response: JSONObject?) {
Utils.toast(context, "感谢您的投诉")
}
override fun postFailed(error: Throwable?) {
if (error == null) {
Utils.toast(context, "投诉失败,请稍后重试")
} else {
Utils.toast(context, "投诉失败,${error.message}")
}
})
}
}
if (answerId != null) {
PostCommentUtils.postAnswerReportData(context, commentEntity.id, answerId, reportType, commentListener)
} else if (articleId != null) {
PostCommentUtils.reportCommunityArticleComment(context, communityId, articleId, commentEntity.id, reportType, commentListener)
} else {
PostCommentUtils.reportVideoComment(context, videoId, commentEntity.id, reportType, commentListener)
}
}
}
}
"查看对话" -> {
context.startActivity(CommentDetailActivity
.getAnswerCommentIntent(context, commentEntity.id, answerId, null))
if (answerId != null) {
context.startActivity(CommentDetailActivity
.getAnswerCommentIntent(context, commentEntity.id, answerId, null))
} else if (articleId != null) {
context.startActivity(CommentDetailActivity
.getCommunityArticleCommentIntent(context, articleId, commentEntity.id, communityId, null))
} else {
context.startActivity(CommentDetailActivity
.getVideoCommentIntent(context, commentEntity.id, videoId, null))
}
}
}
}
}
private fun showControlDialog(context: Context, answerId: String, comment: CommentEntity, me: MeEntity) {
private fun showControlDialog(context: Context,
answerId: String? = null,
articleId: String? = null,
communityId: String? = null,
comment: CommentEntity,
me: MeEntity) {
val dialogOptions = arrayListOf<String>()
val highlight = "置顶评论"
val hide = "隐藏评论"
if (me.moderatorPermissions.contains(MeEntity.TOP_ANSWER_COMMENT)) {
var canHighlightCommentDirectly = false
var canHideCommentDirectly = false
if (me.moderatorPermissions.topAnswerComment > Permissions.GUEST
|| me.moderatorPermissions.topCommunityArticleComment > Permissions.GUEST) {
dialogOptions.add(highlight)
if (me.moderatorPermissions.topAnswerComment > Permissions.REPORTER
|| me.moderatorPermissions.topCommunityArticleComment > Permissions.REPORTER) {
canHighlightCommentDirectly = true
}
}
if (me.moderatorPermissions.contains(MeEntity.HIDE_ANSWER_COMMENT)) {
if (me.moderatorPermissions.hideAnswerComment > Permissions.GUEST
|| me.moderatorPermissions.hideCommunityArticleComment > Permissions.GUEST) {
dialogOptions.add(hide)
if (me.moderatorPermissions.hideAnswerComment > Permissions.REPORTER
|| me.moderatorPermissions.hideCommunityArticleComment > Permissions.REPORTER) {
canHideCommentDirectly = true
}
}
val content = if (me.moderatorLevel == MeEntity.MODERATOR_LEVEL_PRIMARY) {
"你的操作将提交给小编审核,确定提交吗?"
} else {
val highlightDialogHintContent = if (canHighlightCommentDirectly) {
"你的操作将立即生效,确定提交吗?(你的管理权限为:高级)"
} else {
"你的操作将提交给小编审核,确定提交吗?"
}
val hideDialogHintContent = if (canHideCommentDirectly) {
"你的操作将立即生效,确定提交吗?(你的管理权限为:高级)"
} else {
"你的操作将提交给小编审核,确定提交吗?"
}
val disabledOptions = arrayListOf<String>()
if (comment.priority != 0) {
disabledOptions.add(highlight)
}
comment.me?.let {
if (it.isAnswerCommented) {
if (it.isCommentOwner) {
disabledOptions.add(highlight)
}
}
@ -191,90 +214,113 @@ object CommentHelper {
DialogUtils.showListDialog(context, dialogOptions, disabledOptions) {
when (it) {
highlight -> {
if (comment.priority != 0) {
Utils.toast(context, "评论已经置顶")
return@showListDialog
}
comment.me?.let { me ->
if (me.isAnswerCommented) {
if (me.isCommentOwner) {
Utils.toast(context, "不能置顶自己的评论")
return@showListDialog
}
}
DialogUtils.showAlertDialog(context, highlight, content,
"确定", "取消",
{
RetrofitManager.getInstance(context).api
.highlightAnswerComment(answerId, comment.id)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe(object : Response<ResponseBody>() {
override fun onResponse(response: ResponseBody?) {
if (me.moderatorLevel == MeEntity.MODERATOR_LEVEL_PRIMARY) {
Utils.toast(context, "提交成功")
} else {
Utils.toast(context, "置顶成功,请刷新列表")
}
}
val highlightObserver = object : Response<ResponseBody>() {
override fun onResponse(response: ResponseBody?) {
if (canHighlightCommentDirectly) {
Utils.toast(context, "置顶成功,请刷新列表")
} else {
Utils.toast(context, "提交成功")
}
}
override fun onFailure(e: HttpException?) {
super.onFailure(e)
e?.let { httpException ->
if (httpException.code() == 403) {
val string = e.response().errorBody()?.string()
val errorJson = JSONObject(string)
val errorCode = errorJson.getInt("code")
if (errorCode == 403059) {
Utils.toast(getApplication(), "权限错误,请刷新后重试")
return
} else {
Utils.toast(getApplication(), e.message())
}
}
}
}
})
}, null)
override fun onFailure(e: HttpException?) {
super.onFailure(e)
e?.let { httpException ->
if (httpException.code() == 403) {
val string = e.response().errorBody()?.string()
val errorJson = JSONObject(string)
val errorCode = errorJson.getInt("code")
if (errorCode == 403059) {
Utils.toast(getApplication(), "权限错误,请刷新后重试")
return
} else {
Utils.toast(getApplication(), e.message())
}
}
}
}
}
if (answerId != null) {
DialogUtils.showAlertDialog(context, highlight, highlightDialogHintContent,
"确定", "取消", {
RetrofitManager.getInstance(context).api
.highlightAnswerComment(answerId, comment.id)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe(highlightObserver)
}, null)
} else {
DialogUtils.showAlertDialog(context, highlight, highlightDialogHintContent,
"确定", "取消", {
RetrofitManager.getInstance(context).api
.highlightCommunityArticleComment(communityId, articleId, comment.id)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe(highlightObserver)
}, null)
}
}
hide -> {
DialogUtils.showAlertDialog(context, hide, content,
"确定", "取消",
{
RetrofitManager.getInstance(context).api
.hideAnswerComment(answerId, comment.id)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe(object : Response<ResponseBody>() {
override fun onResponse(response: ResponseBody?) {
if (me.moderatorLevel == MeEntity.MODERATOR_LEVEL_PRIMARY) {
Utils.toast(context, "提交成功")
} else {
Utils.toast(context, "隐藏成功,请刷新列表")
}
}
val hideObserver = object : Response<ResponseBody>() {
override fun onResponse(response: ResponseBody?) {
if (canHideCommentDirectly) {
Utils.toast(context, "隐藏成功,请刷新列表")
} else {
Utils.toast(context, "提交成功")
}
}
override fun onFailure(e: HttpException?) {
super.onFailure(e)
e?.let { httpException ->
if (httpException.code() == 403) {
val string = e.response().errorBody()?.string()
val errorJson = JSONObject(string)
val errorCode = errorJson.getInt("code")
if (errorCode == 403059) {
Utils.toast(getApplication(), "权限错误,请刷新后重试")
return
} else {
Utils.toast(getApplication(), e.message())
}
}
}
}
})
}, null)
override fun onFailure(e: HttpException?) {
super.onFailure(e)
e?.let { httpException ->
if (httpException.code() == 403) {
val string = e.response().errorBody()?.string()
val errorJson = JSONObject(string)
val errorCode = errorJson.getInt("code")
if (errorCode == 403059) {
Utils.toast(getApplication(), "权限错误,请刷新后重试")
return
} else {
Utils.toast(getApplication(), e.message())
}
}
}
}
}
if (answerId != null) {
DialogUtils.showAlertDialog(context, hide, hideDialogHintContent,
"确定", "取消", {
RetrofitManager.getInstance(context).api
.hideAnswerComment(answerId, comment.id)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe(hideObserver)
}, null)
} else {
DialogUtils.showAlertDialog(context, hide, hideDialogHintContent,
"确定", "取消", {
RetrofitManager.getInstance(context).api
.hideCommunityArticleComment(communityId, articleId, comment.id)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe(hideObserver)
}, null)
}
}
}
}

View File

@ -1,11 +1,10 @@
package com.gh.common.util;
import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.ClipboardManager;
import android.content.Context;
import android.graphics.Color;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.text.TextUtils;
import android.view.View;
import android.view.Window;
@ -20,16 +19,19 @@ import com.gh.gamecenter.adapter.OnCommentCallBackListener;
import com.gh.gamecenter.adapter.viewholder.CommentViewHolder;
import com.gh.gamecenter.entity.CommentEntity;
import com.gh.gamecenter.entity.MeEntity;
import com.gh.gamecenter.entity.RatingComment;
import com.gh.gamecenter.entity.UserInfoEntity;
import com.gh.gamecenter.manager.UserManager;
import com.gh.gamecenter.retrofit.Response;
import com.gh.gamecenter.retrofit.BiResponse;
import com.gh.gamecenter.retrofit.RetrofitManager;
import com.halo.assistant.HaloApp;
import com.lightgame.utils.Utils;
import org.jetbrains.annotations.NotNull;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@ -37,10 +39,9 @@ import java.util.Date;
import java.util.List;
import java.util.Locale;
import androidx.core.content.ContextCompat;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
import okhttp3.MediaType;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.HttpException;
@ -80,111 +81,6 @@ public class CommentUtils {
}
}
public static void showGameCommentOptions(final Context context,
final RatingComment comment,
final String gameId,
final String entrance) {
final Dialog dialog = new Dialog(context);
LinearLayout container = new LinearLayout(context);
container.setOrientation(LinearLayout.VERTICAL);
container.setBackgroundColor(Color.WHITE);
container.setPadding(0, DisplayUtils.dip2px(context, 12), 0, DisplayUtils.dip2px(context, 12));
List<String> dialogType = new ArrayList<>();
dialogType.add("复制");
dialogType.add("举报");
for (String s : dialogType) {
final TextView reportTv = new TextView(context);
reportTv.setText(s);
reportTv.setTextSize(17);
reportTv.setTextColor(ContextCompat.getColor(context, R.color.title));
reportTv.setBackgroundResource(R.drawable.textview_white_style);
int widthPixels = context.getResources().getDisplayMetrics().widthPixels;
reportTv.setLayoutParams(new LinearLayout.LayoutParams((widthPixels * 9) / 10,
LinearLayout.LayoutParams.WRAP_CONTENT));
reportTv.setPadding(DisplayUtils.dip2px(context, 20), DisplayUtils.dip2px(context, 12),
0, DisplayUtils.dip2px(context, 12));
container.addView(reportTv);
reportTv.setOnClickListener(v -> {
dialog.cancel();
switch (reportTv.getText().toString()) {
case "复制":
copyText(comment.getContent(), context);
break;
case "举报":
CheckLoginUtils.checkLogin(context, entrance, () -> showGameCommentReportDialog(gameId, comment, context));
break;
}
});
}
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(container);
dialog.show();
}
private static void showGameCommentReportDialog(final String gameId, final RatingComment comment, final Context context) {
final String[] arrReportType = new String[]{"垃圾广告营销", "恶意攻击谩骂", "淫秽色情信息",
"违法有害信息", "其它"};
int widthPixels = context.getResources().getDisplayMetrics().widthPixels;
final Dialog reportTypeDialog = new Dialog(context);
LinearLayout container = new LinearLayout(context);
container.setOrientation(LinearLayout.VERTICAL);
container.setPadding(0, DisplayUtils.dip2px(context, 12), 0, DisplayUtils.dip2px(context, 12));
container.setBackgroundColor(Color.WHITE);
for (final String s : arrReportType) {
TextView reportTypeTv = new TextView(context);
reportTypeTv.setText(s);
reportTypeTv.setTextSize(17);
reportTypeTv.setTextColor(ContextCompat.getColor(context, R.color.title));
reportTypeTv.setBackgroundResource(R.drawable.textview_white_style);
reportTypeTv.setLayoutParams(new LinearLayout.LayoutParams((widthPixels * 9) / 10,
LinearLayout.LayoutParams.WRAP_CONTENT));
reportTypeTv.setPadding(DisplayUtils.dip2px(context, 20), DisplayUtils.dip2px(context, 12),
0, DisplayUtils.dip2px(context, 12));
container.addView(reportTypeTv);
reportTypeTv.setOnClickListener(v -> {
JSONObject jsonObject = new JSONObject();
try {
jsonObject.put("reason", s);
} catch (JSONException e) {
e.printStackTrace();
}
RequestBody body = RequestBody.create(MediaType.parse("application/json"), jsonObject.toString());
RetrofitManager.getInstance(context).getApi()
.reportGameComment(gameId, comment.getId(), body)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Response<ResponseBody>() {
@Override
public void onResponse(@Nullable ResponseBody response) {
Utils.toast(context, "感谢您的举报");
}
@Override
public void onFailure(@Nullable HttpException e) {
Utils.toast(context, "举报失败,请先检查网络设置");
}
});
reportTypeDialog.cancel();
});
}
reportTypeDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
reportTypeDialog.setContentView(container);
reportTypeDialog.show();
}
public static void showReportDialog(final CommentEntity commentEntity,
final Context context,
@ -201,12 +97,12 @@ public class CommentUtils {
List<String> dialogType = new ArrayList<>();
if (commentEntity.getMe() == null || !commentEntity.getMe().isCommentOwn()) {
if (commentEntity.getMe() == null || !commentEntity.getMe().isCommentOwner()) {
dialogType.add("回复");
}
dialogType.add("复制");
dialogType.add("举报");
dialogType.add("投诉");
if (commentEntity.getParent() != null && showConversation) {
dialogType.add("查看对话");
@ -244,8 +140,8 @@ public class CommentUtils {
case "复制":
copyText(commentEntity.getContent(), context);
break;
case "举报":
CheckLoginUtils.checkLogin(context, patch + "-举报",
case "投诉":
CheckLoginUtils.checkLogin(context, patch + "-投诉",
() -> showReportTypeDialog(commentEntity, context));
break;
@ -263,135 +159,6 @@ public class CommentUtils {
}
// public static void showAnswerCommentOptions(final CommentEntity commentEntity, final Context context,
// final OnCommentCallBackListener listener, final String id,
// boolean showConversation, String answerId, String articleId, String articleCommunityId) {
//
// final Dialog dialog = new Dialog(context);
//
// LinearLayout container = new LinearLayout(context);
// container.setOrientation(LinearLayout.VERTICAL);
// container.setBackgroundColor(Color.WHITE);
// container.setPadding(0, DisplayUtils.dip2px(context, 12), 0, DisplayUtils.dip2px(context, 12));
//
// List<String> dialogType = new ArrayList<>();
//
// if (commentEntity.getMe() == null || !commentEntity.getMe().isAnswerCommented()) {
// dialogType.add("回复");
// }
//
// dialogType.add("复制");
// dialogType.add("举报");
//
// if (commentEntity.getParentUser() != null && showConversation) {
// dialogType.add("查看对话");
// }
//
// for (String s : dialogType) {
// final TextView reportTv = new TextView(context);
// reportTv.setText(s);
// reportTv.setTextSize(17);
// reportTv.setTextColor(ContextCompat.getColor(context, R.color.title));
// reportTv.setBackgroundResource(R.drawable.textview_white_style);
// int widthPixels = context.getResources().getDisplayMetrics().widthPixels;
// reportTv.setLayoutParams(new LinearLayout.LayoutParams((widthPixels * 9) / 10,
// LinearLayout.LayoutParams.WRAP_CONTENT));
// reportTv.setPadding(DisplayUtils.dip2px(context, 20), DisplayUtils.dip2px(context, 12),
// 0, DisplayUtils.dip2px(context, 12));
// container.addView(reportTv);
//
// reportTv.setOnClickListener(v -> {
// dialog.cancel();
// switch (reportTv.getText().toString()) {
// case "回复":
// CheckLoginUtils.checkLogin(context, () -> {
// if (listener != null) {
// listener.onCommentCallback(commentEntity);
// } else if (!TextUtils.isEmpty(id)) {
// context.startActivity(MessageDetailActivity.getMessageDetailIntent(context, commentEntity, id));
// } else {
// Utils.toast(context, "缺少关键属性");
// }
// });
// break;
// case "复制":
// copyText(commentEntity.getContent(), context);
// break;
// case "举报":
// CheckLoginUtils.checkLogin(context, () -> showAnswerReportDialog(answerId, commentEntity, context));
// break;
// case "查看对话":
// if (TextUtils.isEmpty(articleId)) {
// context.startActivity(CommentDetailActivity.getAnswerCommentIntent(context, commentEntity.getId(), answerId, null));
// } else {
// context.startActivity(CommentDetailActivity.getCommunityArticleCommentIntent(context, articleId, commentEntity.getId(), articleCommunityId, null));
// }
// break;
// }
// });
// }
//
// dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
// dialog.setContentView(container);
// dialog.show();
// }
// private static void showAnswerReportDialog(final String answerId, final CommentEntity commentEntity, final Context context) {
// final String[] arrReportType = new String[]{"垃圾广告营销", "恶意攻击谩骂", "淫秽色情信息",
// "违法有害信息", "其它"};
// int widthPixels = context.getResources().getDisplayMetrics().widthPixels;
//
// final Dialog reportTypeDialog = new Dialog(context);
// LinearLayout container = new LinearLayout(context);
// container.setOrientation(LinearLayout.VERTICAL);
// container.setPadding(0, DisplayUtils.dip2px(context, 12), 0, DisplayUtils.dip2px(context, 12));
// container.setBackgroundColor(Color.WHITE);
//
// for (final String s : arrReportType) {
// TextView reportTypeTv = new TextView(context);
// reportTypeTv.setText(s);
// reportTypeTv.setTextSize(17);
// reportTypeTv.setTextColor(ContextCompat.getColor(context, R.color.title));
// reportTypeTv.setBackgroundResource(R.drawable.textview_white_style);
// reportTypeTv.setLayoutParams(new LinearLayout.LayoutParams((widthPixels * 9) / 10,
// LinearLayout.LayoutParams.WRAP_CONTENT));
// reportTypeTv.setPadding(DisplayUtils.dip2px(context, 20), DisplayUtils.dip2px(context, 12),
// 0, DisplayUtils.dip2px(context, 12));
// container.addView(reportTypeTv);
//
// reportTypeTv.setOnClickListener(v -> {
// JSONObject jsonObject = new JSONObject();
// try {
// jsonObject.put("reason", s);
// } catch (JSONException e) {
// e.printStackTrace();
// }
//
// PostCommentUtils.postAnswerReportData(context, commentEntity.getId(), answerId, jsonObject.toString(),
// new PostCommentUtils.PostCommentListener() {
// @Override
// public void postSuccess(JSONObject response) {
// Utils.toast(context, "感谢您的举报");
// }
//
// @Override
// public void postFailed(Throwable error) {
// if (error != null) {
// Utils.toast(context, "举报失败" + error.getMessage());
// } else {
// Utils.toast(context, "举报失败,请稍候重试");
// }
// }
// });
// reportTypeDialog.cancel();
// });
// }
//
// reportTypeDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
// reportTypeDialog.setContentView(container);
// reportTypeDialog.show();
// }
private static void showReportTypeDialog(final CommentEntity commentEntity, final Context context) {
final String[] arrReportType = new String[]{"垃圾广告营销", "恶意攻击谩骂", "淫秽色情信息",
"违法有害信息", "其它"};
@ -430,12 +197,12 @@ public class CommentUtils {
new PostCommentUtils.PostCommentListener() {
@Override
public void postSuccess(JSONObject response) {
Utils.toast(context, "感谢您的举报");
Utils.toast(context, "感谢您的投诉");
}
@Override
public void postFailed(Throwable error) {
Utils.toast(context, "举报失败,请检查网络设置");
Utils.toast(context, "投诉失败,请检查网络设置");
}
});
reportTypeDialog.cancel();
@ -458,7 +225,7 @@ public class CommentUtils {
commentEntity.setVote(commentEntity.getVote() + 1);
commentLikeCountTv.setTextColor(ContextCompat.getColor(context, R.color.theme));
commentLikeIv.setImageResource(R.drawable.vote_icon_select);
commentLikeCountTv.setText(String.valueOf(commentEntity.getVote()));
commentLikeCountTv.setText(NumberUtils.transSimpleCount(commentEntity.getVote()));
commentLikeCountTv.setVisibility(View.VISIBLE);
PostCommentUtils.addCommentVote(context, commentEntity.getId(),
@ -476,7 +243,7 @@ public class CommentUtils {
commentEntity.setVote(commentEntity.getVote() - 1);
commentLikeCountTv.setTextColor(ContextCompat.getColor(context, R.color.hint));
commentLikeIv.setImageResource(R.drawable.vote_icon_unselect);
commentLikeCountTv.setText(String.valueOf(commentEntity.getVote()));
commentLikeCountTv.setText(NumberUtils.transSimpleCount(commentEntity.getVote()));
if (commentEntity.getVote() == 0) {
commentLikeCountTv.setVisibility(View.GONE);
} else {
@ -502,9 +269,15 @@ public class CommentUtils {
});
}
public static void postVoteToAnswerComment(final Context context, String answerId, String articleId,
String articleCommunityId, final CommentEntity commentEntity,
final TextView commentLikeCountTv, final ImageView commentLikeIv, final OnVoteListener listener) {
public static void likeComment(final Context context,
String answerId,
String articleId,
String articleCommunityId,
String videoId,
final CommentEntity commentEntity,
final TextView commentLikeCountTv,
final ImageView commentLikeIv,
final OnVoteListener listener) {
String entrance = "回答详情-评论-点赞";
if (TextUtils.isEmpty(articleId)) {
@ -518,10 +291,10 @@ public class CommentUtils {
commentEntity.setVote(commentEntity.getVote() + 1);
commentLikeCountTv.setTextColor(ContextCompat.getColor(context, R.color.theme));
commentLikeIv.setImageResource(R.drawable.vote_icon_select);
commentLikeCountTv.setText(String.valueOf(commentEntity.getVote()));
commentLikeCountTv.setText(NumberUtils.transSimpleCount(commentEntity.getVote()));
commentLikeCountTv.setVisibility(View.VISIBLE);
PostCommentUtils.voteAnswerComment(context, answerId, articleId, articleCommunityId, commentEntity.getId(),
PostCommentUtils.likeComment(context, answerId, articleId, articleCommunityId, videoId, commentEntity.getId(),
new PostCommentUtils.PostCommentListener() {
@Override
public void postSuccess(JSONObject response) {
@ -532,11 +305,10 @@ public class CommentUtils {
@Override
public void postFailed(Throwable e) {
commentEntity.setVote(commentEntity.getVote() - 1);
commentLikeCountTv.setTextColor(ContextCompat.getColor(context, R.color.hint));
commentLikeIv.setImageResource(R.drawable.vote_icon_unselect);
commentLikeCountTv.setText(String.valueOf(commentEntity.getVote()));
commentLikeCountTv.setText(NumberUtils.transSimpleCount(commentEntity.getVote()));
if (commentEntity.getVote() == 0) {
commentLikeCountTv.setVisibility(View.GONE);
} else {
@ -573,7 +345,7 @@ public class CommentUtils {
if (entity.getVote() == 0) {
holder.commentLikeCountTv.setVisibility(View.GONE);
} else { // 检查是否已点赞
if (userDataEntity != null && (userDataEntity.isCommentVoted() || userDataEntity.isAnswerCommentVoted())) {
if (userDataEntity != null && (userDataEntity.isCommentVoted())) {
holder.commentLikeCountTv.setTextColor(ContextCompat.getColor(mContext, R.color.theme));
holder.commentLikeIv.setImageResource(R.drawable.vote_icon_select);
}
@ -581,10 +353,20 @@ public class CommentUtils {
holder.commentLikeCountTv.setText(NumberUtils.transSimpleCount(entity.getVote()));
}
if (entity.getUser().getBadge() != null) {
holder.userBadgeSdv.setVisibility(View.VISIBLE);
holder.badgeNameTv.setVisibility(View.VISIBLE);
ImageUtils.display(holder.userBadgeSdv, entity.getUser().getBadge().getIcon());
holder.badgeNameTv.setText(entity.getUser().getBadge().getName());
} else {
holder.userBadgeSdv.setVisibility(View.GONE);
holder.badgeNameTv.setVisibility(View.GONE);
}
//检查是否是自身评论
UserInfoEntity userInfo = UserManager.getInstance().getUserInfoEntity();
if (userDataEntity != null && userDataEntity.isCommentOwn() && userInfo != null) {
if (entity.getMe() != null && entity.getMe().isAnswerOwn()) {
if (userDataEntity != null && userDataEntity.isCommentOwner() && userInfo != null) {
if (entity.getMe() != null && entity.getMe().isContentOwner()) {
holder.commentUserNameTv.setText(userInfo.getName() + "(作者)");
} else {
holder.commentUserNameTv.setText(userInfo.getName());
@ -596,7 +378,7 @@ public class CommentUtils {
}
ImageUtils.displayIcon(holder.commentUserIconDv, userInfo.getIcon());
} else {
if (entity.getMe() != null && entity.getMe().isAnswerOwn()) {
if (entity.getMe() != null && entity.getMe().isContentOwner()) {
holder.commentUserNameTv.setText(entity.getUser().getName() + "(作者)");
} else {
holder.commentUserNameTv.setText(entity.getUser().getName());
@ -614,6 +396,36 @@ public class CommentUtils {
}
}
@SuppressLint("CheckResult")
public static void isUserCommentedOnThisGame(String gameId, WeakReference<SimpleCallback<Boolean>> callback) {
RetrofitManager.getInstance(HaloApp.getInstance().getApplication())
.getApi()
.isUserCommentedOnThisGame(UserManager.getInstance().getUserId(), gameId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new BiResponse<ResponseBody>() {
@Override
public void onSuccess(ResponseBody data) {
SimpleCallback<Boolean> cb = callback.get();
if (cb != null) {
try {
JSONObject object = new JSONObject(data.string());
cb.onCallback(object.getBoolean("status"));
} catch (JSONException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
@Override
public void onFailure(@NotNull Exception exception) {
Utils.toast(HaloApp.getInstance().getApplication(), "网络异常");
}
});
}
//复制文字
public static void copyText(String copyContent, Context context) {
ClipboardManager cmb = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);

View File

@ -1,45 +1,47 @@
package com.gh.common.util
import com.gh.gamecenter.qa.entity.AskGameSelectEntity
import com.gh.gamecenter.retrofit.Response
import com.gh.gamecenter.retrofit.RetrofitManager
import com.halo.assistant.HaloApp
import io.reactivex.schedulers.Schedulers
import com.gh.gamecenter.packagehelper.PackageRepository
import com.gh.gamecenter.qa.entity.CommunitySelectEntity
/**
* 用于判断社区跳转前社区是否可用
*/
object CommunityHelper {
private var availableCommunityList = listOf<AskGameSelectEntity>()
/**
* 为已开通的社区排序
* 排序规则为将本地存在已安装游戏或已关联游戏的社区置顶
*/
fun sortOpenedCommunity(rawList: List<CommunitySelectEntity>?): ArrayList<CommunitySelectEntity> {
val sortedList = ArrayList<CommunitySelectEntity>()
rawList?.let {
for (game in rawList) {
var thisGameIsInstalled = false
for (installGame in PackageRepository.gameInstalled) {
if (PackageHelper.downloadPackageNameBlackList.contains(installGame.packageName)) {
continue
}
@JvmStatic
fun getAvailableCommunityList() {
RetrofitManager.getInstance(HaloApp.getInstance().application).api
.getAskGameSelect(HaloApp.getInstance().channel
, UrlFilterUtils.getFilterQuery("status", "opened"), 1, 100)
.subscribeOn(Schedulers.io())
.subscribe(object : Response<List<AskGameSelectEntity>>() {
override fun onResponse(response: List<AskGameSelectEntity>?) {
if (response != null && response.isNotEmpty()) {
availableCommunityList = response
// 判断是否已安装
if (installGame.id == game.game.id) {
thisGameIsInstalled = true
break
}
// 判断是否关联了别游戏
for (relatedGameId in game.game.relation) {
if (installGame.id == relatedGameId) {
thisGameIsInstalled = true
break
}
}
})
}
}
@JvmStatic
fun isCommunityAvailable(communityId: String?): Boolean {
communityId?.let {
if (availableCommunityList.isEmpty()) return true
for (entity in availableCommunityList) {
if (communityId == entity.id) {
return true
// 将已安装的置顶
if (thisGameIsInstalled) {
sortedList.add(0, game)
} else {
sortedList.add(game)
}
}
}
return false
return sortedList
}
}

View File

@ -29,12 +29,12 @@ object CompressImageUtils {
*/
@Throws(Exception::class)
fun compressImageAndSaveToFile(imageFile: File, compressGif: Boolean): File {
// 小于300K直接返回原图
// 小于某一个设定的值时,直接返回原图
if (imageFile.length() < getImageSetting().processLimitSize) {
return imageFile
}
val cacheDir = getImageCacheDir()
val cacheDir = getImageCachePatch()
val parentFile = cacheDir.parentFile
if (!parentFile.exists()) parentFile.mkdirs()
var fileOutputStream: FileOutputStream? = null
@ -55,6 +55,10 @@ object CompressImageUtils {
fileOutputStream = FileOutputStream(cacheDir)
// write the compressed bitmap at the destination specified by destinationPath.
decodeSampledBitmapFromFile(imageFile).compress(formatType, getImageSetting().quality, fileOutputStream)
if (cacheDir.length() == 0L) {
return imageFile //预防压缩失败
}
return cacheDir
} catch (e: Exception) {
e.printStackTrace()
@ -70,7 +74,7 @@ object CompressImageUtils {
return imageFile
}
private fun getImageCacheDir(): File {
private fun getImageCachePatch(): File {
// return File(Environment.getExternalStorageDirectory().absolutePath + "/Pictures/test/" + System.currentTimeMillis() + ".jpg")
// 统一用jpg保存应该没有影响吧
return File(HaloApp.getInstance().application.cacheDir.absolutePath + File.separator + System.currentTimeMillis() + ".jpg")
@ -103,7 +107,6 @@ object CompressImageUtils {
} else {
inSampleSize = if (longSide / compressLimit == 0) 1 else longSide / compressLimit
compressType = CompressType.LIMIT_LONG // 纵向长方形
}
} else if (longSide > compressLimit && shortSide < compressLimit) {
if (scale <= getImageSetting().ratio) {
@ -136,14 +139,18 @@ object CompressImageUtils {
}
}
matrix.setScale(targetMatrixScale, targetMatrixScale)
scaledBitmap = Bitmap.createBitmap(scaledBitmap, 0, 0, scaledBitmap.width, scaledBitmap.height, matrix, true)
try {
scaledBitmap = Bitmap.createBitmap(scaledBitmap, 0, 0, scaledBitmap.width, scaledBitmap.height, matrix, true)
} catch (ignore: OutOfMemoryError) {
}
}
return scaledBitmap
}
fun getImageSetting(): SettingsEntity.Image {
private fun getImageSetting(): SettingsEntity.Image {
val settings = Config.getSettings()
if (settings == null && settings?.image != null) {
if (settings?.image != null) {
return settings.image!!
}
val image = SettingsEntity.Image()

View File

@ -2,7 +2,6 @@ package com.gh.common.util;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.LinearLayout;
import com.facebook.drawee.drawable.ScalingUtils;
@ -93,12 +92,9 @@ public class ConcernContentUtils {
ScalingUtils.ScaleType.CENTER_CROP, list.get(position));
break;
}
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent checkIntent = ViewImageActivity.getViewImageIntent(context, (ArrayList<String>) list, position, entrance);
context.startActivity(checkIntent);
}
imageView.setOnClickListener(v -> {
Intent checkIntent = ViewImageActivity.getViewImageIntent(context, (ArrayList<String>) list, position, entrance);
context.startActivity(checkIntent);
});
return imageView;
}

View File

@ -1,6 +1,7 @@
package com.gh.common.util
import android.content.Context
import android.text.TextUtils
import com.gh.gamecenter.eventbus.EBConcernChanged
import com.gh.gamecenter.manager.UserManager
import com.gh.gamecenter.retrofit.Response
@ -20,9 +21,17 @@ import retrofit2.HttpException
*/
object ConcernUtils {
fun postConcernGameId(context: Context, gameId: String, listener: onConcernListener?) {
RetrofitManager.getInstance(context).getApi()
.postConcern(UserManager.getInstance().userId, gameId)
/**
* autoConcern:是否自动关注'关联关注'
*/
fun postConcernGameId(context: Context, gameId: String, listener: onConcernListener?, autoConcern: Boolean = false) {
val mode = if (autoConcern) "auto" else "manual"
val userId = UserManager.getInstance().userId
if (TextUtils.isEmpty(userId)) return
RetrofitManager.getInstance(context).api
.postConcern(UserManager.getInstance().userId, gameId, mode)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : Response<ResponseBody>() {
@ -40,7 +49,7 @@ object ConcernUtils {
}
fun deleteConcernData(context: Context, gameId: String, listener: onConcernListener?) {
RetrofitManager.getInstance(context).getApi()
RetrofitManager.getInstance(context).api
.deleteConcern(UserManager.getInstance().userId, gameId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
@ -61,7 +70,7 @@ object ConcernUtils {
fun updateConcernData(context: Context, data: JSONArray) {
val body = RequestBody.create(MediaType.parse("application/json"),
data.toString())
RetrofitManager.getInstance(context).getApi()
RetrofitManager.getInstance(context).api
.putConcern(UserManager.getInstance().userId, body)
.subscribeOn(Schedulers.io())
.observeOn(Schedulers.io())
@ -73,7 +82,7 @@ object ConcernUtils {
}
fun deleteConcernQuestions(context: Context, questionsId: String, listener: onConcernListener?) {
RetrofitManager.getInstance(context).getApi()
RetrofitManager.getInstance(context).api
.deleteConcernQuestions(UserManager.getInstance().userId, questionsId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
@ -86,13 +95,19 @@ object ConcernUtils {
override fun onFailure(e: HttpException?) {
super.onFailure(e)
listener?.onError()
AskErrorResponseUtils.errorResponseControl(context, e)
var errorString: String? = null
try {
errorString = e?.response()?.errorBody()?.string()
} catch (e1: Exception) {
e1.printStackTrace()
}
ErrorHelper.handleError(context, errorString, false)
}
})
}
fun postConcernQuestions(context: Context, questionsId: String, listener: onConcernListener?) {
RetrofitManager.getInstance(context).getApi()
RetrofitManager.getInstance(context).api
.postConcernQuestions(UserManager.getInstance().userId, questionsId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
@ -105,7 +120,13 @@ object ConcernUtils {
override fun onFailure(e: HttpException?) {
super.onFailure(e)
listener?.onError()
AskErrorResponseUtils.errorResponseControl(context, e)
var errorString: String? = null
try {
errorString = e?.response()?.errorBody()?.string()
} catch (e1: Exception) {
e1.printStackTrace()
}
ErrorHelper.handleError(context, errorString, false)
}
})
}

View File

@ -27,13 +27,29 @@ import okhttp3.ResponseBody;
public class DataLogUtils {
// 轮播图
public static void uploadLunbotuLog(Context context, String type, String title, String location) {
public static void uploadLunbotuLog(Context context, String type, String text, String index, String source) {
Map<String, Object> map = new HashMap<>();
map.put("location", location);
map.put("index", index);
map.put("type", type);
map.put("title", title);
map.put("form", "click");
uploadLog(context, "lunbotu", map);
map.put("text", text);
map.put("source", source);
uploadLog(context, "slide", map);
}
// 搜索热门标签
public static void uploadHotTagLog(Context context, String tag) {
Map<String, Object> map = new HashMap<>();
map.put("tag", tag);
uploadLog(context, "search-hot-tag", map);
}
// 点击下载按钮或进入游戏详情
public static void uploadGameLog(Context context, String gameId, String gameName, String entrance) {
Map<String, Object> map = new HashMap<>();
map.put("game_id", gameId);
map.put("game_name", gameName);
map.put("entrance", entrance);
uploadLog(context, "game", map);
}
// 上传日志

View File

@ -4,13 +4,19 @@ import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Build;
import android.preference.PreferenceManager;
import android.text.TextUtils;
import com.gh.common.constant.Config;
import com.gh.common.constant.Constants;
import com.gh.common.exposure.meta.MetaUtil;
import com.gh.gamecenter.BuildConfig;
import com.gh.gid.GidCallback;
import com.gh.gid.GidHelper;
import com.halo.assistant.HaloApp;
import com.lightgame.config.CommonDebug;
import com.lightgame.utils.Util_System_Phone_State;
import com.lightgame.utils.Utils;
import com.tencent.bugly.crashreport.CrashReport;
import com.tencent.stat.MtaSDkException;
import com.tencent.stat.StatConfig;
@ -69,7 +75,7 @@ public class DataUtils {
// 设置数据上报策略
// 测试渠道的时候即时上传,方便查看日志
if ("GH_TEST".equals(HaloApp.getInstance().getChannel())) {
if (Config.DEFAULT_CHANNEL.equals(HaloApp.getInstance().getChannel())) {
StatConfig.setStatSendStrategy(StatReportStrategy.INSTANT);
} else {
StatConfig.setStatSendStrategy(StatReportStrategy.PERIOD);
@ -93,7 +99,7 @@ public class DataUtils {
// init bugly
try {
CrashReport.setIsDevelopmentDevice(context, "GH_TEST".equals(channel));
CrashReport.setIsDevelopmentDevice(context, Config.DEFAULT_CHANNEL.equals(channel));
CrashReport.UserStrategy strategy = new CrashReport.UserStrategy(context);
strategy.setEnableANRCrashMonitor(false);
@ -117,6 +123,25 @@ public class DataUtils {
MtaHelper.onEvent(eventId, kv);
}
public static void getGid() {
GidHelper.getInstance().registerDevice(new GidCallback() {
@Override
public void onSuccess(String s) {
Utils.log("Gid", s);
PreferenceManager.getDefaultSharedPreferences(HaloApp.getInstance().getApplication()).edit().putString(Constants.DEVICE_KEY, s).apply();
HaloApp.getInstance().setGid(s);
// 避免初始化顺序问题导致 MetaUtil 一直持有空的 gid
MetaUtil.INSTANCE.refreshMeta();
}
@Override
public void onFailure(String s) {
Utils.log(s);
}
});
}
public static void onEvent(Context var0, String var1, String var2) {
TCAgent.onEvent(var0, var1, var2);
Properties prop = new Properties();

View File

@ -4,6 +4,7 @@ import android.text.TextUtils;
import android.view.View;
import com.gh.common.constant.Config;
import com.gh.common.repository.ReservationRepository;
import com.gh.common.view.DownloadProgressBar;
import com.gh.download.DownloadManager;
import com.gh.gamecenter.R;
@ -30,9 +31,29 @@ public class DetailDownloadUtils {
return;
}
if (viewHolder.gameEntity.getApk().isEmpty()) {
viewHolder.mDownloadPb.setText(TextUtils.isEmpty(viewHolder.downloadOffText) ? "暂无下载" : viewHolder.downloadOffText);
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.NONE);
if (viewHolder.gameEntity.isReservable()) {
if (!ReservationRepository.thisGameHasBeenReserved(viewHolder.gameEntity.getId())) {
if (TextUtils.isEmpty(viewHolder.downloadAddWord)) {
viewHolder.mDownloadPb.setText(String.format("预约" + "《%s》", viewHolder.gameEntity.getName()));
} else {
viewHolder.mDownloadPb.setText(String.format("预约" + "《%s》%s", viewHolder.gameEntity.getName(), viewHolder.downloadAddWord));
}
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.RESERVABLE);
} else {
viewHolder.mDownloadPb.setText("已预约《" + viewHolder.gameEntity.getName() + "");
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.RESERVED);
}
return;
}
if (viewHolder.gameEntity.getApk().isEmpty() || viewHolder.gameEntity.getDownloadOffStatus() != null) {
if ("dialog".equals(viewHolder.gameEntity.getDownloadOffStatus())) {
viewHolder.mDownloadPb.setText(TextUtils.isEmpty(viewHolder.downloadOffText) ? "查看详情" : viewHolder.downloadOffText);
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.NONE_WITH_HINT);
} else {
viewHolder.mDownloadPb.setText(TextUtils.isEmpty(viewHolder.downloadOffText) ? "暂无下载" : viewHolder.downloadOffText);
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.NONE);
}
} else {
String status = GameUtils.getDownloadBtnText(viewHolder.context, viewHolder.gameEntity, PluginLocation.only_game);
switch (status) {
@ -72,6 +93,7 @@ public class DetailDownloadUtils {
switch (downloadEntity.getStatus()) {
case downloading:
case pause:
case overflow:
viewHolder.mDownloadPb.setText(R.string.downloading);
if (downloadEntity.isPluggable() && PackagesManager.INSTANCE.isInstalled(downloadEntity.getPackageName())) {
viewHolder.mDownloadPb.setDownloadType(DownloadProgressBar.DownloadType.DOWNLOADING_PLUGIN);

View File

@ -1,5 +1,6 @@
package com.gh.common.util;
import android.app.ActivityManager;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
@ -10,7 +11,7 @@ import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log;
import com.gh.gamecenter.kuaichuan.WifiMgr;
import com.halo.assistant.HaloApp;
import com.lightgame.utils.Util_System_Phone_State;
import com.tencent.stat.StatConfig;
@ -128,6 +129,20 @@ public class DeviceUtils {
return builder.toString();
}
public static String getUserAgent() {
String userAgent = "";
userAgent = System.getProperty("http.agent");
StringBuffer sb = new StringBuffer();
for (int i = 0, length = userAgent.length(); i < length; i++) {
char c = userAgent.charAt(i);
if (c <= '\u001f' || c >= '\u007f') {
sb.append(String.format("\\u%04x", (int) c));
} else {
sb.append(c);
}
}
return sb.toString();
}
public static String getIPAddress(Context context) {
NetworkInfo info = ((ConnectivityManager) context
@ -149,7 +164,7 @@ public class DeviceUtils {
}
} else if (info.getType() == ConnectivityManager.TYPE_WIFI) {//当前使用无线网络
return WifiMgr.getInstance(context).getCurrentIpAddress();
return getCurrentIpAddress();
}
} else {
//当前无网络连接,请在设置中打开网络
@ -224,7 +239,6 @@ public class DeviceUtils {
return "";
}
// ping domain
public static String ping(String domain) {
try {
@ -243,5 +257,30 @@ public class DeviceUtils {
}
}
public static long getTotalRamSizeOfDevice(Context context) {
ActivityManager actManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
ActivityManager.MemoryInfo memInfo = new ActivityManager.MemoryInfo();
if (actManager != null) {
actManager.getMemoryInfo(memInfo);
}
return memInfo.totalMem / (1024 * 1024);
}
// 只能获取WiFi的IpAddress
public static String getCurrentIpAddress() {
String ipAddress;
WifiManager wifiManager = (WifiManager) HaloApp.getInstance().
getApplication().
getApplicationContext().
getSystemService(Context.WIFI_SERVICE);
int address = wifiManager.getDhcpInfo().ipAddress;
ipAddress = ((address & 0xFF)
+ "." + ((address >> 8) & 0xFF)
+ "." + ((address >> 16) & 0xFF)
+ "." + ((address >> 24) & 0xFF));
return ipAddress;
}
}

View File

@ -1,91 +0,0 @@
/*
* Copyright (C) 2015 Baidu, Inc. All Rights Reserved.
*/
package com.gh.common.util;
import android.content.Context;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
/**
* Created by sunpengfei on 15/11/4.
*/
public class DexUtils {
private static final int BUF_SIZE = 2048;
public static boolean prepareAssetsDex(Context context, File dexInternalStoragePath, String dex_file) {
BufferedInputStream bis = null;
OutputStream dexWriter = null;
try {
bis = new BufferedInputStream(context.getAssets().open(dex_file));
dexWriter = new BufferedOutputStream(new FileOutputStream(dexInternalStoragePath));
byte[] buf = new byte[BUF_SIZE];
int len;
while ((len = bis.read(buf, 0, BUF_SIZE)) > 0) {
dexWriter.write(buf, 0, len);
}
dexWriter.close();
bis.close();
return true;
} catch (IOException e) {
if (dexWriter != null) {
try {
dexWriter.close();
} catch (IOException ioe) {
ioe.printStackTrace();
}
}
if (bis != null) {
try {
bis.close();
} catch (IOException ioe) {
ioe.printStackTrace();
}
}
return false;
}
}
public static boolean prepareDex(File dexInternalStoragePath, File dex_file) {
BufferedInputStream bis = null;
OutputStream dexWriter = null;
try {
bis = new BufferedInputStream(new FileInputStream(dex_file));
dexWriter = new BufferedOutputStream(new FileOutputStream(dexInternalStoragePath));
byte[] buf = new byte[BUF_SIZE];
int len;
while ((len = bis.read(buf, 0, BUF_SIZE)) > 0) {
dexWriter.write(buf, 0, len);
}
dexWriter.close();
bis.close();
return true;
} catch (IOException e) {
if (dexWriter != null) {
try {
dexWriter.close();
} catch (IOException ioe) {
ioe.printStackTrace();
}
}
if (bis != null) {
try {
bis.close();
} catch (IOException ioe) {
ioe.printStackTrace();
}
}
return false;
}
}
}

View File

@ -0,0 +1,93 @@
package com.gh.common.util
import android.app.Dialog
import android.content.Context
import android.view.LayoutInflater
import android.view.Window
import android.widget.TextView
import com.gh.common.dialog.TrackableDialog
import com.gh.common.util.DialogUtils.checkDialogContext
import com.gh.gamecenter.R
object DialogHelper {
/**
* Material Design 风格弹窗
*
* @param context
* @param title 标题
* @param content 内容
* @param positiveText 确认按钮文本
* @param negativeText 取消按钮文本
* @param positiveClickCallback 确认按钮监听
* @param negativeClickCallback 取消按钮监听
* @param trackMtaEvent 是否记录出现、关闭弹窗MTA事件
* @param mtaEvent MTA 的事件名
* @param mtaKey MTA 的事件 Key
*/
fun showDialog(context: Context,
title: String,
content: CharSequence,
positiveText: String,
negativeText: String,
positiveClickCallback: (() -> Unit)? = null,
negativeClickCallback: (() -> Unit)? = null,
trackMtaEvent: Boolean = false,
mtaEvent: String = "",
mtaKey: String = ""): Dialog {
val solidContext = checkDialogContext(context)
val dialog = if (trackMtaEvent) {
TrackableDialog(solidContext, R.style.GhAlertDialog, mtaEvent, mtaKey)
} else {
Dialog(solidContext, R.style.GhAlertDialog)
}
val contentView = LayoutInflater.from(solidContext).inflate(R.layout.dialog_alert, null)
val contentTv = contentView.findViewById<TextView>(R.id.dialog_content)
val titleTv = contentView.findViewById<TextView>(R.id.dialog_title)
val negativeTv = contentView.findViewById<TextView>(R.id.dialog_negative)
val positiveTv = contentView.findViewById<TextView>(R.id.dialog_positive)
contentTv.text = content
titleTv.text = title
negativeTv.text = negativeText
positiveTv.text = positiveText
negativeTv.setOnClickListener {
if (trackMtaEvent) MtaHelper.onEvent(mtaEvent, mtaKey, "点击" + negativeText)
negativeClickCallback?.invoke()
dialog.dismiss()
}
positiveTv.setOnClickListener {
if (trackMtaEvent) MtaHelper.onEvent(mtaEvent, mtaKey, "点击$positiveText")
positiveClickCallback?.invoke()
dialog.dismiss()
}
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE)
dialog.setContentView(contentView)
dialog.show()
return dialog
}
/**
* For legacy java invocation
*/
@JvmStatic
fun showDialog(context: Context,
title: String,
content: CharSequence,
positiveText: String,
negativeText: String,
positiveClickCallback: EmptyCallback,
negativeClickCallback: EmptyCallback,
trackMtaEvent: Boolean = false,
mtaEvent: String = "",
mtaKey: String = ""): Dialog {
return showDialog(context, title, content, positiveText, negativeText, { positiveClickCallback.onCallback() }, { negativeClickCallback.onCallback() }, trackMtaEvent, mtaEvent, mtaKey)
}
}

File diff suppressed because it is too large Load Diff

View File

@ -3,27 +3,37 @@ package com.gh.common.util
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.os.Build
import android.os.Bundle
import android.text.TextUtils
import com.gh.base.BaseActivity
import com.gh.base.fragment.BaseFragment_TabLayout
import com.gh.common.AppExecutor
import com.gh.common.util.EntranceUtils.*
import com.gh.gamecenter.*
import com.gh.gamecenter.amway.AmwayActivity
import com.gh.gamecenter.category.CategoryDirectoryActivity
import com.gh.gamecenter.download.DownloadFragment.Companion.INDEX_UPDATE
import com.gh.gamecenter.entity.CommunityEntity
import com.gh.gamecenter.entity.LinkEntity
import com.gh.gamecenter.entity.SubjectData
import com.gh.gamecenter.entity.*
import com.gh.gamecenter.eventbus.EBReuse
import com.gh.gamecenter.eventbus.EBSkip
import com.gh.gamecenter.fragment.MainWrapperFragment
import com.gh.gamecenter.game.columncollection.detail.ColumnCollectionDetailActivity
import com.gh.gamecenter.manager.UserManager
import com.gh.gamecenter.qa.AskFragment
import com.gh.gamecenter.mygame.PlayedGameActivity
import com.gh.gamecenter.personalhome.UserHomeActivity
import com.gh.gamecenter.qa.CommunityFragment
import com.gh.gamecenter.qa.answer.detail.AnswerDetailActivity
import com.gh.gamecenter.qa.article.SimpleArticleListActivity
import com.gh.gamecenter.qa.article.detail.ArticleDetailActivity
import com.gh.gamecenter.qa.column.detail.AskColumnDetailActivity
import com.gh.gamecenter.qa.questions.detail.QuestionsDetailActivity
import com.gh.gamecenter.qa.subject.CommunitySubjectActivity
import com.gh.gamecenter.servers.GameServersActivity
import com.gh.gamecenter.subject.SubjectActivity
import com.gh.gamecenter.suggest.SuggestType
import com.gh.gamecenter.tag.TagsActivity
import com.gh.gamecenter.video.detail.VideoDetailActivity
import com.lightgame.utils.Util_System_ClipboardManager
import com.lightgame.utils.Utils
import org.greenrobot.eventbus.EventBus
@ -71,12 +81,12 @@ object DirectUtils {
when (linkEntity.type) {
"article", "news" -> {
NewsUtils.statNewsViews(context, linkEntity.link) // 统计阅读量
context.startActivity(NewsDetailActivity.getIntentById(context, linkEntity.link, entrance))
context.startActivity(NewsDetailActivity.getIntentById(context, linkEntity.link, BaseActivity.mergeEntranceAndPath(entrance, path)))
}
"game" -> GameDetailActivity.startGameDetailActivity(context, linkEntity.link, entrance)
"game" -> GameDetailActivity.startGameDetailActivity(context, linkEntity.link, BaseActivity.mergeEntranceAndPath(entrance, path))
"column" -> SubjectActivity.startSubjectActivity(context, linkEntity.link, linkEntity.text, false, entrance)
"column" -> SubjectActivity.startSubjectActivity(context, linkEntity.link, linkEntity.text, false, BaseActivity.mergeEntranceAndPath(entrance, path))
"question" -> context.startActivity(QuestionsDetailActivity.getIntent(context, linkEntity.link, entrance, path))
@ -86,20 +96,63 @@ object DirectUtils {
"community_article" -> context.startActivity(ArticleDetailActivity.getIntent(context, linkEntity.community!!, linkEntity.link!!, entrance, path))
"community_column" -> context.startActivity(CommunitySubjectActivity.getIntent(context, linkEntity.community!!, linkEntity.link, entrance))
"community_column" -> directToCommunityColumn(context, linkEntity.community, linkEntity.link!!, entrance, path)
"community_special_column" -> context.startActivity(AskColumnDetailActivity.getIntentByColumnId(context, linkEntity.link, linkEntity.community!!, entrance, path))
"web" -> directToWebView(context, url = linkEntity.link!!, entrance = entrance)
"web", "inurl" -> directToWebView(context, url = linkEntity.link!!, entrance = BaseActivity.mergeEntranceAndPath(entrance, path))
"qq" -> directToQqConversation(context, linkEntity.link)
"outurl" -> directToExternalBrowser(context, linkEntity.link!!)
"qqqun" -> directToQqGroup(context, linkEntity.link!!)
"tag" -> context.startActivity(TagsActivity.getIntent(context, linkEntity.text!!, entrance, path))
"all_community_article" -> {
context.startActivity(SimpleArticleListActivity.getIntent(
context,
linkEntity.link ?: "",
entrance,
path))
}
"category" -> {
context.startActivity(CategoryDirectoryActivity.getIntent(context, linkEntity.link!!, linkEntity.text!!))
}
"block" -> {
context.startActivity(BlockActivity.getIntent(context, SubjectRecommendEntity(
link = linkEntity.link,
text = linkEntity.text,
name = linkEntity.name,
display = linkEntity.display ?: Display())))
}
"column_collection" -> directToColumnCollection(context, linkEntity.link!!, -1, entrance)
"server" -> {
context.startActivity(GameServersActivity.getIntent(context, entrance, path))
}
"top_game_comment" -> directToAmway(context, null, entrance, path)
"wechat_bind" -> context.startActivity(WebActivity.getBindWechatIntent(context))
else -> DialogUtils.showLowVersionDialog(context)
}
}
/**
* 跳转到文章详情
* 跳转至专题合集
*/
fun directToColumnCollection(context: Context, id: String, position: Int = -1, entrance: String) {
context.startActivity(ColumnCollectionDetailActivity.getIntent(context, id, position, entrance))
}
/**
* 跳转到新闻详情
*/
@JvmStatic
fun directToArticle(context: Context, id: String, entrance: String? = null) {
@ -107,7 +160,23 @@ object DirectUtils {
bundle.putString(KEY_ENTRANCE, entrance ?: ENTRANCE_BROWSER)
bundle.putString(KEY_TO, NewsDetailActivity::class.java.simpleName)
bundle.putString(KEY_NEWSID, id)
EntranceUtils.jumpActivity(context, bundle)
jumpActivity(context, bundle)
}
/**
* 跳转至个人主页
*/
@JvmStatic
fun directToHomeActivity(context: Context, userId: String?, entrance: String? = null, path: String? = null) {
context.startActivity(UserHomeActivity.getIntent(context, userId ?: "", entrance, path))
}
/**
* 回到首页
*/
fun directToMainActivity(context: Context) {
val intent = Intent(context, MainActivity::class.java).apply { flags = Intent.FLAG_ACTIVITY_CLEAR_TOP }
context.startActivity(intent)
}
/**
@ -120,17 +189,23 @@ object DirectUtils {
bundle.putString(KEY_TO, GameDetailActivity::class.java.simpleName)
bundle.putString(KEY_GAMEID, id)
bundle.putBoolean(KEY_AUTO_DOWNLOAD, autoDownload ?: false)
EntranceUtils.jumpActivity(context, bundle)
jumpActivity(context, bundle)
}
// 跳转至用户玩过的游戏
fun directToPlayedGame(context: Context, userId: String, entrance: String = "", path: String = "") {
context.startActivity(PlayedGameActivity.getIntent(context, userId, entrance, path))
}
// 专栏
@JvmStatic
fun directToSubject(context: Context, id: String, subjectName: String? = "", entrance: String? = null) {
val bundle = Bundle()
val subjectData = SubjectData(subjectId = id, subjectName = subjectName, isOrder = false)
bundle.putString(KEY_ENTRANCE, entrance ?: ENTRANCE_BROWSER)
bundle.putString(KEY_TO, SubjectActivity::class.java.name)
bundle.putParcelable(EntranceUtils.KEY_SUBJECT_DATA, SubjectData(id, subjectName, false, null, null, null, null))
EntranceUtils.jumpActivity(context, bundle)
bundle.putParcelable(EntranceUtils.KEY_SUBJECT_DATA, subjectData)
jumpActivity(context, bundle)
}
// 反馈
@ -142,7 +217,7 @@ object DirectUtils {
bundle.putString(KEY_CONTENT, content)
bundle.putString(KEY_SUGGEST_HINT_TYPE, KEY_PLUGIN)
bundle.putSerializable(EntranceUtils.KEY_SUGGESTTYPE, SuggestType.gameQuestion)
EntranceUtils.jumpActivity(context, bundle)
jumpActivity(context, bundle)
}
@JvmStatic
@ -150,7 +225,7 @@ object DirectUtils {
val bundle = Bundle()
bundle.putString(KEY_ENTRANCE, entrance ?: ENTRANCE_BROWSER)
bundle.putString(KEY_TO, DownloadManagerActivity.TAG)
EntranceUtils.jumpActivity(context, bundle)
jumpActivity(context, bundle)
}
/**
@ -165,7 +240,7 @@ object DirectUtils {
bundle.putString(KEY_GAMEID, gameId)
bundle.putString(KEY_PACKAGENAME, packageName)
bundle.putBoolean(KEY_AUTO_DOWNLOAD, true)
EntranceUtils.jumpActivity(context, bundle)
jumpActivity(context, bundle)
}
}
@ -177,7 +252,17 @@ object DirectUtils {
bundle.putString(KEY_GAMEID, gameId)
bundle.putString(KEY_PACKAGENAME, packageName)
bundle.putInt(BaseFragment_TabLayout.PAGE_INDEX, INDEX_UPDATE)
EntranceUtils.jumpActivity(context, bundle)
jumpActivity(context, bundle)
}
@JvmStatic
fun directToToolbox(context: Context, gameId: String, toolboxUrl: String, entrance: String = ENTRANCE_BROWSER) {
val bundle = Bundle()
bundle.putString(KEY_ENTRANCE, entrance)
bundle.putString(KEY_TO, ToolBoxActivity::class.java.simpleName)
bundle.putString(KEY_GAMEID, gameId)
bundle.putString(KEY_URL, toolboxUrl)
jumpActivity(context, bundle)
}
@JvmStatic
@ -187,7 +272,7 @@ object DirectUtils {
bundle.putString(KEY_TO, AnswerDetailActivity::class.java.name)
bundle.putString(KEY_PATH, path)
bundle.putString(KEY_ANSWER_ID, id)
EntranceUtils.jumpActivity(context, bundle)
jumpActivity(context, bundle)
}
@JvmStatic
@ -197,25 +282,31 @@ object DirectUtils {
bundle.putString(KEY_TO, QuestionsDetailActivity::class.java.name)
bundle.putString(KEY_PATH, path)
bundle.putString(KEY_QUESTIONS_ID, id)
EntranceUtils.jumpActivity(context, bundle)
jumpActivity(context, bundle)
}
@JvmStatic
fun directToWebView(context: Context, url: String, entrance: String? = null) {
val bundle = Bundle()
bundle.putString(KEY_ENTRANCE, entrance ?: ENTRANCE_BROWSER)
bundle.putString(EntranceUtils.KEY_TO, WebActivity::class.java.simpleName)
bundle.putString(KEY_TO, WebActivity::class.java.simpleName)
bundle.putString(EntranceUtils.KEY_URL, url)
EntranceUtils.jumpActivity(context, bundle)
jumpActivity(context, bundle)
}
// 个人-系统消息
@JvmStatic
fun directToOfficialNotification(context: Context, entrance: String? = null) {
val bundle = Bundle()
bundle.putString(EntranceUtils.KEY_ENTRANCE, entrance ?: ENTRANCE_BROWSER)
bundle.putString(EntranceUtils.KEY_TO, MessageKeFuActivity::class.java.simpleName)
EntranceUtils.jumpActivity(context, bundle)
bundle.putString(KEY_ENTRANCE, entrance ?: ENTRANCE_BROWSER)
bundle.putString(KEY_TO, MessageKeFuActivity::class.java.simpleName)
jumpActivity(context, bundle)
}
@JvmStatic
fun directToExternalBrowser(context: Context, url: String) {
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
context.startActivity(browserIntent)
}
// 跳转 QQ
@ -265,9 +356,9 @@ object DirectUtils {
fun directToGiftDetail(context: Context, giftId: String, entrance: String? = null) {
val bundle = Bundle()
bundle.putString(KEY_ENTRANCE, entrance ?: ENTRANCE_BROWSER)
bundle.putString(EntranceUtils.KEY_TO, LibaoDetailActivity::class.java.simpleName)
bundle.putString(KEY_TO, LibaoDetailActivity::class.java.simpleName)
bundle.putString(EntranceUtils.KEY_ID, giftId)
EntranceUtils.jumpActivity(context, bundle)
jumpActivity(context, bundle)
}
/**
@ -284,18 +375,74 @@ object DirectUtils {
// 这里换个线程操作是为了做一点延时
AppExecutor.ioExecutor.execute {
EventBus.getDefault().post(EBSkip(MainActivity.EB_SKIP_GAMEFRAGMENT, 1))
EventBus.getDefault().post(EBReuse(AskFragment.EB_RETRY_PAGE))
EventBus.getDefault().post(EBSkip(MainActivity.EB_SKIP_MAIN, MainWrapperFragment.INDEX_ASK))
EventBus.getDefault().post(EBReuse(CommunityFragment.EB_RETRY_PAGE))
}
}
@JvmStatic
fun directToCommunityArticle(context: Context, articleId: String?, communityId: String?, entrance: String?) {
fun directToCommunityArticle(context: Context, articleId: String?, communityId: String?, entrance: String?, path: String?) {
val bundle = Bundle()
bundle.putString(KEY_ENTRANCE, entrance ?: ENTRANCE_BROWSER)
bundle.putString(EntranceUtils.KEY_TO, ArticleDetailActivity::class.java.name)
bundle.putString(EntranceUtils.KEY_COMMUNITY_ARTICLE_ID, articleId)
bundle.putParcelable(EntranceUtils.KEY_COMMUNITY_DATA, CommunityEntity(id = communityId!!))
EntranceUtils.jumpActivity(context, bundle)
bundle.putString(KEY_PATH, path)
bundle.putString(KEY_TO, ArticleDetailActivity::class.java.name)
bundle.putString(KEY_COMMUNITY_ARTICLE_ID, articleId)
bundle.putParcelable(KEY_COMMUNITY_DATA, CommunityEntity(id = communityId!!))
jumpActivity(context, bundle)
}
/**
* 跳转到社区专题
*/
@JvmStatic
fun directToCommunityColumn(context: Context, community: CommunityEntity?, subjectId: String, entrance: String?, path: String?) {
val bundle = Bundle()
bundle.putString(KEY_PATH, path)
bundle.putString(KEY_TO, CommunitySubjectActivity::class.java.name)
bundle.putString(KEY_ENTRANCE, BaseActivity.mergeEntranceAndPath(entrance, path))
bundle.putString(KEY_COLUMN_ID, subjectId)
bundle.putParcelable(KEY_COMMUNITY_DATA, community)
jumpActivity(context, bundle)
}
/**
* @param fromLocation 可见 [VideoDetailContainerViewModel.Location]
*/
@JvmStatic
fun directToVideoDetail(context: Context, videoId: String, fromLocation: String, showComment: Boolean = false, entrance: String? = null, path: String? = "") {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
val bundle = Bundle()
bundle.putString(KEY_ENTRANCE, entrance ?: ENTRANCE_BROWSER)
bundle.putString(KEY_TO, VideoDetailActivity::class.java.name)
bundle.putString(KEY_PATH, path)
bundle.putString(KEY_ID, videoId)
bundle.putString(KEY_LOCATION, fromLocation)
bundle.putBoolean(KEY_SHOW_COMMENT, showComment)
jumpActivity(context, bundle)
} else {
DialogUtils.showLowSystemVersionDialog(context)
}
}
/**
* 跳转至安利墙
* @param fixedTopAmwayCommentId 需要置顶的安利Id
*/
@JvmStatic
fun directToAmway(context: Context, fixedTopAmwayCommentId: String? = null, entrance: String? = null, path: String? = "") {
val bundle = Bundle()
bundle.putString(KEY_ENTRANCE, entrance ?: ENTRANCE_BROWSER)
bundle.putString(KEY_TO, AmwayActivity::class.java.name)
bundle.putString(KEY_ID, fixedTopAmwayCommentId)
bundle.putString(KEY_PATH, path)
jumpActivity(context, bundle)
}
/**
* 跳转至徽章墙
*/
@JvmStatic
fun directToBadgeWall(context: Context, userId: String?, name: String?, icon: String?) {
context.startActivity(WebActivity.getBadgeCenterIntent(context, userId, name, icon))
}
}

View File

@ -1,12 +1,23 @@
package com.gh.common.util;
import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Color;
import android.os.Build;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import com.halo.assistant.HaloApp;
public class DisplayUtils {
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import androidx.core.content.ContextCompat;
public class DisplayUtils {
/**
* 根据手机的分辨率从 dip(像素) 的单位 转成为 px
*/
@ -14,7 +25,7 @@ public class DisplayUtils {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (dpValue * scale + 0.5f);
}
/**
* 根据手机的分辨率从 px(像素) 的单位 转成为 dip
*/
@ -22,16 +33,19 @@ public class DisplayUtils {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (pxValue / scale + 0.5f);
}
/**
* 根据手机的分辨率从 dip(像素) 的单位 转成为 px
*/
public static int dip2px(float dpValue) {
final float scale = HaloApp.getInstance().getApplication().getResources().getDisplayMetrics().density;
final float scale = HaloApp.getInstance()
.getApplication()
.getResources()
.getDisplayMetrics().density;
return (int) (dpValue * scale + 0.5f);
}
/**
* 将px值转换为sp值保证文字大小不变
*
@ -43,7 +57,7 @@ public class DisplayUtils {
final float fontScale = context.getResources().getDisplayMetrics().scaledDensity;
return (int) (pxValue / fontScale + 0.5f);
}
/**
* 将sp值转换为px值保证文字大小不变
*
@ -55,7 +69,7 @@ public class DisplayUtils {
final float fontScale = context.getResources().getDisplayMetrics().scaledDensity;
return (int) (spValue * fontScale + 0.5f);
}
/**
* 获取状态栏的高度
*
@ -65,7 +79,7 @@ public class DisplayUtils {
public static int getStatusBarHeight(Resources resources) {
return getInternalDimensionSize(resources, "status_bar_height");
}
public static int getInternalDimensionSize(Resources res, String key) {
int result = 0;
int resourceId = res.getIdentifier(key, "dimen", "android");
@ -74,5 +88,107 @@ public class DisplayUtils {
}
return result;
}
public static void transparentStatusBar(Activity activity) {
//make full transparent statusBar
if (Build.VERSION.SDK_INT >= 19 && Build.VERSION.SDK_INT < 21) {
setWindowFlag(activity, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, true);
}
if (Build.VERSION.SDK_INT >= 19) {
activity.getWindow()
.getDecorView()
.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
}
if (Build.VERSION.SDK_INT >= 21) {
setWindowFlag(activity, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, false);
activity.getWindow().setStatusBarColor(Color.TRANSPARENT);
}
}
public static void transparentStatusAndNavigation(Activity activity) {
//make full transparent statusBar
if (Build.VERSION.SDK_INT >= 19 && Build.VERSION.SDK_INT < 21) {
setWindowFlag(activity, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS | WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, true);
}
if (Build.VERSION.SDK_INT >= 19) {
activity.getWindow()
.getDecorView()
.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
}
if (Build.VERSION.SDK_INT >= 21) {
setWindowFlag(activity, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS | WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, false);
activity.getWindow().setStatusBarColor(Color.TRANSPARENT);
activity.getWindow().setNavigationBarColor(Color.TRANSPARENT);
}
}
private static void setWindowFlag(Activity activity, final int bits, boolean on) {
Window win = activity.getWindow();
WindowManager.LayoutParams winParams = win.getAttributes();
if (on) {
winParams.flags |= bits;
} else {
winParams.flags &= ~bits;
}
win.setAttributes(winParams);
}
public static void setLightStatusBar(Activity activity, boolean lightStatusBar) {
boolean isMIUI = setMIUIStatusBarStyle(activity, lightStatusBar);
if (!isMIUI) {
Window window = activity.getWindow();
View decor = window.getDecorView();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (lightStatusBar) {
decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
} else {
decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
}
} else {
decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
}
}
}
private static boolean setMIUIStatusBarStyle(Activity activity, boolean lightStatusBar) {
boolean result = false;
Window window = activity.getWindow();
if (window != null) {
Class clazz = window.getClass();
try {
int darkModeFlag = 0;
Class layoutParams = Class.forName("android.view.MiuiWindowManager$LayoutParams");
Field field = layoutParams.getField("EXTRA_FLAG_STATUS_BAR_DARK_MODE");
darkModeFlag = field.getInt(layoutParams);
Method extraFlagField = clazz.getMethod("setExtraFlags", int.class, int.class);
extraFlagField.invoke(window, lightStatusBar ? darkModeFlag : 0, darkModeFlag);//状态栏透明且黑色字体
result = true;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && lightStatusBar) {
//开发版 7.7.13 及以后版本采用了系统API旧方法无效但不会报错所以两个方式都要加上
activity.getWindow()
.getDecorView()
.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
} catch (Exception e) {
// do nothing
}
}
return result;
}
public static void setStatusBarColor(Activity activity, int color, boolean lightStatusBar) {
Window window = activity.getWindow();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
window.setStatusBarColor(ContextCompat.getColor(activity,color));
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
setLightStatusBar(activity,lightStatusBar);
}
}
}

View File

@ -0,0 +1,101 @@
package com.gh.common.util
import android.content.Context
import android.os.Build
import com.gh.gamecenter.entity.ApkEntity
import com.gh.gamecenter.entity.GameEntity
object DownloadDialogHelper {
/**
* [callback] 执行点击关闭以后会执行的代码块,没有弹窗也会执行这个代码块
*/
@JvmStatic
fun findAvailableDialogAndShow(context: Context, gameEntity: GameEntity, apkEntity: ApkEntity, callback: EmptyCallback) {
val dialog = retrieveAvailableDialog(gameEntity, apkEntity)
if (dialog != null) {
showDownloadDialog(context, dialog, callback)
} else {
callback.onCallback()
}
}
private fun retrieveAvailableDialog(gameEntity: GameEntity, apkEntity: ApkEntity): GameEntity.Dialog? {
if (gameEntity.downloadDialog.isNullOrEmpty()) return null
for (dialog in gameEntity.downloadDialog!!) {
// 共有 8 种可能
// 1. 不指定包名、机型和系统版本
if (dialog.rule.packageName.isEmpty()
&& dialog.rule.models.isEmpty()
&& dialog.rule.systemVersions.isEmpty()) {
return dialog
}
// 2. 指定包名不管机型和系统
if (dialog.rule.packageName == apkEntity.packageName
&& dialog.rule.models.isEmpty()
&& dialog.rule.systemVersions.isEmpty()) {
return dialog
}
// 3. 指定机型不管包名和系统
if (dialog.rule.models.contains(Build.MODEL)
&& dialog.rule.packageName.isEmpty()
&& dialog.rule.systemVersions.isEmpty()) {
return dialog
}
// 4. 指定系统不管包名和机型
if (dialog.rule.systemVersions.contains(Build.VERSION.RELEASE)
&& dialog.rule.packageName.isEmpty()
&& dialog.rule.models.isEmpty()) {
return dialog
}
// 5. 指定包名和机型不管系统
if (dialog.rule.packageName == apkEntity.packageName
&& dialog.rule.models.contains(Build.MODEL)
&& dialog.rule.systemVersions.isEmpty()) {
return dialog
}
// 6. 指定包名和系统不管机型
if (dialog.rule.packageName == apkEntity.packageName
&& dialog.rule.systemVersions.contains(Build.VERSION.RELEASE)
&& dialog.rule.models.isEmpty()) {
return dialog
}
// 7. 指定机型和系统不管包名
if (dialog.rule.systemVersions.contains(Build.VERSION.RELEASE)
&& dialog.rule.models.contains(Build.MODEL)
&& dialog.rule.packageName.isEmpty()) {
return dialog
}
// 8.指定包名、机型和系统版本
if (dialog.rule.packageName == apkEntity.packageName
&& dialog.rule.models.contains(Build.MODEL)
&& dialog.rule.systemVersions.contains(Build.VERSION.RELEASE)) {
return dialog
}
}
return null
}
private fun showDownloadDialog(context: Context, dialog: GameEntity.Dialog, callback: EmptyCallback) {
DialogUtils.showDialogWithHtmlContent(
context,
dialog.title,
dialog.content,
"继续下载",
"取消",
{ callback.onCallback() },
null)
}
}

View File

@ -3,17 +3,21 @@ package com.gh.common.util;
import android.content.Context;
import android.graphics.Color;
import android.os.Message;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.support.v4.util.ArrayMap;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.collection.ArrayMap;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;
import com.gh.common.constant.Config;
import com.gh.common.dialog.ReserveDialogFragment;
import com.gh.common.exposure.ExposureEvent;
import com.gh.common.exposure.ExposureUtils;
import com.gh.common.repository.ReservationRepository;
import com.gh.common.view.DownloadDialog;
import com.gh.download.DownloadManager;
import com.gh.gamecenter.DownloadManagerActivity;
@ -69,7 +73,7 @@ public class DownloadItemUtils {
// adapter.notifyItemChanged(index);
// }
} else {
if (!queue.contains(platform)) {
if (!queue.contains(platform) && !TextUtils.isEmpty(platform)) {
queue.offer(platform);
if (AppDebugConfig.IS_DEBUG) {
AppDebugConfig.logMethodWithParams(DownloadItemUtils.class, queue.size(), gameEntity.getBrief(), downloadEntity.getPlatform(), index);
@ -83,7 +87,7 @@ public class DownloadItemUtils {
DownloadManager.getInstance(context).sendMessageDelayed(msg, 3000);
}
}
if (platform.equals(queue.peek())) {
if (platform != null && platform.equals(queue.peek())) {
if (entryMap == null) {
entryMap = new ArrayMap<>();
gameEntity.setEntryMap(entryMap);
@ -96,6 +100,35 @@ public class DownloadItemUtils {
}
}
// 下载按钮显示为查看,并且不提供下载功能
public static void updateItemWithViewOnlyStyle(GameViewHolder holder) {
holder.gameDownloadBtn.setVisibility(View.VISIBLE);
holder.gameDownloadBtn.setText("查看");
holder.gameDownloadBtn.setClickable(false);
}
// 根据预约状态更新下载按钮
public static void updateItemWithReserveStatus(GameViewHolder holder, GameEntity gameEntity) {
if ("download".equals(gameEntity.getReserveStatus())) {
// 已上线
holder.gameDownloadBtn.setVisibility(View.VISIBLE);
holder.gameDownloadBtn.setText("已上线");
holder.gameDownloadBtn.setTextColor(Color.WHITE);
holder.gameDownloadBtn.setBackground(ContextCompat.getDrawable(holder.gameDes.getContext(), R.drawable.game_item_btn_pause_dn));
} else if ("appointment".equals(gameEntity.getReserveStatus())) {
// 已预约
holder.gameDownloadBtn.setVisibility(View.VISIBLE);
holder.gameDownloadBtn.setText("已预约");
holder.gameDownloadBtn.setTextColor(Color.WHITE);
holder.gameDownloadBtn.setBackgroundResource(R.drawable.game_item_btn_pause_dn);
}
if (gameEntity.isLibaoExists()) {
holder.gameLibaoIcon.setVisibility(View.VISIBLE);
} else {
holder.gameLibaoIcon.setVisibility(View.GONE);
}
}
public static void updateItem(Context context, GameEntity gameEntity, GameViewHolder holder,
boolean isShowPlatform) {
updateItem(context, gameEntity, holder, isShowPlatform, PluginLocation.only_game);
@ -117,13 +150,38 @@ public class DownloadItemUtils {
holder.gameLibaoIcon.setVisibility(View.GONE);
}
if (gameEntity.getApk() == null || gameEntity.getApk().isEmpty()) {
// 显示预约
if (gameEntity.isReservable()) {
holder.gameDes.setVisibility(View.VISIBLE);
holder.gameProgressbar.setVisibility(View.GONE);
holder.gameInfo.setVisibility(View.GONE);
holder.gameDownloadBtn.setBackgroundResource(R.drawable.news_detail_comment);
holder.gameDownloadBtn.setText("暂无");
holder.gameDownloadBtn.setTextColor(ContextCompat.getColor(context, R.color.button_gray));
if (!ReservationRepository.thisGameHasBeenReserved(gameEntity.getId())) {
holder.gameDownloadBtn.setText("预约");
holder.gameDownloadBtn.setTextColor(Color.WHITE);
holder.gameDownloadBtn.setBackgroundResource(R.drawable.button_reserve);
} else {
holder.gameDownloadBtn.setText("已预约");
holder.gameDownloadBtn.setTextColor(Color.WHITE);
holder.gameDownloadBtn.setBackgroundResource(R.drawable.game_item_btn_pause_dn);
}
return;
}
if (gameEntity.getApk().isEmpty() || gameEntity.getDownloadOffStatus() != null) {
holder.gameDes.setVisibility(View.VISIBLE);
holder.gameProgressbar.setVisibility(View.GONE);
holder.gameInfo.setVisibility(View.GONE);
String offStatus = gameEntity.getDownloadOffStatus();
if ("dialog".equals(offStatus)) {
holder.gameDownloadBtn.setText("查看");
holder.gameDownloadBtn.setTextColor(ContextCompat.getColor(context, R.color.white));
holder.gameDownloadBtn.setBackgroundResource(R.drawable.game_item_btn_download_style);
} else {
holder.gameDownloadBtn.setText("暂无");
holder.gameDownloadBtn.setTextColor(ContextCompat.getColor(context, R.color.button_gray));
holder.gameDownloadBtn.setBackgroundResource(R.drawable.news_detail_comment);
}
holder.gameDownloadBtn.setClickable(false);
} else if (gameEntity.getApk().size() == 1) {
updateNormalItem(context, holder, gameEntity, isShowPlatform, pluginLocation);
@ -159,6 +217,7 @@ public class DownloadItemUtils {
// 更新插件的条目有多个apk包
private static void updatePluginItem(Context context, GameViewHolder holder, GameEntity gameEntity,
boolean isShowPlatform, PluginLocation pluginLocation) {
GameUtils.setDownloadBtnStatus(context, gameEntity, holder.gameDownloadBtn, pluginLocation);
ArrayMap<String, DownloadEntity> entryMap = gameEntity.getEntryMap();
if (entryMap != null && !entryMap.isEmpty()) {
@ -177,8 +236,6 @@ public class DownloadItemUtils {
}
}
GameUtils.setDownloadBtnStatus(context, gameEntity, holder.gameDownloadBtn, pluginLocation);
holder.gameDes.setVisibility(View.VISIBLE);
holder.gameProgressbar.setVisibility(View.GONE);
holder.gameInfo.setVisibility(View.GONE);
@ -230,7 +287,8 @@ public class DownloadItemUtils {
} else if (status.equals(DownloadStatus.pause)
|| status.equals(DownloadStatus.timeout)
|| status.equals(DownloadStatus.neterror)
|| status.equals(DownloadStatus.subscribe)) {
|| status.equals(DownloadStatus.subscribe)
|| status.equals(DownloadStatus.overflow)) {
holder.gameProgressbar.setProgress((int) (downloadEntity.getPercent() * 10));
if (isShowPlatform && platform != null) {
holder.gameDownloadSpeed.setText(String.format("%s - 暂停", platform));
@ -240,10 +298,10 @@ public class DownloadItemUtils {
holder.gameDownloadPercentage.setText(downloadEntity.getPercent() + "%");
if (isNormal) {
if (status.equals(DownloadStatus.pause)) {
holder.gameDownloadBtn.setText(R.string.downloading);
} else {
if (status.equals(DownloadStatus.waiting)) {
holder.gameDownloadBtn.setText(R.string.waiting);
} else {
holder.gameDownloadBtn.setText(R.string.downloading);
}
holder.gameDownloadBtn.setBackgroundResource(R.drawable.game_item_btn_downloading_style);
holder.gameDownloadBtn.setTextColor(ContextCompat.getColorStateList(context, R.color.text_downloading_style));
@ -290,10 +348,86 @@ public class DownloadItemUtils {
final String location,
final ExposureEvent traceEvent) {
setOnClickListener(context, downloadBtn, gameEntity, position, adapter, entrance, location, traceEvent, null);
}
/**
* @param clickCallback 供那些需要知道点击回调的地方使用
*/
public static void setOnClickListener(final Context context,
final TextView downloadBtn,
final GameEntity gameEntity,
final int position,
final RecyclerView.Adapter<? extends RecyclerView.ViewHolder> adapter,
final String entrance,
final String location,
final ExposureEvent traceEvent,
@Nullable final EmptyCallback clickCallback) {
if (gameEntity.isReservable()) {
if (!ReservationRepository.thisGameHasBeenReserved(gameEntity.getId())) {
downloadBtn.setOnClickListener(v -> {
CheckLoginUtils.checkLogin(context, entrance, () -> {
if (clickCallback != null) {
clickCallback.onCallback();
}
PermissionHelper.checkReadPhoneStatePermissionBeforeAction(context, () -> {
ReserveDialogFragment dialogFragment = ReserveDialogFragment.getInstance(
gameEntity,
() -> adapter.notifyItemChanged(position)
);
dialogFragment.show(((AppCompatActivity) context).getSupportFragmentManager(), "reserve");
});
});
});
} else {
downloadBtn.setOnClickListener(v -> {
if (clickCallback != null) {
clickCallback.onCallback();
}
if ("download".equals(gameEntity.getReserveStatus())) {
ReservationHelper.showDeleteReservationDialog(context, () -> {
ReservationHelper.deleteReservation(gameEntity, () -> {
adapter.notifyItemChanged(position);
});
});
} else {
ReservationHelper.showCancelReservationDialog(context, () -> {
ReservationHelper.cancelReservation(gameEntity, () -> {
adapter.notifyItemChanged(position);
});
});
}
});
}
return;
}
if (gameEntity.getApk().size() == 1) {
downloadBtn.setOnClickListener(v -> onNormalClick(context, downloadBtn, gameEntity, position, adapter, entrance, location, traceEvent));
downloadBtn.setOnClickListener(v -> {
EmptyCallback clickRunnable = () -> {
if (clickCallback != null) {
clickCallback.onCallback();
}
onNormalClick(context, downloadBtn, gameEntity, position, adapter, entrance, location, traceEvent);
};
// 启动不需要请求存储权限
if (downloadBtn.getText().toString().equals(context.getString(R.string.launch))) {
clickRunnable.onCallback();
} else {
PermissionHelper.checkStoragePermissionBeforeAction(context, clickRunnable);
}
});
} else {
downloadBtn.setOnClickListener(v -> DownloadDialog.getInstance(context).showPopupWindow(v, gameEntity, entrance, location, traceEvent));
downloadBtn.setOnClickListener(v -> {
if (clickCallback != null) {
clickCallback.onCallback();
}
PermissionHelper.checkStoragePermissionBeforeAction(context, () -> {
DownloadDialog.getInstance(context).showPopupWindow(v, gameEntity, entrance, location, traceEvent);
});
});
}
}
@ -317,33 +451,44 @@ public class DownloadItemUtils {
final String location,
@Nullable final ExposureEvent traceEvent) {
String str = downloadBtn.getText().toString();
ApkEntity apk = gameEntity.getApk().get(0);
if (str.equals(context.getString(R.string.download))) {
DialogUtils.checkDownload(context, gameEntity.getApk().get(0).getSize(),
isSubscribe -> download(context, gameEntity, downloadBtn, entrance, location, isSubscribe, traceEvent));
// 先弹下载弹窗(如果需要的话)
DownloadDialogHelper.findAvailableDialogAndShow(context, gameEntity, apk, () -> {
DialogUtils.checkDownload(context, apk.getSize(),
isSubscribe -> download(context, gameEntity, downloadBtn, entrance, location, isSubscribe, traceEvent));
});
DataLogUtils.uploadGameLog(context, gameEntity.getId(), gameEntity.getName(), entrance);
} else if (str.equals(context.getString(R.string.pluggable))) {
if (entrance.contains("我的游戏")) {
DataUtils.onMtaEvent(context, "我的游戏_启动", "插件化", gameEntity.getName());
MtaHelper.onEvent("我的游戏_启动", "插件化", gameEntity.getName());
}
DialogUtils.checkDownload(context, gameEntity.getApk().get(0).getSize(),
isSubscribe -> plugin(context, gameEntity, downloadBtn, entrance, location, isSubscribe, traceEvent));
DownloadDialogHelper.findAvailableDialogAndShow(context, gameEntity, apk, () -> {
DialogUtils.checkDownload(context, apk.getSize(),
isSubscribe -> plugin(context, gameEntity, downloadBtn, entrance, location, isSubscribe, traceEvent));
});
} else if (str.equals(context.getString(R.string.install))) {
install(context, gameEntity, position, adapter);
} else if (str.equals(context.getString(R.string.launch))) {
if (entrance.contains("我的游戏")) {
DataUtils.onMtaEvent(context, "我的游戏_启动", "启动", gameEntity.getName());
MtaHelper.onEvent("我的游戏_启动", "启动", gameEntity.getName());
}
DataUtils.onGameLaunchEvent(context, gameEntity.getName(), gameEntity.getApk().get(0).getPlatform(), location);
PackageUtils.launchApplicationByPackageName(context, gameEntity.getApk().get(0).getPackageName());
} else if (str.equals(context.getString(R.string.waiting))
|| str.equals(context.getString(R.string.downloading))) {
context.startActivity(DownloadManagerActivity.getDownloadMangerIntent(context,
gameEntity.getApk().get(0).getUrl(), entrance + "+(" + location.split(":")[0] + ")"));
apk.getUrl(), entrance + "+(" + location.split(":")[0] + ")"));
} else if (str.equals(context.getString(R.string.update))) {
if (entrance.contains("我的游戏")) {
DataUtils.onMtaEvent(context, "我的游戏_启动", "更新", gameEntity.getName());
MtaHelper.onEvent("我的游戏_启动", "更新", gameEntity.getName());
}
DialogUtils.checkDownload(context, gameEntity.getApk().get(0).getSize(),
isSubscribe -> update(context, gameEntity, entrance, location, isSubscribe, traceEvent));
DownloadDialogHelper.findAvailableDialogAndShow(context, gameEntity, apk, () -> {
DialogUtils.checkDownload(context, apk.getSize(),
isSubscribe -> update(context, gameEntity, entrance, location, isSubscribe, traceEvent));
});
}
}

Some files were not shown because too many files have changed in this diff Show More