Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
Project
Project
Details
Activity
Releases
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
android
android_vedio
Commits
e286f970
Commit
e286f970
authored
Jul 13, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
0b13b4f4
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
37 additions
and
18 deletions
+37
-18
Constant.kt
...pp/src/main/java/com/mints/wisdomclean/common/Constant.kt
+1
-1
TrackManager.java
...main/java/com/mints/wisdomclean/manager/TrackManager.java
+5
-0
VedioBean.java
.../main/java/com/mints/wisdomclean/mvp/model/VedioBean.java
+10
-1
SplashActivity.kt
...java/com/mints/wisdomclean/ui/activitys/SplashActivity.kt
+3
-3
SplashAdActivity.kt
...va/com/mints/wisdomclean/ui/activitys/SplashAdActivity.kt
+3
-2
VipActivity.kt
...in/java/com/mints/wisdomclean/ui/activitys/VipActivity.kt
+0
-1
HotStyleAdapter.kt
.../java/com/mints/wisdomclean/ui/adapter/HotStyleAdapter.kt
+1
-1
WatchRecordAdapter.kt
...va/com/mints/wisdomclean/ui/adapter/WatchRecordAdapter.kt
+1
-1
MainFragment.kt
...in/java/com/mints/wisdomclean/ui/fragment/MainFragment.kt
+11
-6
item_hot_style.xml
video/app/src/main/res/layout/item_hot_style.xml
+1
-1
item_rv_top.xml
video/app/src/main/res/layout/item_rv_top.xml
+1
-1
No files found.
video/app/src/main/java/com/mints/wisdomclean/common/Constant.kt
View file @
e286f970
...
@@ -14,7 +14,7 @@ object Constant {
...
@@ -14,7 +14,7 @@ object Constant {
const
val
LOAN_PERMISSION_FLAG
=
"loan_permission_flag"
const
val
LOAN_PERMISSION_FLAG
=
"loan_permission_flag"
const
val
FIRST_SPLASH
=
"first_splash"
const
val
FIRST_SPLASH
=
"first_splash"
const
val
IS_FIRST_AGREE_BTN
=
"is_first_agree_btn"
const
val
IS_FIRST_AGREE_BTN
=
"is_first_agree_btn"
const
val
IS_FIRST_VIP_
BTN
=
"is_first_agree_btn
"
const
val
IS_FIRST_VIP_
NUM
=
"is_first_agree_num
"
const
val
TAG_NAME
=
"SUN"
const
val
TAG_NAME
=
"SUN"
const
val
MINTS_APP_NAME
=
"河狸短视频"
const
val
MINTS_APP_NAME
=
"河狸短视频"
const
val
MINTS_PKG_NAME
=
"com.mints.wisdomclean"
const
val
MINTS_PKG_NAME
=
"com.mints.wisdomclean"
...
...
video/app/src/main/java/com/mints/wisdomclean/manager/TrackManager.java
View file @
e286f970
...
@@ -54,4 +54,9 @@ public class TrackManager {
...
@@ -54,4 +54,9 @@ public class TrackManager {
}
}
}
}
public
void
getMyInfo
()
{
if
(
trackPresenter
!=
null
)
{
trackPresenter
.
getMyInfo
();
}
}
}
}
video/app/src/main/java/com/mints/wisdomclean/mvp/model/VedioBean.java
View file @
e286f970
...
@@ -21,7 +21,8 @@ public class VedioBean implements Serializable {
...
@@ -21,7 +21,8 @@ public class VedioBean implements Serializable {
private
String
scriptName
;
private
String
scriptName
;
private
String
scriptAuthor
;
private
String
scriptAuthor
;
private
int
vedioId
;
// 视频id,服务器标识
private
int
vedioId
;
// 视频id,服务器标识
private
String
hot
;
// 播放量
private
String
hot
;
// 收藏量
private
String
showNum
;
// 播放量
private
int
adGiveVedioNum
;
// 广告解锁数量
private
int
adGiveVedioNum
;
// 广告解锁数量
private
String
recommendUrl
;
// 推荐视频地址
private
String
recommendUrl
;
// 推荐视频地址
private
int
recommendIndex
;
// 推荐视频第几集
private
int
recommendIndex
;
// 推荐视频第几集
...
@@ -29,6 +30,14 @@ public class VedioBean implements Serializable {
...
@@ -29,6 +30,14 @@ public class VedioBean implements Serializable {
private
boolean
checked
;
// 选中
private
boolean
checked
;
// 选中
private
int
tipMaxIndex
;
// 倒计时弹框
private
int
tipMaxIndex
;
// 倒计时弹框
public
String
getShowNum
()
{
return
showNum
;
}
public
void
setShowNum
(
String
showNum
)
{
this
.
showNum
=
showNum
;
}
public
int
getTipMaxIndex
()
{
public
int
getTipMaxIndex
()
{
return
tipMaxIndex
;
return
tipMaxIndex
;
}
}
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/activitys/SplashActivity.kt
View file @
e286f970
...
@@ -12,7 +12,6 @@ import com.mints.wisdomclean.common.Constant.PRIVACY_URL
...
@@ -12,7 +12,6 @@ import com.mints.wisdomclean.common.Constant.PRIVACY_URL
import
com.mints.wisdomclean.common.Constant.REGISTER_URL
import
com.mints.wisdomclean.common.Constant.REGISTER_URL
import
com.mints.wisdomclean.manager.TrackManager
import
com.mints.wisdomclean.manager.TrackManager
import
com.mints.wisdomclean.manager.UserManager
import
com.mints.wisdomclean.manager.UserManager
import
com.mints.wisdomclean.ui.activitys.WebActivity
import
com.mints.wisdomclean.ui.activitys.base.BaseActivity
import
com.mints.wisdomclean.ui.activitys.base.BaseActivity
import
com.mints.wisdomclean.ui.widgets.CycleProgress
import
com.mints.wisdomclean.ui.widgets.CycleProgress
import
com.mints.wisdomclean.ui.widgets.DialogListener
import
com.mints.wisdomclean.ui.widgets.DialogListener
...
@@ -145,9 +144,10 @@ class SplashActivity : BaseActivity() {
...
@@ -145,9 +144,10 @@ class SplashActivity : BaseActivity() {
private
fun
goToMainActivity
()
{
private
fun
goToMainActivity
()
{
// if (UserManager.getInstance().newFlag && !UserManager.getInstance().vipFlag) {
// if (UserManager.getInstance().newFlag && !UserManager.getInstance().vipFlag) {
val
vipEnter
=
AppPreferencesManager
.
get
().
getBoolean
(
Constant
.
IS_FIRST_VIP_BTN
,
false
)
var
vipEnterNum
=
AppPreferencesManager
.
get
().
getInt
(
Constant
.
IS_FIRST_VIP_NUM
,
1
)
if
(!
UserManager
.
getInstance
().
vipFlag
&&
vipEnterNum
<=
1
)
{
AppPreferencesManager
.
get
().
put
(
Constant
.
IS_FIRST_VIP_NUM
,
vipEnterNum
++)
if
(!
UserManager
.
getInstance
().
vipFlag
&&
!
vipEnter
)
{
// 匹配用户 且 不是vip
// 匹配用户 且 不是vip
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
bundle
.
putBoolean
(
VipActivity
.
IS_GUIDE
,
true
)
bundle
.
putBoolean
(
VipActivity
.
IS_GUIDE
,
true
)
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/activitys/SplashAdActivity.kt
View file @
e286f970
...
@@ -96,9 +96,10 @@ class SplashAdActivity : BaseActivity() {
...
@@ -96,9 +96,10 @@ class SplashAdActivity : BaseActivity() {
*/
*/
private
fun
goToMainActivity
()
{
private
fun
goToMainActivity
()
{
// if (UserManager.getInstance().newFlag&&!UserManager.getInstance().vipFlag) {
// if (UserManager.getInstance().newFlag&&!UserManager.getInstance().vipFlag) {
val
vipEnter
=
AppPreferencesManager
.
get
().
getBoolean
(
Constant
.
IS_FIRST_VIP_BTN
,
false
)
var
vipEnterNum
=
AppPreferencesManager
.
get
().
getInt
(
Constant
.
IS_FIRST_VIP_NUM
,
1
)
if
(!
UserManager
.
getInstance
().
vipFlag
&&
vipEnterNum
<=
1
)
{
AppPreferencesManager
.
get
().
put
(
Constant
.
IS_FIRST_VIP_NUM
,
vipEnterNum
++)
if
(!
UserManager
.
getInstance
().
vipFlag
&&
!
vipEnter
)
{
// 匹配用户 且 不是vip
// 匹配用户 且 不是vip
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
bundle
.
putBoolean
(
VipActivity
.
IS_GUIDE
,
true
)
bundle
.
putBoolean
(
VipActivity
.
IS_GUIDE
,
true
)
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/activitys/VipActivity.kt
View file @
e286f970
...
@@ -78,7 +78,6 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
...
@@ -78,7 +78,6 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
vipPresenter
.
attachView
(
this
)
vipPresenter
.
attachView
(
this
)
AppPreferencesManager
.
get
().
put
(
Constant
.
IS_FIRST_VIP_BTN
,
true
)
if
(!
TextUtils
.
isEmpty
(
UserManager
.
getInstance
().
userID
))
{
if
(!
TextUtils
.
isEmpty
(
UserManager
.
getInstance
().
userID
))
{
vipPresenter
.
getVipProducts
(
isAliPayInstalled
())
vipPresenter
.
getVipProducts
(
isAliPayInstalled
())
}
else
{
}
else
{
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/adapter/HotStyleAdapter.kt
View file @
e286f970
...
@@ -36,7 +36,7 @@ class HotStyleAdapter(val context: Context, val dataList: ArrayList<VedioBean>)
...
@@ -36,7 +36,7 @@ class HotStyleAdapter(val context: Context, val dataList: ArrayList<VedioBean>)
val
topBean
=
dataList
?.
get
(
position
)
val
topBean
=
dataList
?.
get
(
position
)
if
(
topBean
!=
null
)
{
if
(
topBean
!=
null
)
{
holder
.
tvVedioItemCount
.
text
=
holder
.
tvVedioItemCount
.
text
=
"${if (topBean.completeStatus == 0) "
已完结
" else "
更新至$
{
topBean
.
vedioTotal
}
"}"
"${if (topBean.completeStatus == 0) "
已完结
" else "
更新至$
{
topBean
.
vedioTotal
}
集
"}"
holder
.
tvVedioItemTitle
.
text
=
"${topBean.title}"
holder
.
tvVedioItemTitle
.
text
=
"${topBean.title}"
holder
.
tvVedioItemText
.
text
=
"${topBean.vedioDesc}"
holder
.
tvVedioItemText
.
text
=
"${topBean.vedioDesc}"
GlideUtils
.
loadImageViewGifForFitCenter
(
GlideUtils
.
loadImageViewGifForFitCenter
(
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/adapter/WatchRecordAdapter.kt
View file @
e286f970
...
@@ -23,7 +23,7 @@ class WatchRecordAdapter :
...
@@ -23,7 +23,7 @@ class WatchRecordAdapter :
override
fun
convert
(
holder
:
BaseViewHolder
,
item
:
VedioBean
)
{
override
fun
convert
(
holder
:
BaseViewHolder
,
item
:
VedioBean
)
{
GlideUtils
.
loadImageViewNoAnim2
(
context
,
item
.
coverImage
,
holder
.
getView
(
R
.
id
.
image_iv
))
GlideUtils
.
loadImageViewNoAnim2
(
context
,
item
.
coverImage
,
holder
.
getView
(
R
.
id
.
image_iv
))
holder
.
getView
<
TextView
>(
R
.
id
.
title_tv
).
text
=
item
.
title
holder
.
getView
<
TextView
>(
R
.
id
.
title_tv
).
text
=
item
.
title
holder
.
getView
<
TextView
>(
R
.
id
.
info_tv
).
text
=
item
.
vedioDesc
holder
.
getView
<
TextView
>(
R
.
id
.
info_tv
).
text
=
"观看至第${item.seeIndex}集"
if
(
item
.
collect
==
0
)
{
if
(
item
.
collect
==
0
)
{
// 未收藏
// 未收藏
...
...
video/app/src/main/java/com/mints/wisdomclean/ui/fragment/MainFragment.kt
View file @
e286f970
...
@@ -16,6 +16,7 @@ import com.mints.wisdomclean.R
...
@@ -16,6 +16,7 @@ import com.mints.wisdomclean.R
import
com.mints.wisdomclean.common.AppConfig
import
com.mints.wisdomclean.common.AppConfig
import
com.mints.wisdomclean.common.Constant
import
com.mints.wisdomclean.common.Constant
import
com.mints.wisdomclean.manager.LocalVedioManager
import
com.mints.wisdomclean.manager.LocalVedioManager
import
com.mints.wisdomclean.manager.TrackManager
import
com.mints.wisdomclean.manager.UserManager
import
com.mints.wisdomclean.manager.UserManager
import
com.mints.wisdomclean.mvp.model.*
import
com.mints.wisdomclean.mvp.model.*
import
com.mints.wisdomclean.mvp.presenters.HomePresenter
import
com.mints.wisdomclean.mvp.presenters.HomePresenter
...
@@ -83,6 +84,15 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
...
@@ -83,6 +84,15 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
}
banner
?.
start
()
banner
?.
start
()
setWatchingStatus
()
setWatchingStatus
()
if
(
TextUtils
.
isEmpty
(
userManager
?.
userID
))
{
//获取游客登录数据
homePresenter
.
userLogin
()
}
else
{
homePresenter
.
topTabs
()
homePresenter
.
orders
()
TrackManager
.
getInstance
().
getMyInfo
()
}
}
}
}
}
...
@@ -119,12 +129,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
...
@@ -119,12 +129,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
requireActivity
().
runOnUiThread
{
requireActivity
().
runOnUiThread
{
if
(
AntiShake
.
check
(
rv_main_list
?.
id
))
return
@runOnUiThread
if
(
AntiShake
.
check
(
rv_main_list
?.
id
))
return
@runOnUiThread
if
(
TextUtils
.
isEmpty
(
userManager
?.
userID
))
{
if
(!
TextUtils
.
isEmpty
(
userManager
?.
userID
))
{
//获取游客登录数据
homePresenter
.
userLogin
()
}
else
{
homePresenter
.
topTabs
()
homePresenter
.
orders
()
homePresenter
.
getHomeV1Types
()
homePresenter
.
getHomeV1Types
()
}
}
}
}
...
...
video/app/src/main/res/layout/item_hot_style.xml
View file @
e286f970
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:singleLine=
"true"
android:singleLine=
"true"
android:text=
"重生 虐恋"
android:text=
"重生 虐恋"
android:textColor=
"@color/
color_939AA3
"
android:textColor=
"@color/
gray
"
android:textSize=
"12sp"
/>
android:textSize=
"12sp"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
video/app/src/main/res/layout/item_rv_top.xml
View file @
e286f970
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:singleLine=
"true"
android:singleLine=
"true"
android:text=
"重生 虐恋"
android:text=
"重生 虐恋"
android:textColor=
"@color/
color_939AA3
"
android:textColor=
"@color/
gray
"
android:textSize=
"12sp"
/>
android:textSize=
"12sp"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
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