Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hadalive
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yichen
hadalive
Commits
f429a202
Commit
f429a202
authored
Jun 15, 2022
by
yichen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、更改build.gradle
parent
497bd738
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
135 additions
and
53 deletions
+135
-53
build.gradle
app/build.gradle
+1
-1
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+1
-1
MainActivity.kt
...n/java/com/hupu/tv/player/app/ui/activity/MainActivity.kt
+103
-47
MatchContentFragment.kt
...om/hupu/tv/player/app/ui/fragment/MatchContentFragment.kt
+2
-1
VersionControl.kt
.../main/java/com/hupu/tv/player/app/utils/VersionControl.kt
+7
-3
output.json
qj_xiaomi_01/release/output.json
+21
-0
qjLive_v1.0.0_release_qj_xiaomi_01_20220614.apk
...1/release/qjLive_v1.0.0_release_qj_xiaomi_01_20220614.apk
+0
-0
No files found.
app/build.gradle
View file @
f429a202
...
...
@@ -13,8 +13,8 @@ def releaseTime() {
android
{
compileSdkVersion
config
.
compileSdkVersion
defaultConfig
{
// applicationId "com.qiuju.live.app"
applicationId
"com.qiuju.app"
// applicationId "com.hslive.app"
minSdkVersion
config
.
minSdkVersion
targetSdkVersion
config
.
targetSdkVersion
versionCode
config
.
versionCode
...
...
app/src/main/AndroidManifest.xml
View file @
f429a202
...
...
@@ -61,7 +61,7 @@
<!-- android:authorities="com.hslive.app.FileProvider"-->
<provider
android:name=
"androidx.core.content.FileProvider"
android:authorities=
"
com.qiuju.app
.FileProvider"
android:authorities=
"
${applicationId}
.FileProvider"
android:exported=
"false"
android:grantUriPermissions=
"true"
>
<meta-data
...
...
app/src/main/java/com/hupu/tv/player/app/ui/activity/MainActivity.kt
View file @
f429a202
...
...
@@ -46,21 +46,29 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
private
lateinit
var
haveAvatar
:
ImageView
private
var
oldSelected
=
0
private
var
mFragment
:
ArrayList
<
Fragment
>
=
if
(
VersionControl
.
showRedList
())
{
if
(
VersionControl
.
isXiaomi
())
{
arrayListOf
(
MatchFragment
.
newInstance
(),
MainNewsFragment
.
newInstance
(),
MainFragment
.
newInstance
(),
MainHaveMaterialFragment
.
newInstance
(),
NewMineFragment
.
newInstance
()
)
}
else
{
arrayListOf
(
MatchFragment
.
newInstance
(),
MainNewsFragment
.
newInstance
(),
MainFragment
.
newInstance
(),
NewMineFragment
.
newInstance
()
)
if
(
VersionControl
.
showRedList
())
{
arrayListOf
(
MatchFragment
.
newInstance
(),
MainNewsFragment
.
newInstance
(),
MainFragment
.
newInstance
(),
MainHaveMaterialFragment
.
newInstance
(),
NewMineFragment
.
newInstance
()
)
}
else
{
arrayListOf
(
MatchFragment
.
newInstance
(),
MainNewsFragment
.
newInstance
(),
MainFragment
.
newInstance
(),
NewMineFragment
.
newInstance
()
)
}
}
...
...
@@ -128,12 +136,17 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
fun
toMineFragment
()
{
if
(
UserHelper
.
isLogin
())
{
if
(
VersionControl
.
showRedList
()){
mTabLayout
.
currentTab
=
4
mViewPager
.
currentItem
=
4
}
else
{
mTabLayout
.
currentTab
=
3
mViewPager
.
currentItem
=
3
if
(
VersionControl
.
isXiaomi
())
{
mTabLayout
.
currentTab
=
2
mViewPager
.
currentItem
=
2
}
else
{
if
(
VersionControl
.
showRedList
())
{
mTabLayout
.
currentTab
=
4
mViewPager
.
currentItem
=
4
}
else
{
mTabLayout
.
currentTab
=
3
mViewPager
.
currentItem
=
3
}
}
...
...
@@ -159,61 +172,86 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
mViewPager
.
offscreenPageLimit
=
mFragment
.
size
mViewPager
.
adapter
=
adapter
val
mTitles
=
if
(
VersionControl
.
showRedList
())
{
if
(
VersionControl
.
isXiaomi
())
{
arrayOf
(
getString
(
R
.
string
.
string_main_schedule
),
getString
(
R
.
string
.
string_main_news
),
getString
(
R
.
string
.
string_main_home
),
getString
(
R
.
string
.
string_main_have_material
),
getString
(
R
.
string
.
string_main_mine
)
)
}
else
{
arrayOf
(
getString
(
R
.
string
.
string_main_schedule
),
getString
(
R
.
string
.
string_main_news
),
getString
(
R
.
string
.
string_main_home
),
getString
(
R
.
string
.
string_main_mine
)
)
if
(
VersionControl
.
showRedList
())
{
arrayOf
(
getString
(
R
.
string
.
string_main_schedule
),
getString
(
R
.
string
.
string_main_news
),
getString
(
R
.
string
.
string_main_home
),
getString
(
R
.
string
.
string_main_have_material
),
getString
(
R
.
string
.
string_main_mine
)
)
}
else
{
arrayOf
(
getString
(
R
.
string
.
string_main_schedule
),
getString
(
R
.
string
.
string_main_news
),
getString
(
R
.
string
.
string_main_home
),
getString
(
R
.
string
.
string_main_mine
)
)
}
}
val
mIconUnSelectIds
=
if
(
VersionControl
.
showRedList
())
{
if
(
VersionControl
.
isXiaomi
())
{
intArrayOf
(
R
.
mipmap
.
icon_main_match_nomal
,
R
.
mipmap
.
icon_main_news_normal
,
R
.
mipmap
.
icon_main_live_normal
,
R
.
mipmap
.
icon_main_follow_normal
,
R
.
mipmap
.
icon_main_mine_normal
)
}
else
{
intArrayOf
(
R
.
mipmap
.
icon_main_match_nomal
,
R
.
mipmap
.
icon_main_news_normal
,
R
.
mipmap
.
icon_main_live_normal
,
R
.
mipmap
.
icon_main_mine_normal
)
if
(
VersionControl
.
showRedList
())
{
intArrayOf
(
R
.
mipmap
.
icon_main_match_nomal
,
R
.
mipmap
.
icon_main_news_normal
,
R
.
mipmap
.
icon_main_live_normal
,
R
.
mipmap
.
icon_main_follow_normal
,
R
.
mipmap
.
icon_main_mine_normal
)
}
else
{
intArrayOf
(
R
.
mipmap
.
icon_main_match_nomal
,
R
.
mipmap
.
icon_main_news_normal
,
R
.
mipmap
.
icon_main_live_normal
,
R
.
mipmap
.
icon_main_mine_normal
)
}
}
val
mIconSelectIds
=
if
(
VersionControl
.
showRedList
())
{
if
(
VersionControl
.
isXiaomi
())
{
intArrayOf
(
R
.
mipmap
.
icon_main_match_select
,
R
.
mipmap
.
icon_main_news_selected
,
R
.
mipmap
.
icon_main_live_selected
,
R
.
mipmap
.
icon_main_follow_selected
,
R
.
mipmap
.
icon_main_mine_selected
)
}
else
{
intArrayOf
(
R
.
mipmap
.
icon_main_match_select
,
R
.
mipmap
.
icon_main_news_selected
,
R
.
mipmap
.
icon_main_live_selected
,
R
.
mipmap
.
icon_main_mine_selected
)
if
(
VersionControl
.
showRedList
())
{
intArrayOf
(
R
.
mipmap
.
icon_main_match_select
,
R
.
mipmap
.
icon_main_news_selected
,
R
.
mipmap
.
icon_main_live_selected
,
R
.
mipmap
.
icon_main_follow_selected
,
R
.
mipmap
.
icon_main_mine_selected
)
}
else
{
intArrayOf
(
R
.
mipmap
.
icon_main_match_select
,
R
.
mipmap
.
icon_main_news_selected
,
R
.
mipmap
.
icon_main_live_selected
,
R
.
mipmap
.
icon_main_mine_selected
)
}
}
val
mTabEntities
=
ArrayList
<
CustomTabEntity
>()
for
(
i
in
mTitles
.
indices
)
{
mTabEntities
.
add
(
TabEntityBean
(
mTitles
[
i
],
mIconSelectIds
[
i
],
mIconUnSelectIds
[
i
]))
...
...
@@ -222,7 +260,11 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
mTabLayout
.
setOnTabSelectListener
(
object
:
OnTabSelectListener
{
override
fun
onTabSelect
(
position
:
Int
)
{
val
userPosition
=
if
(
VersionControl
.
showRedList
())
4
else
3
val
userPosition
=
when
{
VersionControl
.
isXiaomi
()
->
2
VersionControl
.
showRedList
()
->
4
else
->
3
}
if
(
position
==
userPosition
)
{
if
(
SPUtil
[
Constants
.
USER_LOGIN
,
false
]
==
true
)
{
oldSelected
=
position
...
...
@@ -239,8 +281,16 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
override
fun
onTabReselect
(
position
:
Int
)
{}
})
mTabLayout
.
currentTab
=
2
mViewPager
.
currentItem
=
2
if
(
VersionControl
.
isXiaomi
()){
mTabLayout
.
currentTab
=
0
mViewPager
.
currentItem
=
0
}
else
{
mTabLayout
.
currentTab
=
2
mViewPager
.
currentItem
=
2
}
}
...
...
@@ -282,8 +332,14 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
@Subscribe
(
threadMode
=
ThreadMode
.
MAIN
,
sticky
=
true
,
priority
=
1
)
fun
onEventRefreshUser
(
event
:
UserExitEvent
)
{
mViewPager
.
currentItem
=
2
mTabLayout
.
currentTab
=
2
if
(
VersionControl
.
isXiaomi
()){
mViewPager
.
currentItem
=
0
mTabLayout
.
currentTab
=
0
}
else
{
mViewPager
.
currentItem
=
2
mTabLayout
.
currentTab
=
2
}
}
...
...
app/src/main/java/com/hupu/tv/player/app/ui/fragment/MatchContentFragment.kt
View file @
f429a202
...
...
@@ -194,7 +194,8 @@ class MatchContentFragment : RefreshVP2Fragment<MatchContentPresenter>(),
contentAdapter
.
data
.
forEachIndexed
{
index
,
matchInfoEntity
->
if
(
matchInfoEntity
.
id
==
id
)
{
matchInfoEntity
.
subscribe
=
status
contentAdapter
.
notifyItemChanged
(
index
)
val
realPosition
=
if
(
currentPosition
==
2
)
index
.
plus
(
1
)
else
index
contentAdapter
.
notifyItemChanged
(
realPosition
)
}
}
}
...
...
app/src/main/java/com/hupu/tv/player/app/utils/VersionControl.kt
View file @
f429a202
...
...
@@ -28,9 +28,13 @@ object VersionControl {
return
SPUtil
[
Constants
.
SHOW_LIVE_CONFIG
,
false
]
as
Boolean
}
fun
isXiaomi
():
Boolean
{
return
BuildConfig
.
FLAVOR
==
XIAOMI
}
fun
saveConfig
(
showConfig
:
Boolean
)
{
when
(
BuildConfig
.
FLAVOR
)
{
BAIDU
,
VIVO
,
HUAWEI
,
OPPO
,
XIAOMI
,
OFFICIAL_1001
,
OFFICIAL_1002
,
OFFICIAL_1003
->
SPUtil
.
put
(
BAIDU
,
VIVO
,
HUAWEI
,
OPPO
,
OFFICIAL_1001
,
OFFICIAL_1002
,
OFFICIAL_1003
->
SPUtil
.
put
(
Constants
.
SHOW_LIVE_CONFIG
,
showConfig
)
...
...
@@ -39,11 +43,11 @@ object VersionControl {
}
fun
showIndex
():
Boolean
{
return
isShowLive
()
return
isShowLive
()
&&
!
isXiaomi
()
}
fun
showRedList
():
Boolean
{
return
isShowLive
()
return
isShowLive
()
&&
!
isXiaomi
()
}
fun
getCurrentFlavor
():
String
{
...
...
qj_xiaomi_01/release/output.json
0 → 100644
View file @
f429a202
{
"version"
:
1
,
"artifactType"
:
{
"type"
:
"APK"
,
"kind"
:
"Directory"
},
"applicationId"
:
"com.qiuju.live.app"
,
"variantName"
:
"qj_xiaomi_01Release"
,
"elements"
:
[
{
"type"
:
"SINGLE"
,
"filters"
:
[],
"properties"
:
[],
"versionCode"
:
1
,
"versionName"
:
"1"
,
"enabled"
:
true
,
"outputFile"
:
"qjLive_v1.0.0_release_qj_xiaomi_01_20220614.apk"
}
]
}
\ No newline at end of file
qj_xiaomi_01/release/qjLive_v1.0.0_release_qj_xiaomi_01_20220614.apk
0 → 100644
View file @
f429a202
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment