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
e9452b26
Commit
e9452b26
authored
Jul 21, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
483acd0a
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
551 additions
and
113 deletions
+551
-113
build.gradle
video/app/build.gradle
+2
-0
AndroidManifest.xml
video/app/src/main/AndroidManifest.xml
+5
-0
AdManager.kt
video/app/src/main/java/com/xinfu/helivideo/ad/AdManager.kt
+4
-1
NinePayPresenter.kt
...va/com/xinfu/helivideo/mvp/presenters/NinePayPresenter.kt
+98
-0
NinePresenter.java
...ava/com/xinfu/helivideo/mvp/presenters/NinePresenter.java
+0
-47
NinePresenter.kt
.../java/com/xinfu/helivideo/mvp/presenters/NinePresenter.kt
+83
-0
NinePayView.kt
...rc/main/java/com/xinfu/helivideo/mvp/views/NinePayView.kt
+9
-0
NineView.kt
...p/src/main/java/com/xinfu/helivideo/mvp/views/NineView.kt
+4
-0
MainActivity.kt
...ain/java/com/xinfu/helivideo/ui/activitys/MainActivity.kt
+0
-1
NineActivity.kt
...ain/java/com/xinfu/helivideo/ui/activitys/NineActivity.kt
+99
-47
NinePayActivity.kt
.../java/com/xinfu/helivideo/ui/activitys/NinePayActivity.kt
+148
-0
LuckyMonkeyPanelView.java
...deo/ui/widgets/luckymonkeypanel/LuckyMonkeyPanelView.java
+20
-10
PanelItemView.java
.../helivideo/ui/widgets/luckymonkeypanel/PanelItemView.java
+11
-0
bg_lucky_monkey_panel.xml
video/app/src/main/res/drawable/bg_lucky_monkey_panel.xml
+2
-2
bg_lucky_monkey_panel_nei.xml
...o/app/src/main/res/drawable/bg_lucky_monkey_panel_nei.xml
+12
-0
activity_nine.xml
video/app/src/main/res/layout/activity_nine.xml
+11
-0
activity_nine_pay.xml
video/app/src/main/res/layout/activity_nine_pay.xml
+21
-0
view_lucky_mokey_panel.xml
video/app/src/main/res/layout/view_lucky_mokey_panel.xml
+5
-3
view_panel_item.xml
video/app/src/main/res/layout/view_panel_item.xml
+17
-2
No files found.
video/app/build.gradle
View file @
e9452b26
...
...
@@ -212,6 +212,8 @@ dependencies {
// 悬浮窗
implementation
'com.github.princekin-f:EasyFloat:1.3.4'
implementation
'com.airbnb.android:lottie:3.4.0'
// 跑马灯
implementation
'com.sunfusheng:MarqueeView:1.4.1'
// 工具类
// BASE64Decoder接入
// 兼容奔溃问题-Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
...
...
video/app/src/main/AndroidManifest.xml
View file @
e9452b26
...
...
@@ -137,6 +137,11 @@
android:name=
".ui.activitys.NineActivity"
android:exported=
"false"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activitys.NinePayActivity"
android:theme=
"@style/TransparentTheme"
/>
<activity
android:name=
".video.DramaApiDetailActivity"
android:exported=
"false"
...
...
video/app/src/main/java/com/xinfu/helivideo/ad/AdManager.kt
View file @
e9452b26
...
...
@@ -3,6 +3,7 @@ package com.xinfu.helivideo.ad
import
android.app.Activity
import
com.xinfu.helivideo.ad.splash.SplashManager
import
com.xinfu.helivideo.ad.video.InMoneyVideo
import
com.xinfu.helivideo.manager.UserManager
/**
* 预加载-全屏及激励视频管理类
...
...
@@ -49,7 +50,9 @@ class AdManager {
*/
fun
splashPreLoadAll
(
activity
:
Activity
)
{
SplashManager
.
preLoadAd
(
activity
)
this
.
preLoadAd
(
activity
)
if
(!
UserManager
.
getInstance
().
vipFlag
)
{
this
.
preLoadAd
(
activity
)
}
}
}
\ No newline at end of file
video/app/src/main/java/com/xinfu/helivideo/mvp/presenters/NinePayPresenter.kt
0 → 100644
View file @
e9452b26
package
com.xinfu.helivideo.mvp.presenters
import
com.xinfu.helivideo.manager.AppHttpManager
import
com.xinfu.helivideo.mvp.model.BaseResponse
import
com.xinfu.helivideo.mvp.model.WxPayParamBean
import
com.xinfu.helivideo.mvp.views.NinePayView
import
com.xinfu.library.net.neterror.BaseSubscriber
import
com.xinfu.library.net.neterror.Throwable
import
java.util.HashMap
class
NinePayPresenter
:
BasePresenter
<
NinePayView
>()
{
fun
getVipPayParams
(
pid
:
String
)
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"payChannel"
]
=
"ALIPAY"
vo
[
"pid"
]
=
pid
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getVipPayParams
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
WxPayParamBean
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
view
.
hideLoading
()
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
view
.
hideLoading
()
view
.
showToast
(
e
.
message
)
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
WxPayParamBean
>)
{
if
(
isLinkView
)
return
val
code
:
Int
=
baseResponse
.
getStatus
()
when
(
code
)
{
200
->
{
view
.
getVipPayParamsSuc
(
"ALIPAY"
,
baseResponse
.
data
)
}
else
->
{
view
.
showToast
(
baseResponse
.
getMessage
())
}
}
}
})
}
fun
payError
(
code
:
Int
)
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"code"
]
=
code
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
payError
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
Any
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
view
.
hideLoading
()
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
view
.
hideLoading
()
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
Any
>)
{
if
(
isLinkView
)
return
val
code
:
Int
=
baseResponse
.
getStatus
()
}
})
}
fun
queryVipOrder
(
tid
:
String
,
isPay
:
Boolean
)
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"tid"
]
=
tid
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
queryVipOrder
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
Any
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
view
.
hideLoading
()
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
view
.
hideLoading
()
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
Any
>)
{
if
(
isLinkView
)
return
val
code
:
Int
=
baseResponse
.
getStatus
()
when
(
code
)
{
200
->
{
view
.
queryVipOrderSuc
(
isPay
)
}
}
}
})
}
}
\ No newline at end of file
video/app/src/main/java/com/xinfu/helivideo/mvp/presenters/NinePresenter.java
deleted
100644 → 0
View file @
483acd0a
package
com
.
xinfu
.
helivideo
.
mvp
.
presenters
;
import
com.xinfu.helivideo.mvp.views.NineView
;
public
class
NinePresenter
extends
BasePresenter
<
NineView
>
{
public
void
getTurnIphoneMsg
()
{
if
(!
isLinkView
()){
view
.
showLoading
(
"加载中..."
);
}
// AppHttpManager.getInstance(loanApplication)
// .call(loanService.getTurnIphoneMsg(),
// new BaseSubscriber<BaseResponse<PhoneBean>>() {
// @Override
// public void onCompleted() {
// if (isLinkView()) return;
//
// view.hideLoading();
// }
//
// @Override
// public void onError(Throwable e) {
// if (isLinkView()) return;
//
// view.hideLoading();
// view.showToast(e.getMessage());
// }
//
// @Override
// public void onNext(BaseResponse<PhoneBean> baseResponse) {
// if (isLinkView()) return;
//
// int code = baseResponse.getStatus();
// String message = baseResponse.getMessage();
// switch (code) {
// case 200://成功
// view.getTurnIphoneMsgSuc(baseResponse.getData());
// break;
// default:
// view.showToast(message);
// break;
// }
// }
// });
}
}
video/app/src/main/java/com/xinfu/helivideo/mvp/presenters/NinePresenter.kt
0 → 100644
View file @
e9452b26
package
com.xinfu.helivideo.mvp.presenters
import
com.xinfu.helivideo.manager.AppHttpManager
import
com.xinfu.helivideo.mvp.model.BaseResponse
import
com.xinfu.helivideo.mvp.model.IndexList
import
com.xinfu.helivideo.mvp.views.NineView
import
com.xinfu.library.net.neterror.BaseSubscriber
import
com.xinfu.library.net.neterror.Throwable
import
java.util.HashMap
class
NinePresenter
:
BasePresenter
<
NineView
>()
{
fun
getTurnIphoneMsg
()
{
// AppHttpManager.getInstance(loanApplication)
// .call(loanService.getSoltVedio(),
// object : BaseSubscriber<BaseResponse<Any>>() {
// override fun onCompleted() {
// if (isLinkView) return
// view.hideLoading()
// }
//
// override fun onNext(baseResponse: BaseResponse<Any>) {
// if (isLinkView) return
//
// view.hideLoading()
// val code = baseResponse.status
// val message = baseResponse.message
//
// when (code) {
// 200 -> view.getTurnIphoneMsgSuc(baseResponse.data)
// else -> {
// view.showToast(message)
// }
// }
// }
//
// override fun onError(e: Throwable?) {
// if (isLinkView) return
// view.hideLoading()
// view.showToast(e?.message)
// }
//
// })
}
fun
unlock
(
vo
:
HashMap
<
String
,
Any
>)
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
unlock
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
IndexList
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
view
.
hideLoading
()
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
IndexList
>)
{
if
(
isLinkView
)
return
view
.
hideLoading
()
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
when
(
code
)
{
200
->
view
.
unlockSuc
()
else
->
{
view
.
showToast
(
message
)
}
}
}
override
fun
onError
(
e
:
Throwable
?)
{
if
(
isLinkView
)
return
view
.
hideLoading
()
view
.
showToast
(
e
?.
message
)
}
})
}
}
\ No newline at end of file
video/app/src/main/java/com/xinfu/helivideo/mvp/views/NinePayView.kt
0 → 100644
View file @
e9452b26
package
com.xinfu.helivideo.mvp.views
import
com.xinfu.helivideo.mvp.model.WxPayParamBean
interface
NinePayView
:
BaseView
{
fun
getVipPayParamsSuc
(
payChannel
:
String
,
data
:
WxPayParamBean
)
fun
queryVipOrderSuc
(
isPay
:
Boolean
)
}
video/app/src/main/java/com/xinfu/helivideo/mvp/views/NineView.kt
View file @
e9452b26
package
com.xinfu.helivideo.mvp.views
import
com.xinfu.helivideo.mvp.model.IndexList
interface
NineView
:
BaseView
{
fun
getTurnIphoneMsgSuc
(
data
:
Any
)
fun
unlockSuc
()
}
\ No newline at end of file
video/app/src/main/java/com/xinfu/helivideo/ui/activitys/MainActivity.kt
View file @
e9452b26
...
...
@@ -87,7 +87,6 @@ class MainActivity : BaseActivity(), View.OnClickListener {
tabIvLoan
!!
.
isSelected
=
true
}
AdManager
.
instance
.
preLoadAd
(
this
)
initEditView
()
...
...
video/app/src/main/java/com/xinfu/helivideo/ui/activitys/NineActivity.kt
View file @
e9452b26
package
com.xinfu.helivideo.ui.activitys
import
android.os.Bundle
import
android.os.Handler
import
android.os.Looper
import
android.view.View
import
com.daimajia.androidanimations.library.Techniques
import
com.daimajia.androidanimations.library.YoYo
import
com.xinfu.helivideo.R
import
com.xinfu.helivideo.ad.AdManager
import
com.xinfu.helivideo.ad.AdStatusListener
import
com.xinfu.helivideo.ad.NoPreAdManager
import
com.xinfu.helivideo.common.Constant
import
com.xinfu.helivideo.mvp.presenters.NinePresenter
import
com.xinfu.helivideo.mvp.views.NineView
import
com.xinfu.helivideo.ui.activitys.base.BaseActivity
import
com.xinfu.helivideo.utils.SplitArrayUtils
import
com.xinfu.helivideo.utils.rxutil.CommonRxTask
import
com.xinfu.helivideo.utils.rxutil.RxjavaUtil
import
com.xinfu.library.utils.nodoubleclick.AntiShake
...
...
@@ -20,6 +28,7 @@ class NineActivity : BaseActivity(), View.OnClickListener, NineView {
private
val
ninePresenter
by
lazy
{
NinePresenter
()
}
private
var
yoyo
:
YoYo
.
YoYoString
?
=
null
private
var
isInitPanData
=
false
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_nine
...
...
@@ -28,17 +37,20 @@ class NineActivity : BaseActivity(), View.OnClickListener, NineView {
override
fun
initViewsAndEvents
()
{
ninePresenter
.
attachView
(
this
)
initData
()
initListener
()
// ninePresenter.getTurnIphoneMsg()
ninePresenter
.
getTurnIphoneMsg
()
btn_action
?.
postDelayed
({
yoyo
=
YoYo
.
with
(
Techniques
.
Pulse
).
duration
(
1000
).
repeat
(-
1
).
playOn
(
btn_action
)
},
200
)
}
lucky_panel
.
setImgArray
()
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
marqueeView
?.
startFlipping
()
ninePresenter
.
detachView
()
yoyo
?.
stop
()
yoyo
=
null
...
...
@@ -62,53 +74,68 @@ class NineActivity : BaseActivity(), View.OnClickListener, NineView {
}
}
override
fun
unlockSuc
()
{
ninePresenter
.
getTurnIphoneMsg
()
}
override
fun
getTurnIphoneMsgSuc
(
data
:
Any
)
{
if
(!
isInitPanData
)
{
// 首次初始化数据
lucky_panel
.
setImgArray
()
isInitPanData
=
true
}
else
{
// 次数达标
if
(
true
)
{
// 调用接口ninePresenter 获取指定位置
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
startNine
(
1
)
},
500
)
}
}
}
private
fun
luckyAward
()
{
startNine
()
// val carrierType = Constant.CARRIERTYPE_NINE
// AdManager.instance.showAd(this, carrierType,
// object : AdStatusListener {
// var canFail = false
// override fun adSuccess() {
// canFail = true
// }
//
// override fun adFail() {
// if (canFail) return
//
// NoPreAdManager.loadVideoAd(
// this@NineActivity,
// carrierType, object : AdStatusListener {
// override fun adFail() {
// showToast("广告太火爆了,请稍候再试")
// }
//
// override fun adSuccess() {
// }
//
// override fun adClose(vo: HashMap<String, Any>?) {
// vo?.let {
// Handler(Looper.getMainLooper()).postDelayed({
// startNine()
// }, 500)
// }
// }
// })
// }
//
// override fun adClose(vo: HashMap<String, Any>?) {
// vo?.let {
// Handler(Looper.getMainLooper()).postDelayed({
// startNine()
// }, 500)
// }
// }
//
// })
val
carrierType
=
Constant
.
CARRIERTYPE_NINE
AdManager
.
instance
.
showAd
(
this
,
carrierType
,
object
:
AdStatusListener
{
var
canFail
=
false
override
fun
adSuccess
()
{
canFail
=
true
}
override
fun
adFail
()
{
if
(
canFail
)
return
NoPreAdManager
.
loadVideoAd
(
this
@NineActivity
,
carrierType
,
object
:
AdStatusListener
{
override
fun
adFail
()
{
showToast
(
"广告太火爆了,请稍候再试"
)
}
override
fun
adSuccess
()
{
}
override
fun
adClose
(
vo
:
HashMap
<
String
,
Any
>?)
{
vo
?.
let
{
ninePresenter
.
unlock
(
vo
)
}
}
})
}
override
fun
adClose
(
vo
:
HashMap
<
String
,
Any
>?)
{
vo
?.
let
{
ninePresenter
.
unlock
(
vo
)
}
}
})
}
fun
startNine
()
{
fun
startNine
(
index
:
Int
)
{
if
(!
lucky_panel
.
isGameRunning
)
{
lucky_panel
.
startGame
()
...
...
@@ -122,9 +149,34 @@ class NineActivity : BaseActivity(), View.OnClickListener, NineView {
return
}
lucky_panel
.
tryToStop
(
1
)
lucky_panel
.
tryToStop
(
index
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
val
bundle
=
Bundle
()
bundle
.
putString
(
NinePayActivity
.
PID
,
""
)
readyGo
(
NinePayActivity
::
class
.
java
,
bundle
)
},
500
)
}
})
}
}
private
fun
initData
()
{
val
messages
=
ArrayList
<
String
>()
messages
.
add
(
"恭喜用户183******66抽中 +7天会员"
)
messages
.
add
(
"恭喜用户177******34抽中 +7天会员"
)
messages
.
add
(
"恭喜用户134******49抽中 +7天会员"
)
messages
.
add
(
"恭喜用户159******51抽中 +7天会员"
)
messages
.
add
(
"恭喜用户150******87抽中 +7天会员"
)
messages
.
add
(
"恭喜用户134******65抽中 +7天会员"
)
messages
.
add
(
"恭喜用户183******40抽中 +7天会员"
)
messages
.
add
(
"恭喜用户131******08抽中 +7天会员"
)
messages
.
add
(
"恭喜用户177******65抽中 +7天会员"
)
messages
.
add
(
"恭喜用户180******39抽中 +7天会员"
)
messages
.
add
(
"恭喜用户150******43抽中 +7天会员"
)
messages
.
add
(
"恭喜用户152******05抽中 +7天会员"
)
messages
.
add
(
"恭喜用户133******87抽中 +7天会员"
)
messages
.
add
(
"恭喜用户151******64抽中 +7天会员"
)
marqueeView
.
startWithList
(
SplitArrayUtils
.
getRandomList
(
messages
)
as
List
<
Nothing
>?)
}
}
\ No newline at end of file
video/app/src/main/java/com/xinfu/helivideo/ui/activitys/NinePayActivity.kt
0 → 100644
View file @
e9452b26
package
com.xinfu.helivideo.ui.activitys
import
android.content.Intent
import
android.net.Uri
import
android.os.Bundle
import
android.text.TextUtils
import
android.view.View
import
com.jobo.alipay.AliPay
import
com.jobo.alipay.AlipayInfoImpl
import
com.jobo.rxpay.RxPay
import
com.jobo.rxpay.callback.IPayCallback
import
com.xinfu.helivideo.R
import
com.xinfu.helivideo.manager.UserManager
import
com.xinfu.helivideo.mvp.model.OrderRecordBean
import
com.xinfu.helivideo.mvp.model.WxPayParamBean
import
com.xinfu.helivideo.mvp.presenters.NinePayPresenter
import
com.xinfu.helivideo.mvp.presenters.NinePresenter
import
com.xinfu.helivideo.mvp.views.NinePayView
import
com.xinfu.helivideo.mvp.views.NineView
import
com.xinfu.helivideo.ui.activitys.base.BaseActivity
import
com.xinfu.library.utils.nodoubleclick.AntiShake
/**
* 抽奖弹窗
*/
class
NinePayActivity
:
BaseActivity
(),
View
.
OnClickListener
,
NinePayView
{
companion
object
{
const
val
PID
=
"PID"
}
private
val
ninePayPresenter
by
lazy
{
NinePayPresenter
()
}
private
var
pid
=
""
override
fun
isApplyKitKatTranslucency
()
=
false
override
fun
toggleOverridePendingTransition
()
=
true
override
fun
getOverridePendingTransitionMode
()
=
TransitionMode
.
SCALE
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_nine_pay
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
super
.
getBundleExtras
(
extras
)
extras
?.
let
{
pid
=
it
.
getString
(
PID
,
""
)
}
}
override
fun
initViewsAndEvents
()
{
ninePayPresenter
.
attachView
(
this
)
initListener
()
}
override
fun
finish
()
{
super
.
finish
()
overridePendingTransition
(
0
,
R
.
anim
.
scale_out
)
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
ninePayPresenter
.
detachView
()
}
override
fun
onClick
(
v
:
View
?)
{
if
(
AntiShake
.
check
(
v
?.
id
))
return
// when (v?.id) {
// R.id.iv_left_icon -> finish()
// }
}
override
fun
getVipPayParamsSuc
(
payChannel
:
String
,
paramsBean
:
WxPayParamBean
)
{
if
(!
isFinishing
)
{
if
(
paramsBean
.
params
==
null
)
{
showToast
(
"支付宝支付维护中"
)
return
}
alipay
(
paramsBean
)
}
}
fun
alipay
(
wxParanBean
:
WxPayParamBean
)
{
try
{
// 自动签约付费
if
(
wxParanBean
.
params
.
isSign
)
{
openAutoAlipay
(
wxParanBean
.
params
.
params
)
return
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
//实例化支付宝支付策略
val
aliPay
=
AliPay
()
//构造支付宝订单实体。一般都是由服务端直接返回。
val
alipayInfoImpl
=
AlipayInfoImpl
()
alipayInfoImpl
.
setOrderInfo
(
wxParanBean
.
params
.
params
)
//策略场景类调起支付方法开始支付,以及接收回调。
RxPay
.
pay
(
aliPay
,
this
,
alipayInfoImpl
,
object
:
IPayCallback
{
override
fun
success
()
{
UserManager
.
getInstance
().
vipFlag
=
true
ninePayPresenter
?.
queryVipOrder
(
wxParanBean
.
tid
.
toString
(),
true
)
}
override
fun
failed
(
code
:
Int
,
message
:
String
?)
{
ninePayPresenter
?.
payError
(
code
)
if
(!
TextUtils
.
isEmpty
(
message
))
{
showToast
(
message
)
}
}
override
fun
cancel
()
{
ninePayPresenter
?.
queryVipOrder
(
wxParanBean
.
tid
.
toString
(),
false
)
}
})
}
/**
* 自动续费
*/
fun
openAutoAlipay
(
url
:
String
)
{
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
url
))
startActivity
(
intent
)
}
override
fun
queryVipOrderSuc
(
isPay
:
Boolean
)
{
if
(
isFinishing
)
return
if
(
isPay
)
{
showToast
(
"支付成功"
)
if
(!
UserManager
.
getInstance
().
userIsLogin
())
{
val
b
=
Bundle
()
b
.
putString
(
MobileLoginActivity
.
TYPE
,
"vip"
)
readyGoThenKill
(
MobileLoginActivity
::
class
.
java
,
b
)
}
else
{
readyGoThenKill
(
MainActivity
::
class
.
java
)
}
}
}
private
fun
initListener
()
{
// iv_left_icon.setOnClickListener(this)
}
}
video/app/src/main/java/com/xinfu/helivideo/ui/widgets/luckymonkeypanel/LuckyMonkeyPanelView.java
View file @
e9452b26
...
...
@@ -9,7 +9,6 @@ import com.xinfu.helivideo.R;
public
class
LuckyMonkeyPanelView
extends
FrameLayout
{
private
ImageView
bg_1
;
private
ImageView
bg_2
;
...
...
@@ -67,19 +66,30 @@ public class LuckyMonkeyPanelView extends FrameLayout {
itemView7
=
(
PanelItemView
)
findViewById
(
R
.
id
.
item7
);
itemView8
=
(
PanelItemView
)
findViewById
(
R
.
id
.
item8
);
itemView9
=
(
PanelItemView
)
findViewById
(
R
.
id
.
item9
);
setImgArray
();
}
public
void
setImgArray
()
{
// 0金币 1huawei手机 2提现券 3金币 4红包 5提现券 6金币 7phone
itemView1
.
setBackground
(
getResources
().
getDrawable
(
R
.
mipmap
.
ic_nine_coin
));
itemView2
.
setBackground
(
getResources
().
getDrawable
(
R
.
mipmap
.
ic_nine_huawei
));
itemView3
.
setBackground
(
getResources
().
getDrawable
(
R
.
mipmap
.
ic_nine_di
));
itemView6
.
setBackground
(
getResources
().
getDrawable
(
R
.
mipmap
.
ic_nine_coin
));
itemView9
.
setBackground
(
getResources
().
getDrawable
(
R
.
mipmap
.
ic_nine_100
));
itemView8
.
setBackground
(
getResources
().
getDrawable
(
R
.
mipmap
.
ic_nine_di
));
itemView7
.
setBackground
(
getResources
().
getDrawable
(
R
.
mipmap
.
ic_nine_coin
));
itemView4
.
setBackground
(
getResources
().
getDrawable
(
R
.
mipmap
.
ic_nine_14
));
// itemView1.setBackground(getResources().getDrawable(R.mipmap.ic_nine_coin));
// itemView2.setBackground(getResources().getDrawable(R.mipmap.ic_nine_huawei));
// itemView3.setBackground(getResources().getDrawable(R.mipmap.ic_nine_di));
// itemView6.setBackground(getResources().getDrawable(R.mipmap.ic_nine_coin));
// itemView9.setBackground(getResources().getDrawable(R.mipmap.ic_nine_100));
// itemView8.setBackground(getResources().getDrawable(R.mipmap.ic_nine_di));
// itemView7.setBackground(getResources().getDrawable(R.mipmap.ic_nine_coin));
// itemView4.setBackground(getResources().getDrawable(R.mipmap.ic_nine_14));
itemView1
.
setStyle
(
R
.
mipmap
.
ic_kefu
,
"0"
);
itemView2
.
setStyle
(
R
.
mipmap
.
ic_kefu
,
"1"
);
itemView3
.
setStyle
(
R
.
mipmap
.
ic_kefu
,
"2"
);
itemView6
.
setStyle
(
R
.
mipmap
.
ic_kefu
,
"3"
);
itemView9
.
setStyle
(
R
.
mipmap
.
ic_kefu
,
"4"
);
itemView8
.
setStyle
(
R
.
mipmap
.
ic_kefu
,
"5"
);
itemView7
.
setStyle
(
R
.
mipmap
.
ic_kefu
,
"6"
);
itemView4
.
setStyle
(
R
.
mipmap
.
ic_kefu
,
"7"
);
itemViewArr
[
0
]
=
itemView4
;
itemViewArr
[
1
]
=
itemView1
;
itemViewArr
[
2
]
=
itemView2
;
...
...
video/app/src/main/java/com/xinfu/helivideo/ui/widgets/luckymonkeypanel/PanelItemView.java
View file @
e9452b26
...
...
@@ -4,6 +4,8 @@ import android.content.Context;
import
android.util.AttributeSet
;
import
android.view.View
;
import
android.widget.FrameLayout
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
com.xinfu.helivideo.R
;
...
...
@@ -14,6 +16,8 @@ import com.xinfu.helivideo.R;
public
class
PanelItemView
extends
FrameLayout
implements
ItemView
{
private
View
overlay
;
private
TextView
tv_panel_item_text
;
private
ImageView
iv_panel_item_pic
;
public
PanelItemView
(
Context
context
)
{
this
(
context
,
null
);
...
...
@@ -27,6 +31,13 @@ public class PanelItemView extends FrameLayout implements ItemView{
super
(
context
,
attrs
,
defStyleAttr
);
inflate
(
context
,
R
.
layout
.
view_panel_item
,
this
);
overlay
=
findViewById
(
R
.
id
.
overlay
);
iv_panel_item_pic
=
findViewById
(
R
.
id
.
iv_panel_item_pic
);
tv_panel_item_text
=
findViewById
(
R
.
id
.
tv_panel_item_text
);
}
public
void
setStyle
(
int
pic
,
String
text
){
iv_panel_item_pic
.
setImageResource
(
pic
);
tv_panel_item_text
.
setText
(
text
);
}
@Override
...
...
video/app/src/main/res/drawable/bg_lucky_monkey_panel.xml
View file @
e9452b26
...
...
@@ -2,11 +2,11 @@
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"#
3a1f3b
"
/>
<solid
android:color=
"#
F5342D
"
/>
<corners
android:radius=
"10dp"
/>
<stroke
android:width=
"2dp"
android:color=
"#
2e1106
"
/>
android:color=
"#
F5342D
"
/>
</shape>
\ No newline at end of file
video/app/src/main/res/drawable/bg_lucky_monkey_panel_nei.xml
0 → 100755
View file @
e9452b26
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"#da0b1f"
/>
<corners
android:radius=
"10dp"
/>
<stroke
android:width=
"2dp"
android:color=
"#da0b1f"
/>
</shape>
\ No newline at end of file
video/app/src/main/res/layout/activity_nine.xml
View file @
e9452b26
...
...
@@ -3,6 +3,7 @@
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:orientation=
"vertical"
>
<ImageView
...
...
@@ -45,5 +46,15 @@
</RelativeLayout>
<com.sunfusheng.marqueeview.MarqueeView
android:id=
"@+id/marqueeView"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
app:mvAnimDuration=
"1000"
app:mvInterval=
"3000"
app:mvSingleLine=
"true"
app:mvTextColor=
"@color/white"
app:mvTextSize=
"14sp"
/>
</LinearLayout>
video/app/src/main/res/layout/activity_nine_pay.xml
0 → 100644
View file @
e9452b26
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#80000000"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"400dp"
android:layout_gravity=
"center"
android:layout_margin=
"20dp"
android:background=
"@color/red"
android:orientation=
"vertical"
>
</LinearLayout>
</FrameLayout>
video/app/src/main/res/layout/view_lucky_mokey_panel.xml
View file @
e9452b26
...
...
@@ -2,8 +2,7 @@
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"300dp"
android:layout_height=
"300dp"
android:background=
"@drawable/bg_lucky_monkey_panel"
android:orientation=
"vertical"
>
android:background=
"@drawable/bg_lucky_monkey_panel"
>
<ImageView
...
...
@@ -19,10 +18,13 @@
android:src=
"@drawable/bubble1"
android:visibility=
"gone"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_margin=
"25dp"
android:layout_margin=
"20dp"
android:padding=
"3dp"
android:background=
"@drawable/bg_lucky_monkey_panel_nei"
android:orientation=
"vertical"
>
<LinearLayout
...
...
video/app/src/main/res/layout/view_panel_item.xml
View file @
e9452b26
...
...
@@ -8,11 +8,26 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<
ImageView
<
LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
android:src=
"@drawable/icon_questionmark"
/>
android:gravity=
"center"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/iv_panel_item_pic"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/ic_kefu"
></ImageView>
<TextView
android:id=
"@+id/tv_panel_item_text"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"3123"
></TextView>
</LinearLayout>
<View
android:id=
"@+id/overlay"
...
...
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