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
13e303fd
Commit
13e303fd
authored
Aug 09, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页展示推荐剧
parent
cfb783b7
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
274 additions
and
11 deletions
+274
-11
AndroidManifest.xml
video/app/src/main/AndroidManifest.xml
+5
-0
InMoneyVideo.java
.../main/java/com/mints/helivideo/ad/video/InMoneyVideo.java
+7
-0
InMoneyVideoNoPre.java
.../java/com/mints/helivideo/ad/video/InMoneyVideoNoPre.java
+7
-0
AppConfig.java
...p/src/main/java/com/mints/helivideo/common/AppConfig.java
+3
-0
Constant.kt
.../app/src/main/java/com/mints/helivideo/common/Constant.kt
+3
-0
LocalVedioManager.kt
...ain/java/com/mints/helivideo/manager/LocalVedioManager.kt
+14
-3
VedioBean.java
...rc/main/java/com/mints/helivideo/mvp/model/VedioBean.java
+9
-0
HomePresenter.kt
.../java/com/mints/helivideo/mvp/presenters/HomePresenter.kt
+27
-0
HomeView.kt
...p/src/main/java/com/mints/helivideo/mvp/views/HomeView.kt
+1
-0
LoanService.java
...pp/src/main/java/com/mints/helivideo/net/LoanService.java
+6
-0
RecommendActivity.kt
...ava/com/mints/helivideo/ui/activitys/RecommendActivity.kt
+73
-0
VipActivity.kt
...main/java/com/mints/helivideo/ui/activitys/VipActivity.kt
+22
-5
MainFragment.kt
...main/java/com/mints/helivideo/ui/fragment/MainFragment.kt
+63
-3
activity_recommend.xml
video/app/src/main/res/layout/activity_recommend.xml
+34
-0
No files found.
video/app/src/main/AndroidManifest.xml
View file @
13e303fd
...
...
@@ -156,6 +156,11 @@
android:exported=
"false"
android:theme=
"@style/TransparentTheme"
/>
<activity
android:name=
".ui.activitys.RecommendActivity"
android:exported=
"false"
android:theme=
"@style/TransparentTheme"
/>
<activity
android:name=
".ui.activitys.NineKnowActivity"
android:exported=
"false"
...
...
video/app/src/main/java/com/mints/helivideo/ad/video/InMoneyVideo.java
View file @
13e303fd
...
...
@@ -12,6 +12,8 @@ import com.bytedance.sdk.openadsdk.mediation.ad.MediationAdSlot;
import
com.mints.helivideo.BuildConfig
;
import
com.mints.helivideo.ad.AdManager
;
import
com.mints.helivideo.ad.AdStatusListener
;
import
com.mints.helivideo.common.Constant
;
import
com.mints.helivideo.utils.AppPreferencesManager
;
import
com.mints.helivideo.utils.LogUtil
;
import
com.mints.helivideo.utils.TimeRender
;
...
...
@@ -209,6 +211,11 @@ public class InMoneyVideo {
public
void
onAdClose
()
{
LogUtil
.
d
(
TAG
,
"gromore预加载 激励视频广告-->onAdClose"
);
int
adCount
=
AppPreferencesManager
.
INSTANCE
.
get
().
getInt
(
Constant
.
VEDIO_AD_COUNT
,
0
);
if
(
adCount
<
50
)
{
AppPreferencesManager
.
INSTANCE
.
get
().
put
(
Constant
.
VEDIO_AD_COUNT
,
adCount
++);
}
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"adcode"
,
nowAdcode
);
vo
.
put
(
"ecpm"
,
nowEcpm
);
...
...
video/app/src/main/java/com/mints/helivideo/ad/video/InMoneyVideoNoPre.java
View file @
13e303fd
...
...
@@ -12,6 +12,8 @@ import com.bytedance.sdk.openadsdk.mediation.ad.MediationAdSlot;
import
com.mints.helivideo.BuildConfig
;
import
com.mints.helivideo.ad.AdManager
;
import
com.mints.helivideo.ad.AdStatusListener
;
import
com.mints.helivideo.common.Constant
;
import
com.mints.helivideo.utils.AppPreferencesManager
;
import
com.mints.helivideo.utils.LogUtil
;
import
java.lang.ref.WeakReference
;
...
...
@@ -148,6 +150,11 @@ public class InMoneyVideoNoPre {
public
void
onAdClose
()
{
LogUtil
.
d
(
TAG
,
"gromore实时加载 激励视频广告-->onAdClose nowAdcode="
+
nowAdcode
);
int
adCount
=
AppPreferencesManager
.
INSTANCE
.
get
().
getInt
(
Constant
.
VEDIO_AD_COUNT
,
0
);
if
(
adCount
<
50
)
{
AppPreferencesManager
.
INSTANCE
.
get
().
put
(
Constant
.
VEDIO_AD_COUNT
,
adCount
++);
}
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"adcode"
,
nowAdcode
);
vo
.
put
(
"ecpm"
,
nowEcpm
);
...
...
video/app/src/main/java/com/mints/helivideo/common/AppConfig.java
View file @
13e303fd
...
...
@@ -19,4 +19,7 @@ public class AppConfig {
// 退出登录首页刷新
public
static
boolean
exitLoginMainRefresh
=
false
;
// 进入过支付界面
public
static
boolean
enterVipAct
=
false
;
}
video/app/src/main/java/com/mints/helivideo/common/Constant.kt
View file @
13e303fd
...
...
@@ -25,6 +25,9 @@ object Constant {
const
val
LUCKY_COMPLETE
=
"LUCKY_COMPLETE"
const
val
LUCKY_NEED
=
"LUCKY_NEED"
const
val
LUCKY_MY_FIRST
=
"LUCKY_MY_FIRST"
const
val
MAIN_FIRST_RECOMMEND
=
"MAIN_FIRST_RECOMMEND"
const
val
MAIN_TWO_RECOMMEND
=
"MAIN_TWO_RECOMMEND"
const
val
VEDIO_AD_COUNT
=
"VEDIO_AD_COUNT"
const
val
CARRIERTYPE_CSJ_VEDIO
=
"1"
...
...
video/app/src/main/java/com/mints/helivideo/manager/LocalVedioManager.kt
View file @
13e303fd
...
...
@@ -11,6 +11,7 @@ import com.mints.helivideo.ad.express.ExpressManager
import
com.mints.library.utils.json.JsonUtil
import
com.mints.helivideo.common.Constant
import
com.mints.helivideo.mvp.model.VedioBean
import
com.mints.helivideo.ui.activitys.RecommendActivity
import
com.mints.helivideo.utils.AppPreferencesManager
import
com.mints.helivideo.utils.ToastUtil
import
com.mints.helivideo.video.DramaApiDetailActivity
...
...
@@ -53,13 +54,22 @@ object LocalVedioManager {
* true-有
*/
fun
isCacheVedio
():
Boolean
{
if
(
vedioCache
!=
null
)
{
// 有缓存 且 不是推荐剧
if
(
vedioCache
!=
null
&&
!
vedioCache
!!
.
isRecommendVedio
)
{
return
true
}
val
localVedio
=
AppPreferencesManager
.
get
().
getString
(
Constant
.
LOCAL_VEDIO
,
""
)
if
(!
TextUtils
.
isEmpty
(
localVedio
))
{
return
true
try
{
val
bean
=
JsonUtil
.
parseJson
(
localVedio
,
VedioBean
::
class
.
java
)
if
(
bean
!=
null
&&
!
bean
.
isRecommendVedio
)
{
return
true
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
return
false
}
}
return
false
}
...
...
@@ -95,7 +105,8 @@ object LocalVedioManager {
bundle
.
putString
(
Constant
.
VEDIO_BEAN
,
JsonUtil
.
toJson
(
data
))
bundle
.
putBoolean
(
Constant
.
VEDIO_NEXT
,
isPlayNext
)
bundle
.
putBoolean
(
Constant
.
VEDIO_THIRD
,
isThirdId
)
readyGo
(
activity
,
TxVideoActivity
::
class
.
java
,
bundle
)
// readyGo(activity, TxVideoActivity::class.java, bundle)
readyGo
(
activity
,
RecommendActivity
::
class
.
java
,
bundle
)
}
else
{
requestDrama
(
activity
,
data
)
}
...
...
video/app/src/main/java/com/mints/helivideo/mvp/model/VedioBean.java
View file @
13e303fd
...
...
@@ -31,6 +31,7 @@ public class VedioBean implements Serializable {
private
int
recommendIndex
;
// 推荐视频第几集
private
long
seeUpdateTime
;
// 时间戳
private
boolean
checked
;
// 选中
private
boolean
isRecommendVedio
;
// 是否推荐剧
private
int
tipMaxIndex
;
// 倒计时弹框
public
String
getShowNum
()
{
...
...
@@ -252,4 +253,12 @@ public class VedioBean implements Serializable {
public
void
setFreeIndex
(
int
freeIndex
)
{
this
.
freeIndex
=
freeIndex
;
}
public
boolean
isRecommendVedio
()
{
return
isRecommendVedio
;
}
public
void
setRecommendVedio
(
boolean
recommendVedio
)
{
isRecommendVedio
=
recommendVedio
;
}
}
video/app/src/main/java/com/mints/helivideo/mvp/presenters/HomePresenter.kt
View file @
13e303fd
...
...
@@ -251,4 +251,31 @@ class HomePresenter : BasePresenter<HomeView>() {
}
})
}
fun
getRecommendVedio
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getRecommendVedio
(),
object
:
BaseSubscriber
<
BaseResponse
<
IndexList
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
IndexList
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
when
(
code
)
{
200
->
{
view
.
getRecommendVedioSuc
(
baseResponse
.
data
)
}
}
}
})
}
}
\ No newline at end of file
video/app/src/main/java/com/mints/helivideo/mvp/views/HomeView.kt
View file @
13e303fd
...
...
@@ -11,6 +11,7 @@ interface HomeView : BaseView {
fun
topTabsSuc
(
data
:
BannerList
?)
fun
ordersSuc
(
data
:
BannerList
?)
fun
getSoltVedioSuc
(
data
:
IndexList
?)
fun
getRecommendVedioSuc
(
data
:
IndexList
?)
fun
showTurnSuc
(
data
:
NineShowBean
)
}
video/app/src/main/java/com/mints/helivideo/net/LoanService.java
View file @
13e303fd
...
...
@@ -277,6 +277,12 @@ public interface LoanService {
@POST
(
"api/vedio/firstVedio"
)
Observable
<
BaseResponse
<
IndexList
>>
getSoltVedio
();
/**
* 匹配推荐
*/
@POST
(
"api/vedio/firstVedio"
)
Observable
<
BaseResponse
<
IndexList
>>
getRecommendVedio
();
/**
* 9宫格信息
*/
...
...
video/app/src/main/java/com/mints/helivideo/ui/activitys/RecommendActivity.kt
0 → 100644
View file @
13e303fd
package
com.mints.helivideo.ui.activitys
import
android.os.Bundle
import
android.view.KeyEvent
import
android.view.View
import
com.google.gson.Gson
import
com.mints.helivideo.R
import
com.mints.helivideo.common.Constant
import
com.mints.helivideo.mvp.model.VedioBean
import
com.mints.helivideo.ui.activitys.base.BaseActivity
import
com.mints.library.utils.nodoubleclick.AntiShake
import
kotlinx.android.synthetic.main.activity_recommend.*
/**
* 描述:推荐弹窗
* 作者:孟崔广
*/
class
RecommendActivity
:
BaseActivity
(),
View
.
OnClickListener
{
private
var
mVedioBean
:
VedioBean
?
=
null
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_recommend
override
fun
isApplyKitKatTranslucency
()
=
false
override
fun
toggleOverridePendingTransition
()
=
true
override
fun
getOverridePendingTransitionMode
()
=
TransitionMode
.
SCALE
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
super
.
getBundleExtras
(
extras
)
extras
?.
let
{
val
json
=
extras
.
getString
(
Constant
.
VEDIO_BEAN
)
mVedioBean
=
Gson
().
fromJson
(
json
,
VedioBean
::
class
.
java
)
}
}
override
fun
initViewsAndEvents
()
{
initView
()
initListener
()
}
private
fun
initView
()
{
}
private
fun
initListener
()
{
ic_recommend_quit
.
setOnClickListener
(
this
)
}
override
fun
finish
()
{
super
.
finish
()
overridePendingTransition
(
0
,
R
.
anim
.
scale_out
)
}
override
fun
onKeyDown
(
keyCode
:
Int
,
event
:
KeyEvent
):
Boolean
{
return
if
(
keyCode
==
KeyEvent
.
KEYCODE_BACK
)
{
true
}
else
super
.
onKeyDown
(
keyCode
,
event
)
}
override
fun
onClick
(
v
:
View
)
{
if
(
AntiShake
.
check
(
v
.
id
))
return
when
(
v
.
id
)
{
R
.
id
.
ic_recommend_quit
->
{
finish
()
}
}
}
}
\ No newline at end of file
video/app/src/main/java/com/mints/helivideo/ui/activitys/VipActivity.kt
View file @
13e303fd
...
...
@@ -22,6 +22,7 @@ import com.jobo.wxpay.WXPay
import
com.jobo.wxpay.WXPayInfoImpl
import
com.mints.helivideo.BuildConfig
import
com.mints.helivideo.R
import
com.mints.helivideo.common.AppConfig
import
com.mints.helivideo.common.Constant
import
com.mints.helivideo.manager.UserManager
import
com.mints.helivideo.mvp.model.VipBean
...
...
@@ -47,6 +48,8 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
companion
object
{
const
val
IS_GUIDE
=
"IS_GUIDE"
//是否从引导页进入
const
val
IS_MAIN
=
"IS_MAIN"
//是否从首页进入
const
val
IS_RECOMMEND
=
"IS_RECOMMEND"
//是否从推荐页进入
const
val
wxAppId
=
BuildConfig
.
WEIXIN_APP_PAY_ID
const
val
WEIXIN_PAY
=
"WEIXIN_PAY"
const
val
ALIPAY
=
"ALIPAY"
...
...
@@ -64,6 +67,8 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
private
var
vipList
:
MutableList
<
VipBean
.
ListBean
>?
=
null
private
var
isCheckAgreeFlag
:
Boolean
=
true
private
var
isGuide
:
Boolean
=
false
// 从启动页进入vip界面,返回时要回到首页
private
var
isMain
:
Boolean
=
false
private
var
isRecommend
:
Boolean
=
false
private
var
payType
=
ALIPAY
// 支付类型
private
var
vedioId
=
""
private
var
thirdId
=
""
...
...
@@ -81,6 +86,8 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
super
.
getBundleExtras
(
extras
)
extras
?.
let
{
isGuide
=
it
.
getBoolean
(
IS_GUIDE
,
false
)
isMain
=
it
.
getBoolean
(
IS_MAIN
,
false
)
isRecommend
=
it
.
getBoolean
(
IS_RECOMMEND
,
false
)
thirdId
=
it
.
getString
(
THIRD_ID
,
""
)
vedioId
=
it
.
getString
(
VEDIO_ID
,
""
)
}
...
...
@@ -94,6 +101,8 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
vipPresenter
.
userLogin
(
isAliPayInstalled
())
}
AppConfig
.
enterVipAct
=
true
initListener
()
}
...
...
@@ -106,6 +115,9 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
override
fun
onDestroy
()
{
super
.
onDestroy
()
if
(!
isMain
)
{
AppConfig
.
enterVipAct
=
false
}
breathAnim
?.
stop
()
vipPresenter
.
detachView
()
}
...
...
@@ -192,12 +204,17 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
if
(
isPay
)
{
showToast
(
"支付成功"
)
if
(!
UserManager
.
getInstance
().
userIsLogin
())
{
val
b
=
Bundle
()
b
.
putString
(
MobileLoginActivity
.
TYPE
,
"vip"
)
readyGoThenKill
(
MobileLoginActivity
::
class
.
java
,
b
)
if
(
isRecommend
)
{
finish
()
}
else
{
readyGoThenKill
(
MainActivity
::
class
.
java
)
if
(!
UserManager
.
getInstance
().
userIsLogin
())
{
val
b
=
Bundle
()
b
.
putString
(
MobileLoginActivity
.
TYPE
,
"vip"
)
readyGoThenKill
(
MobileLoginActivity
::
class
.
java
,
b
)
}
else
{
readyGoThenKill
(
MainActivity
::
class
.
java
)
}
}
}
}
...
...
video/app/src/main/java/com/mints/helivideo/ui/fragment/MainFragment.kt
View file @
13e303fd
package
com.mints.helivideo.ui.fragment
import
android.os.Bundle
import
android.os.Handler
import
android.os.Looper
import
android.text.TextUtils
...
...
@@ -26,6 +27,8 @@ import com.mints.helivideo.mvp.model.*
import
com.mints.helivideo.mvp.presenters.HomePresenter
import
com.mints.helivideo.mvp.views.HomeView
import
com.mints.helivideo.ui.activitys.NineActivity
import
com.mints.helivideo.ui.activitys.NinePayActivity
import
com.mints.helivideo.ui.activitys.RecommendActivity
import
com.mints.helivideo.ui.activitys.VipActivity
import
com.mints.helivideo.ui.adapter.HomeVideoPageAdapter
import
com.mints.helivideo.ui.adapter.ImageTitleAdapter
...
...
@@ -34,6 +37,7 @@ import com.mints.helivideo.ui.fragment.base.LazyLoadBaseFragment
import
com.mints.helivideo.utils.AppPreferencesManager
import
com.mints.helivideo.utils.SpanUtils
import
com.mints.library.utils.GlideUtils
import
com.mints.library.utils.json.JsonUtil
import
com.mints.library.utils.nodoubleclick.AntiShake
import
kotlinx.android.synthetic.main.fragment_main.*
import
java.lang.reflect.Field
...
...
@@ -56,6 +60,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
private
val
topList
=
mutableListOf
<
VedioBean
>()
private
var
vpAdapter
:
HomeVideoPageAdapter
?
=
null
private
var
topAdapter
:
TopAdapter
?
=
null
private
var
recommendVedioBean
:
VedioBean
?
=
null
private
val
homePresenter
by
lazy
{
HomePresenter
()
}
private
val
userManager
by
lazy
{
UserManager
.
getInstance
()
}
...
...
@@ -87,7 +93,11 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
val
firstVedio
=
AppPreferencesManager
.
get
().
getBoolean
(
Constant
.
IS_FIRST_VEDIO
,
false
)
if
(
firstVedio
)
{
if
(
UserManager
.
getInstance
().
newFlag
&&
!
UserManager
.
getInstance
().
vipFlag
)
{
readyGo
(
VipActivity
::
class
.
java
)
homePresenter
.
getRecommendVedio
()
val
bundle
=
Bundle
()
bundle
.
putBoolean
(
VipActivity
.
IS_MAIN
,
true
)
readyGo
(
VipActivity
::
class
.
java
,
bundle
)
}
}
else
{
homePresenter
.
getSoltVedio
()
...
...
@@ -121,6 +131,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
homePresenter
.
topTabs
()
homePresenter
.
orders
()
TrackManager
.
getInstance
().
getMyInfo
()
showRecommendAct
(
recommendVedioBean
)
}
}
}
...
...
@@ -312,11 +323,20 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
LocalVedioManager
.
startVedioDetailActivityForType
(
requireActivity
(),
data
.
vedioMsg
)
}
else
{
if
(
UserManager
.
getInstance
().
newFlag
&&
!
UserManager
.
getInstance
().
vipFlag
)
{
readyGo
(
VipActivity
::
class
.
java
)
homePresenter
.
getRecommendVedio
()
val
bundle
=
Bundle
()
bundle
.
putBoolean
(
VipActivity
.
IS_MAIN
,
true
)
readyGo
(
VipActivity
::
class
.
java
,
bundle
)
}
}
}
override
fun
getRecommendVedioSuc
(
data
:
IndexList
?)
{
this
.
recommendVedioBean
=
data
?.
vedioMsg
}
override
fun
showTurnSuc
(
data
:
NineShowBean
)
{
AppPreferencesManager
.
get
().
put
(
Constant
.
LUCKY_FLAG
,
data
.
isShow
)
...
...
@@ -353,7 +373,47 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
}
fun
ViewPager2
.
desensitization
(){
/**
* 展示推荐弹窗
*/
private
fun
showRecommendAct
(
data
:
VedioBean
?)
{
if
(
data
==
null
)
return
if
(
AppConfig
.
enterVipAct
)
{
AppConfig
.
enterVipAct
=
false
if
(
UserManager
.
getInstance
().
newFlag
&&
!
UserManager
.
getInstance
().
vipFlag
)
{
// 1、第一次打开app并关闭付费页进首页时出现一次
val
mainFirstRecommend
=
AppPreferencesManager
.
get
().
getBoolean
(
Constant
.
MAIN_FIRST_RECOMMEND
,
false
)
if
(!
mainFirstRecommend
)
{
AppPreferencesManager
.
get
().
put
(
Constant
.
MAIN_FIRST_RECOMMEND
,
true
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
val
bundle
=
Bundle
()
bundle
.
putString
(
Constant
.
VEDIO_BEAN
,
JsonUtil
.
toJson
(
data
))
readyGo
(
RecommendActivity
::
class
.
java
,
bundle
)
},
300
)
return
}
// 2、用户第一次打开app未签约付费,而是看了十次广告以上的,则在下一次打开app时关闭启动付费页面后弹出推荐弹框一次
val
mainTwoRecommend
=
AppPreferencesManager
.
get
().
getBoolean
(
Constant
.
MAIN_TWO_RECOMMEND
,
false
)
val
adCount
=
AppPreferencesManager
.
get
().
getInt
(
Constant
.
VEDIO_AD_COUNT
,
0
)
if
(!
mainTwoRecommend
&&
adCount
>
10
)
{
AppPreferencesManager
.
get
().
put
(
Constant
.
MAIN_TWO_RECOMMEND
,
true
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
val
bundle
=
Bundle
()
bundle
.
putString
(
Constant
.
VEDIO_BEAN
,
JsonUtil
.
toJson
(
data
))
readyGo
(
RecommendActivity
::
class
.
java
,
bundle
)
},
300
)
}
}
}
}
fun
ViewPager2
.
desensitization
()
{
//动态设置ViewPager2 灵敏度
try
{
val
recyclerViewField
:
Field
=
ViewPager2
::
class
.
java
.
getDeclaredField
(
"mRecyclerView"
)
...
...
video/app/src/main/res/layout/activity_recommend.xml
0 → 100755
View file @
13e303fd
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#90000000"
android:orientation=
"vertical"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_centerInParent=
"true"
android:layout_marginLeft=
"30dp"
android:background=
"#0f0"
android:layout_marginTop=
"40dp"
android:layout_marginRight=
"30dp"
android:layout_marginBottom=
"40dp"
>
<ImageView
android:id=
"@+id/ic_recommend_quit"
android:layout_width=
"60dp"
android:layout_height=
"60dp"
android:layout_alignParentRight=
"true"
android:layout_gravity=
"right"
android:layout_marginTop=
"2dp"
android:layout_marginRight=
"10dp"
android:padding=
"10dp"
android:scaleType=
"centerCrop"
android:src=
"@mipmap/ic_quit_yuan"
/>
</RelativeLayout>
</RelativeLayout>
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