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
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
91 additions
and
9 deletions
+91
-9
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
+59
-3
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() {
...
@@ -13,8 +13,8 @@ def releaseTime() {
android
{
android
{
compileSdkVersion
config
.
compileSdkVersion
compileSdkVersion
config
.
compileSdkVersion
defaultConfig
{
defaultConfig
{
// applicationId "com.qiuju.live.app"
applicationId
"com.qiuju.app"
applicationId
"com.qiuju.app"
// applicationId "com.hslive.app"
minSdkVersion
config
.
minSdkVersion
minSdkVersion
config
.
minSdkVersion
targetSdkVersion
config
.
targetSdkVersion
targetSdkVersion
config
.
targetSdkVersion
versionCode
config
.
versionCode
versionCode
config
.
versionCode
...
...
app/src/main/AndroidManifest.xml
View file @
f429a202
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
<!-- android:authorities="com.hslive.app.FileProvider"-->
<!-- android:authorities="com.hslive.app.FileProvider"-->
<provider
<provider
android:name=
"androidx.core.content.FileProvider"
android:name=
"androidx.core.content.FileProvider"
android:authorities=
"
com.qiuju.app
.FileProvider"
android:authorities=
"
${applicationId}
.FileProvider"
android:exported=
"false"
android:exported=
"false"
android:grantUriPermissions=
"true"
>
android:grantUriPermissions=
"true"
>
<meta-data
<meta-data
...
...
app/src/main/java/com/hupu/tv/player/app/ui/activity/MainActivity.kt
View file @
f429a202
...
@@ -46,6 +46,13 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
...
@@ -46,6 +46,13 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
private
lateinit
var
haveAvatar
:
ImageView
private
lateinit
var
haveAvatar
:
ImageView
private
var
oldSelected
=
0
private
var
oldSelected
=
0
private
var
mFragment
:
ArrayList
<
Fragment
>
=
private
var
mFragment
:
ArrayList
<
Fragment
>
=
if
(
VersionControl
.
isXiaomi
())
{
arrayListOf
(
MatchFragment
.
newInstance
(),
MainFragment
.
newInstance
(),
NewMineFragment
.
newInstance
()
)
}
else
{
if
(
VersionControl
.
showRedList
())
{
if
(
VersionControl
.
showRedList
())
{
arrayListOf
(
arrayListOf
(
MatchFragment
.
newInstance
(),
MatchFragment
.
newInstance
(),
...
@@ -62,6 +69,7 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
...
@@ -62,6 +69,7 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
NewMineFragment
.
newInstance
()
NewMineFragment
.
newInstance
()
)
)
}
}
}
override
val
layoutId
:
Int
override
val
layoutId
:
Int
...
@@ -128,13 +136,18 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
...
@@ -128,13 +136,18 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
fun
toMineFragment
()
{
fun
toMineFragment
()
{
if
(
UserHelper
.
isLogin
())
{
if
(
UserHelper
.
isLogin
())
{
if
(
VersionControl
.
showRedList
()){
if
(
VersionControl
.
isXiaomi
())
{
mTabLayout
.
currentTab
=
2
mViewPager
.
currentItem
=
2
}
else
{
if
(
VersionControl
.
showRedList
())
{
mTabLayout
.
currentTab
=
4
mTabLayout
.
currentTab
=
4
mViewPager
.
currentItem
=
4
mViewPager
.
currentItem
=
4
}
else
{
}
else
{
mTabLayout
.
currentTab
=
3
mTabLayout
.
currentTab
=
3
mViewPager
.
currentItem
=
3
mViewPager
.
currentItem
=
3
}
}
}
}
else
{
}
else
{
...
@@ -159,6 +172,13 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
...
@@ -159,6 +172,13 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
mViewPager
.
offscreenPageLimit
=
mFragment
.
size
mViewPager
.
offscreenPageLimit
=
mFragment
.
size
mViewPager
.
adapter
=
adapter
mViewPager
.
adapter
=
adapter
val
mTitles
=
val
mTitles
=
if
(
VersionControl
.
isXiaomi
())
{
arrayOf
(
getString
(
R
.
string
.
string_main_schedule
),
getString
(
R
.
string
.
string_main_home
),
getString
(
R
.
string
.
string_main_mine
)
)
}
else
{
if
(
VersionControl
.
showRedList
())
{
if
(
VersionControl
.
showRedList
())
{
arrayOf
(
arrayOf
(
getString
(
R
.
string
.
string_main_schedule
),
getString
(
R
.
string
.
string_main_schedule
),
...
@@ -175,9 +195,17 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
...
@@ -175,9 +195,17 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
getString
(
R
.
string
.
string_main_mine
)
getString
(
R
.
string
.
string_main_mine
)
)
)
}
}
}
val
mIconUnSelectIds
=
val
mIconUnSelectIds
=
if
(
VersionControl
.
isXiaomi
())
{
intArrayOf
(
R
.
mipmap
.
icon_main_match_nomal
,
R
.
mipmap
.
icon_main_live_normal
,
R
.
mipmap
.
icon_main_mine_normal
)
}
else
{
if
(
VersionControl
.
showRedList
())
{
if
(
VersionControl
.
showRedList
())
{
intArrayOf
(
intArrayOf
(
R
.
mipmap
.
icon_main_match_nomal
,
R
.
mipmap
.
icon_main_match_nomal
,
...
@@ -194,9 +222,17 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
...
@@ -194,9 +222,17 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
R
.
mipmap
.
icon_main_mine_normal
R
.
mipmap
.
icon_main_mine_normal
)
)
}
}
}
val
mIconSelectIds
=
val
mIconSelectIds
=
if
(
VersionControl
.
isXiaomi
())
{
intArrayOf
(
R
.
mipmap
.
icon_main_match_select
,
R
.
mipmap
.
icon_main_live_selected
,
R
.
mipmap
.
icon_main_mine_selected
)
}
else
{
if
(
VersionControl
.
showRedList
())
{
if
(
VersionControl
.
showRedList
())
{
intArrayOf
(
intArrayOf
(
R
.
mipmap
.
icon_main_match_select
,
R
.
mipmap
.
icon_main_match_select
,
...
@@ -213,6 +249,8 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
...
@@ -213,6 +249,8 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
R
.
mipmap
.
icon_main_mine_selected
R
.
mipmap
.
icon_main_mine_selected
)
)
}
}
}
val
mTabEntities
=
ArrayList
<
CustomTabEntity
>()
val
mTabEntities
=
ArrayList
<
CustomTabEntity
>()
for
(
i
in
mTitles
.
indices
)
{
for
(
i
in
mTitles
.
indices
)
{
...
@@ -222,7 +260,11 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
...
@@ -222,7 +260,11 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
mTabLayout
.
setOnTabSelectListener
(
object
:
OnTabSelectListener
{
mTabLayout
.
setOnTabSelectListener
(
object
:
OnTabSelectListener
{
override
fun
onTabSelect
(
position
:
Int
)
{
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
(
position
==
userPosition
)
{
if
(
SPUtil
[
Constants
.
USER_LOGIN
,
false
]
==
true
)
{
if
(
SPUtil
[
Constants
.
USER_LOGIN
,
false
]
==
true
)
{
oldSelected
=
position
oldSelected
=
position
...
@@ -239,8 +281,16 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
...
@@ -239,8 +281,16 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
override
fun
onTabReselect
(
position
:
Int
)
{}
override
fun
onTabReselect
(
position
:
Int
)
{}
})
})
if
(
VersionControl
.
isXiaomi
()){
mTabLayout
.
currentTab
=
0
mViewPager
.
currentItem
=
0
}
else
{
mTabLayout
.
currentTab
=
2
mTabLayout
.
currentTab
=
2
mViewPager
.
currentItem
=
2
mViewPager
.
currentItem
=
2
}
}
}
...
@@ -282,10 +332,16 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
...
@@ -282,10 +332,16 @@ class MainActivity : RefreshActivity<IBasePresenter>(), IBaseDisplay {
@Subscribe
(
threadMode
=
ThreadMode
.
MAIN
,
sticky
=
true
,
priority
=
1
)
@Subscribe
(
threadMode
=
ThreadMode
.
MAIN
,
sticky
=
true
,
priority
=
1
)
fun
onEventRefreshUser
(
event
:
UserExitEvent
)
{
fun
onEventRefreshUser
(
event
:
UserExitEvent
)
{
if
(
VersionControl
.
isXiaomi
()){
mViewPager
.
currentItem
=
0
mTabLayout
.
currentTab
=
0
}
else
{
mViewPager
.
currentItem
=
2
mViewPager
.
currentItem
=
2
mTabLayout
.
currentTab
=
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>(),
...
@@ -194,7 +194,8 @@ class MatchContentFragment : RefreshVP2Fragment<MatchContentPresenter>(),
contentAdapter
.
data
.
forEachIndexed
{
index
,
matchInfoEntity
->
contentAdapter
.
data
.
forEachIndexed
{
index
,
matchInfoEntity
->
if
(
matchInfoEntity
.
id
==
id
)
{
if
(
matchInfoEntity
.
id
==
id
)
{
matchInfoEntity
.
subscribe
=
status
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 {
...
@@ -28,9 +28,13 @@ object VersionControl {
return
SPUtil
[
Constants
.
SHOW_LIVE_CONFIG
,
false
]
as
Boolean
return
SPUtil
[
Constants
.
SHOW_LIVE_CONFIG
,
false
]
as
Boolean
}
}
fun
isXiaomi
():
Boolean
{
return
BuildConfig
.
FLAVOR
==
XIAOMI
}
fun
saveConfig
(
showConfig
:
Boolean
)
{
fun
saveConfig
(
showConfig
:
Boolean
)
{
when
(
BuildConfig
.
FLAVOR
)
{
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
,
Constants
.
SHOW_LIVE_CONFIG
,
showConfig
showConfig
)
)
...
@@ -39,11 +43,11 @@ object VersionControl {
...
@@ -39,11 +43,11 @@ object VersionControl {
}
}
fun
showIndex
():
Boolean
{
fun
showIndex
():
Boolean
{
return
isShowLive
()
return
isShowLive
()
&&
!
isXiaomi
()
}
}
fun
showRedList
():
Boolean
{
fun
showRedList
():
Boolean
{
return
isShowLive
()
return
isShowLive
()
&&
!
isXiaomi
()
}
}
fun
getCurrentFlavor
():
String
{
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