Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
1983b8e
新增我的模块,首页导航改为下方导航
shiqizhenyes Dec 17, 2021
ba8e6d3
升级AGP 插件
shiqizhenyes Dec 17, 2021
586d8d0
添加support 兼容库
shiqizhenyes Dec 17, 2021
56ae8d5
完善首页功能及我的页面功能逻辑
shiqizhenyes Dec 17, 2021
b3f5c2b
添加已收藏图标,删除旧图标
shiqizhenyes Dec 17, 2021
6faa099
更换收藏图标代码
shiqizhenyes Dec 17, 2021
45eef8d
修复首页数据key 顺序错误,修复发帖崩溃
shiqizhenyes Dec 17, 2021
cd1c6f4
调整我的页面配色
shiqizhenyes Dec 18, 2021
3a99656
优化我的页面和个人信息页面跳转动画
shiqizhenyes Dec 18, 2021
d6d366a
优化启动图标,替换快捷方式图标
shiqizhenyes Dec 18, 2021
9bfc53d
删除无用的图标
shiqizhenyes Dec 18, 2021
3a52223
替换主题模块菜单图标
shiqizhenyes Dec 19, 2021
6f8d9dc
修复appbar 高度显示错误,优化状态栏沉浸逻辑
shiqizhenyes Dec 19, 2021
ec51107
优化节点话题页状态栏效果
shiqizhenyes Dec 19, 2021
48140d1
优化底部导航菜单配色
shiqizhenyes Dec 20, 2021
3ec6b82
优化底部菜单图标大小
shiqizhenyes Dec 20, 2021
2ce7e0f
Change talkback order in news item list
Dec 20, 2021
297fcef
update to 2.0.1
Dec 20, 2021
ff34e8b
update to 2.0.1
Dec 20, 2021
844c4ba
Merge branch 'main' of github.com:v2er-app/Android
Dec 20, 2021
386cab8
优化底部导航菜单文字显示效果
shiqizhenyes Dec 22, 2021
3b55c22
优化顶部toolbar 显示效果
shiqizhenyes Dec 22, 2021
ba5a012
优化我的页面配色效果
shiqizhenyes Dec 22, 2021
a97df2d
优化sectionView 控件ripple 效果
shiqizhenyes Dec 22, 2021
d809a55
替换我的页面选项箭头图标
shiqizhenyes Dec 22, 2021
e80f8ea
部分页面添加返回按钮
shiqizhenyes Dec 22, 2021
8680498
Merge branch 'main' into main
shiqizhenyes Dec 22, 2021
5de6273
优化辅助功能talkback 体验
shiqizhenyes Dec 22, 2021
4ad27ac
用户话题页面和个人信息页面更换返回按键
shiqizhenyes Dec 22, 2021
0804c85
删除无用图标
shiqizhenyes Dec 22, 2021
c5d1886
去除无用代码
shiqizhenyes Dec 22, 2021
5872bd6
Merge pull request #5 from shiqizhenyes/main
graycreate Dec 23, 2021
6d89900
重绘发送图标和分享图标
shiqizhenyes Dec 24, 2021
e39ace8
修复toolbar 右侧菜单不显示bug
shiqizhenyes Dec 24, 2021
e271324
修复首页搜索按钮不显示
shiqizhenyes Dec 24, 2021
deb115e
修复发帖选择节点搜索夜间模式颜色显示错误
shiqizhenyes Dec 24, 2021
d7ad264
Merge pull request #6 from shiqizhenyes/main
graycreate Jan 1, 2022
34ccb03
替换provider 字段
shiqizhenyes Jan 4, 2022
f1615f3
修复小米手机长按话题评论链接崩溃
shiqizhenyes Jan 4, 2022
a918d29
修复小米手机长按话题评论链接崩溃
shiqizhenyes Jan 4, 2022
704ce9c
update to 2.0.2
shiqizhenyes Jan 4, 2022
3e61468
Merge pull request #8 from shiqizhenyes/fix
graycreate Jan 11, 2022
a1cb131
首页发现列表整合今日热点
shiqizhenyes Jan 18, 2022
2c2a506
修复小米手机长按话题评论链接崩溃
shiqizhenyes Jan 4, 2022
a6dc2d5
Merge branch 'pre-merge' into develop
shiqizhenyes Jan 18, 2022
aad24c1
Merge branch 'v2er-app:main' into main
shiqizhenyes Jan 18, 2022
865c5a5
优化context 判空
shiqizhenyes Jan 18, 2022
d1f4b29
Merge branch 'develop' of https://github.com/shiqizhenyes/Android int…
shiqizhenyes Jan 18, 2022
63600de
去除无用代码
shiqizhenyes Jan 18, 2022
a4666d3
Merge pull request #9 from shiqizhenyes/develop
graycreate Jan 23, 2022
e0fa2b3
update minepage ui
Jan 23, 2022
35fe352
update icon
Jan 23, 2022
d1b1b74
移除页面中的谷歌广告
shiqizhenyes Mar 24, 2022
9e95153
优化去除广告逻辑
shiqizhenyes Mar 24, 2022
f5a9b60
Merge branch 'main' into develop
shiqizhenyes Mar 24, 2022
9418444
添加签到和自动签到功能
shiqizhenyes Mar 28, 2022
191a18c
Merge branch 'pre-merge' into develop
shiqizhenyes Mar 28, 2022
2f42433
2.0.0-alpha
Mar 28, 2022
c78408a
update to 2.1.0-alpha
Mar 28, 2022
27acd4a
update to 2.1.0-alpha
Mar 28, 2022
907eea7
修复点击签到按钮失效
shiqizhenyes Mar 29, 2022
b2ca00b
Merge branch 'develop' of https://github.com/shiqizhenyes/Android int…
shiqizhenyes Mar 29, 2022
0fd099c
隐藏主题
shiqizhenyes Mar 29, 2022
a92439e
优化发现和通知页面显示效果
shiqizhenyes Mar 29, 2022
0c19bce
优化我的页面显示效果
shiqizhenyes Mar 31, 2022
7a976f9
添加首页通知小红点
shiqizhenyes Apr 15, 2022
a468a27
update
Apr 15, 2022
fee26f3
Merge branch 'release_alpha' into develop
graycreate Apr 15, 2022
2f7a55f
Merge pull request #13 from shiqizhenyes/develop
graycreate Apr 15, 2022
32a4333
Bump versionCode and update versionName
shiqizhenyes Apr 16, 2022
aaf6fb3
Landscape display adaptation
shiqizhenyes Apr 22, 2022
e2a64a0
Merge branch 'develop' of https://github.com/shiqizhenyes/Android int…
shiqizhenyes Apr 22, 2022
e07c4bb
Bump versionCode and update versionName
shiqizhenyes Apr 16, 2022
29f74d1
Fix the color problem of some controls in dark mode
shiqizhenyes Apr 22, 2022
5656451
Remove test code
shiqizhenyes Apr 22, 2022
5b91654
Fix the color problem of edit text widget
shiqizhenyes Apr 23, 2022
3924c47
Fix Today's Hot Topics bug
shiqizhenyes Apr 23, 2022
8d56d7d
Merge pull request #16 from shiqizhenyes/develop
graycreate Apr 23, 2022
5c665f4
Bump versionCode and update versionName
shiqizhenyes Apr 23, 2022
e739383
Fix some topic page crashes
shiqizhenyes May 14, 2022
e03cbde
Fix the failure of setting the reply button in the lower right corner…
shiqizhenyes May 14, 2022
ce108b6
Bump versionCode and update versionName
shiqizhenyes May 14, 2022
d16f25c
Merge branch 'develop' into release_alpha
shiqizhenyes May 14, 2022
bc23582
Bump versionCode and update versionName
shiqizhenyes May 14, 2022
002976d
Fix a request rejection error in the favorite topics and follow inter…
shiqizhenyes Mar 4, 2023
d40a99a
Bump versionCode and update versionName
shiqizhenyes Mar 4, 2023
4d6255c
Fix some topic image loading exceptions
shiqizhenyes Mar 21, 2023
7d7e03f
Bump versionCode and update versionName
shiqizhenyes Mar 21, 2023
b9df926
Update the readme
graycreate Apr 8, 2023
410b6c5
upgrade gradle
shiqizhenyes Apr 24, 2023
be0a8e8
fix email issue
shiqizhenyes Apr 24, 2023
ab24706
Bump versionCode and update versionName
shiqizhenyes Apr 24, 2023
00f3aca
Merge pull request #25 from shiqizhenyes/release_alpha
shiqizhenyes Apr 24, 2023
cee8a96
feat: 适配Themed Icon
Mystery00 May 3, 2023
5161a0f
Merge pull request #27 from Mystery00/main
graycreate May 8, 2023
0623ffd
Merge pull request #26 from v2er-app/release_alpha
graycreate May 8, 2023
0afb507
Update README.md
graycreate May 14, 2023
59d207f
Merge pull request #28 from v2er-app/graycreate-patch-1
graycreate May 14, 2023
f0a8316
docs: update README.md [skip ci]
allcontributors[bot] May 14, 2023
1124d46
docs: create .all-contributorsrc [skip ci]
allcontributors[bot] May 14, 2023
f0f7e4a
Merge pull request #29 from v2er-app/all-contributors/add-graycreate
graycreate May 14, 2023
b1c1a38
docs: update README.md [skip ci]
allcontributors[bot] May 14, 2023
5abdf6d
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] May 14, 2023
3cabb69
Merge pull request #30 from v2er-app/all-contributors/add-shiqizhenyes
graycreate May 14, 2023
d63748a
docs: update README.md [skip ci]
allcontributors[bot] May 14, 2023
2a204a3
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] May 14, 2023
4577c5a
Merge pull request #31 from v2er-app/all-contributors/add-Mystery00
graycreate May 14, 2023
8405e3b
update README.md
shiqizhenyes May 24, 2023
1881df7
Merge pull request #32 from shiqizhenyes/main
graycreate Jul 1, 2023
c60e99e
Update README.md
graycreate Jul 20, 2023
48aad58
add privicy policy
graycreate Aug 12, 2023
c208249
Create android.yml
graycreate Aug 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"commitConvention": "angular",
"contributors": [
{
"login": "graycreate",
"name": "GRAY",
"avatar_url": "https://avatars.githubusercontent.com/u/5203798?v=4",
"profile": "https://github.com/graycreate",
"contributions": [
"code"
]
},
{
"login": "shiqizhenyes",
"name": "zack",
"avatar_url": "https://avatars.githubusercontent.com/u/10935531?v=4",
"profile": "http://sqz.mobi",
"contributions": [
"code"
]
},
{
"login": "Mystery00",
"name": "Mystery0 M",
"avatar_url": "https://avatars.githubusercontent.com/u/19162205?v=4",
"profile": "https://blog.mystery0.vip",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
"skipCi": true,
"repoType": "github",
"repoHost": "https://github.com",
"projectName": "Android",
"projectOwner": "v2er-app"
}
26 changes: 26 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Android CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
37 changes: 33 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,41 @@
# V2er-Android
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
A beautiful V2EX client built for Android platform.

You could download it from [Google Play](https://play.google.com/store/apps/details?id=me.ghui.v2er) or [CoolApk](https://www.coolapk.com/apk/155428)
You could download it from [Google Play](https://play.google.com/store/apps/details?id=me.ghui.v2er)

![GooglePlay.png](https://s2.loli.net/2021/12/09/zHc68PgFmvMNOZh.png)
![Preview.png](./v2er-preview.png)

# Contribute
TODO
## Contributors

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/graycreate"><img src="https://avatars.githubusercontent.com/u/5203798?v=4?s=100" width="100px;" alt="GRAY"/><br /><sub><b>GRAY</b></sub></a><br /><a href="https://github.com/v2er-app/Android/commits?author=graycreate" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/shiqizhenyes"><img src="https://avatars.githubusercontent.com/u/10935531?v=4?s=100" width="100px;" alt="zack"/><br /><sub><b>zack</b></sub></a><br /><a href="https://github.com/v2er-app/Android/commits?author=shiqizhenyes" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://blog.mystery0.vip"><img src="https://avatars.githubusercontent.com/u/19162205?v=4?s=100" width="100px;" alt="Mystery0 M"/><br /><sub><b>Mystery0 M</b></sub></a><br /><a href="https://github.com/v2er-app/Android/commits?author=Mystery00" title="Code">💻</a></td>
</tr>
</tbody>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

For details please visit [insights](https://github.com/v2er-app/Android/graphs/contributors)

# Licensing
The source code is licensed under GPL. License is available [here](./LICENSE).
9 changes: 7 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@ apply plugin: 'com.android.application'
//apply plugin: "com.flurry.android.symbols"

android {
compileSdkVersion 30
compileSdkVersion 33
defaultConfig {
applicationId "me.ghui.v2er"
minSdkVersion 27
targetSdkVersion 30
targetSdkVersion 33
versionCode rootProject.ext.app.versionCode
versionName rootProject.ext.app.versionName
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
manifestPlaceholders = [
APPLICATION_ID: applicationId
]
}
signingConfigs {
release {
Expand Down Expand Up @@ -58,6 +61,7 @@ android {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.google.code.findbugs'
Expand All @@ -72,6 +76,7 @@ dependencies {
implementation 'androidx.palette:palette:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.android:flexbox:0.2.6'
implementation "com.google.android.material:material:1.4.0"
implementation "androidx.annotation:annotation:1.2.0"
// 3rd part Dependencies...
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
Expand Down
43 changes: 16 additions & 27 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
<?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="me.ghui.v2er">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"
tools:ignore="QueryAllPackagesPermission" />

<application
android:name=".general.App"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:theme="@style/DayTheme">
<meta-data
android:name="android.max_aspect"
android:value="2.1" />
<provider
android:name="me.ghui.v2er.general.ImgFileProvider"
android:authorities="@string/glide_img_provider"
android:name=".general.ImgFileProvider"
android:authorities="${APPLICATION_ID}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
Expand All @@ -27,8 +30,8 @@

<activity
android:name=".module.general.RouteActivity"
android:screenOrientation="portrait"
android:theme="@style/SplashTheme">
android:theme="@style/SplashTheme"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down Expand Up @@ -59,66 +62,52 @@
</activity>
<activity
android:name=".module.home.MainActivity"
android:screenOrientation="portrait"
android:theme="@style/NoneSlideBackableTheme" />
<activity
android:name=".module.drawer.dailyhot.DailyHotActivity"
android:label="@string/page_daily_hot"
android:screenOrientation="portrait" />
android:label="@string/page_daily_hot" />
<activity
android:name=".module.shortcuts.DailyHotShortcut"
android:label="@string/page_daily_hot"
android:screenOrientation="portrait"
android:theme="@style/NoneSlideBackableTheme"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".module.create.CreateTopicActivity"
android:label="@string/page_create_topic"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".module.shortcuts.CreateTopicShortcut"
android:label="@string/page_create_topic"
android:screenOrientation="portrait"
android:theme="@style/NoneSlideBackableTheme" />
<activity
android:name=".module.topic.TopicActivity"
android:label="话题"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name=".module.login.LoginActivity"
android:label="登录V2EX"
android:screenOrientation="portrait" />
android:label="登录V2EX" />
<activity
android:name=".module.login.TwoStepLoginActivity"
android:label="两步验证"
android:screenOrientation="portrait" />
android:label="两步验证" />
<activity
android:name=".module.login.SignInWithGoogleActivity"
android:label="Sign in With Google"
android:screenOrientation="portrait" />
android:label="Sign in With Google" />
<activity
android:name=".module.user.UserHomeActivity"
android:label="主页"
android:screenOrientation="portrait" />
android:label="主页" />
<activity
android:name=".module.drawer.care.SpecialCareActivity"
android:label="特别关注"
android:screenOrientation="portrait" />
android:label="特别关注" />
<activity
android:name=".module.drawer.star.StarActivity"
android:label="收藏"
android:screenOrientation="portrait" />
android:label="收藏" />
<activity
android:name=".module.shortcuts.StarTopicShortcut"
android:label="收藏"
android:screenOrientation="portrait"
android:theme="@style/NoneSlideBackableTheme" />
<activity
android:name=".module.node.NodeTopicActivity"
android:label="节点"
android:screenOrientation="portrait" />
android:label="节点" />
<activity
android:name=".module.general.WapActivity"
android:label="" />
Expand Down
29 changes: 29 additions & 0 deletions app/src/main/assets/v2ex.com.cer
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-----BEGIN CERTIFICATE-----
MIIFCjCCBLGgAwIBAgIQDDQDGM1v+PJ15gZd51KyYzAKBggqhkjOPQQDAjBKMQsw
CQYDVQQGEwJVUzEZMBcGA1UEChMQQ2xvdWRmbGFyZSwgSW5jLjEgMB4GA1UEAxMX
Q2xvdWRmbGFyZSBJbmMgRUNDIENBLTMwHhcNMjIwNTAxMDAwMDAwWhcNMjMwNTAx
MjM1OTU5WjBoMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQG
A1UEBxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQQ2xvdWRmbGFyZSwgSW5jLjER
MA8GA1UEAxMIdjJleC5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQa3Xed
Yo0WA1IiCBkOo7jsJFV/iyI34W+WbQ72CqT54tGbN4Dh75Cb3XZVlPF6CVwPOfhN
Guf1DNLe8pMWT5sco4IDWTCCA1UwHwYDVR0jBBgwFoAUpc436uuwdQ6UZ4i0RfrZ
JBCHlh8wHQYDVR0OBBYEFDDEWpUY1uZB2VTEKMdyTWbWOXOXMB8GA1UdEQQYMBaC
CioudjJleC5jb22CCHYyZXguY29tMA4GA1UdDwEB/wQEAwIHgDAdBgNVHSUEFjAU
BggrBgEFBQcDAQYIKwYBBQUHAwIwewYDVR0fBHQwcjA3oDWgM4YxaHR0cDovL2Ny
bDMuZGlnaWNlcnQuY29tL0Nsb3VkZmxhcmVJbmNFQ0NDQS0zLmNybDA3oDWgM4Yx
aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0Nsb3VkZmxhcmVJbmNFQ0NDQS0zLmNy
bDA+BgNVHSAENzA1MDMGBmeBDAECAjApMCcGCCsGAQUFBwIBFhtodHRwOi8vd3d3
LmRpZ2ljZXJ0LmNvbS9DUFMwdgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhho
dHRwOi8vb2NzcC5kaWdpY2VydC5jb20wQAYIKwYBBQUHMAKGNGh0dHA6Ly9jYWNl
cnRzLmRpZ2ljZXJ0LmNvbS9DbG91ZGZsYXJlSW5jRUNDQ0EtMy5jcnQwDAYDVR0T
AQH/BAIwADCCAX4GCisGAQQB1nkCBAIEggFuBIIBagFoAHYArfe++nz/EMiLnT2c
Hj4YarRnKV3PsQwkyoWGNOvcgooAAAGAfVYWOQAABAMARzBFAiEAr8T/GHTEZ5ST
FAd9K5krr4KkwBLRmrVJgTxJrodC1PUCIHYVe+eHWr12bt+FYd6ei3pIpJLIg9oX
/HyWznIKy1l3AHYANc8ZG7+xbFe/D61MbULLu7YnICZR6j/hKu+oA8M71kwAAAGA
fVYWIAAABAMARzBFAiEAu4gv2QeBcejY2pm7uupdyFNDSA+vksdk2WK6FEXcBtkC
IFPdKOugZw3f4dO5wvz2iFqDz/CJ862G/6hPFGaYPbm3AHYAs3N3B+GEUPhjhtYF
qdwRCUp5LbFnDAuH3PADDnk2pZoAAAGAfVYWUgAABAMARzBFAiB0fFp55Dbc4sA3
LYC0zO6rhlI8q1aFF3p8VDdeeBXCAAIhAI6+C33azX4d+rg18TTMCBIF+bXtiztx
fjO5Lp/uPso0MAoGCCqGSM49BAMCA0cAMEQCIApn7EQolzU9Qeexj0S/XWw7UB5n
C/iL4PezrNnbjmqfAiB6sodlkyGMV8kUtuv9aRVkhSFkge630DbVm1Dhfb2aqg==
-----END CERTIFICATE-----
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ private DayNightModeEvent(@DarkModelUtils.DayNightMode int mode) {
this.mode = mode;
}

public int getMode() {
public @DarkModelUtils.DayNightMode int getMode() {
return mode;
}

Expand Down
5 changes: 5 additions & 0 deletions app/src/main/java/me/ghui/v2er/general/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import android.app.Application;
import android.preference.PreferenceManager;
import android.util.Log;

import androidx.annotation.Nullable;

import com.flurry.android.FlurryAgent;
Expand All @@ -13,6 +15,8 @@
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;

import java.util.Calendar;

import io.reactivex.plugins.RxJavaPlugins;
import me.ghui.v2er.BuildConfig;
import me.ghui.v2er.R;
Expand All @@ -32,6 +36,7 @@ public class App extends Application {
private static App sInstance;
private AppComponent mAppComponent;
private IWXAPI mWechat;
public int unReadMsgCount = 0;

public static App get() {
return sInstance;
Expand Down
23 changes: 23 additions & 0 deletions app/src/main/java/me/ghui/v2er/general/Navigator.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@
import android.content.Context;
import android.content.Intent;
import androidx.core.app.ActivityOptionsCompat;
import androidx.core.util.Pair;

import android.view.View;

import java.io.Serializable;
import java.lang.ref.WeakReference;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;


/**
Expand Down Expand Up @@ -75,6 +81,23 @@ public Navigator addFlag(int flag) {
return this;
}

public Navigator shareElement(View... sourceViews) {
Pair<View, String>[] sharedElements;
List<View> sourceViewList = new ArrayList<>(sourceViews.length);
Collections.addAll(sourceViewList, sourceViews);
sourceViewList.removeIf(sourceView -> sourceView.getTransitionName() == null || sourceView.getTransitionName().isEmpty());
sharedElements = new Pair[sourceViewList.size()];
for (int i = 0; i < sourceViewList.size(); i++) {
sharedElements[i] = new Pair<>(sourceViewList.get(i),
sourceViewList.get(i).getTransitionName());
}
if (sharedElements.length > 0) {
mOptionsCompat = ActivityOptionsCompat.
makeSceneTransitionAnimation((Activity) mFrom.get(), sharedElements);
}
return this;
}

public Navigator shareElement(View sourceView) {
if (sourceView != null && sourceView.getTransitionName() != null) {
mOptionsCompat = ActivityOptionsCompat.
Expand Down
Loading