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
8a4c3b5d
Commit
8a4c3b5d
authored
Sep 25, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
0b5c6d63
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
65 additions
and
247 deletions
+65
-247
AndroidManifest.xml
video/app/src/main/AndroidManifest.xml
+0
-4
AppConfig.java
.../src/main/java/com/duben/dayplaylet/common/AppConfig.java
+2
-0
AlipayAuthManager.kt
...in/java/com/duben/dayplaylet/manager/AlipayAuthManager.kt
+23
-20
UserBean.java
...rc/main/java/com/duben/dayplaylet/mvp/model/UserBean.java
+10
-0
TrackPresenter.java
...a/com/duben/dayplaylet/mvp/presenters/TrackPresenter.java
+3
-43
LoanService.java
...p/src/main/java/com/duben/dayplaylet/net/LoanService.java
+12
-0
AwardActivity.kt
...n/java/com/duben/dayplaylet/ui/activitys/AwardActivity.kt
+0
-153
MainFragment.kt
...ain/java/com/duben/dayplaylet/ui/fragment/MainFragment.kt
+5
-2
MusicFragment.kt
...in/java/com/duben/dayplaylet/ui/fragment/MusicFragment.kt
+1
-11
RedpkgFragment.kt
...n/java/com/duben/dayplaylet/ui/fragment/RedpkgFragment.kt
+0
-5
activity_song_award.xml
video/app/src/main/res/layout/activity_song_award.xml
+5
-5
activity_task_award.xml
video/app/src/main/res/layout/activity_task_award.xml
+4
-4
No files found.
video/app/src/main/AndroidManifest.xml
View file @
8a4c3b5d
...
@@ -128,10 +128,6 @@
...
@@ -128,10 +128,6 @@
android:name=
".ui.activitys.AboutusActivity"
android:name=
".ui.activitys.AboutusActivity"
android:exported=
"false"
android:exported=
"false"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activitys.AwardActivity"
android:exported=
"false"
android:theme=
"@style/TransparentTheme"
/>
<activity
<activity
android:name=
".ui.activitys.LoadingActivity"
android:name=
".ui.activitys.LoadingActivity"
android:exported=
"false"
android:exported=
"false"
...
...
video/app/src/main/java/com/duben/dayplaylet/common/AppConfig.java
View file @
8a4c3b5d
...
@@ -10,6 +10,8 @@ public class AppConfig {
...
@@ -10,6 +10,8 @@ public class AppConfig {
public
static
boolean
app_updateing
=
false
;
public
static
boolean
app_updateing
=
false
;
public
static
boolean
mainShowHalfAd
=
false
;
public
static
boolean
mainShowHalfAd
=
false
;
public
static
int
fragmentClickFlag
=
0
;
public
static
int
fragmentClickFlag
=
0
;
public
static
int
riskPercentage
=
0
;
public
static
String
gromoreId
=
""
;
public
static
String
gromoreId
=
""
;
public
static
int
awardRedpkg
=
0
;
public
static
int
awardRedpkg
=
0
;
public
static
int
awardYuanbao
=
0
;
public
static
int
awardYuanbao
=
0
;
...
...
video/app/src/main/java/com/duben/dayplaylet/manager/AlipayAuthManager.kt
View file @
8a4c3b5d
...
@@ -13,6 +13,7 @@ import com.duben.dayplaylet.utils.ToastUtil
...
@@ -13,6 +13,7 @@ import com.duben.dayplaylet.utils.ToastUtil
import
com.duben.library.net.neterror.BaseSubscriber
import
com.duben.library.net.neterror.BaseSubscriber
import
com.duben.library.net.neterror.Throwable
import
com.duben.library.net.neterror.Throwable
import
com.duben.library.utils.json.JsonUtil
import
com.duben.library.utils.json.JsonUtil
import
com.google.gson.JsonObject
import
java.lang.ref.WeakReference
import
java.lang.ref.WeakReference
/**
/**
...
@@ -39,7 +40,7 @@ object AlipayAuthManager {
...
@@ -39,7 +40,7 @@ object AlipayAuthManager {
// 获取alipay_open_id,调支付时作为参数extern_token 的value
// 获取alipay_open_id,调支付时作为参数extern_token 的value
// 传入,则支付账户为该授权账户
// 传入,则支付账户为该授权账户
UserManager
.
getInstance
().
alipaySet
=
true
UserManager
.
getInstance
().
alipaySet
=
true
println
(
"mcg -->>>>> authinfo="
+
JsonUtil
.
toJson
(
authResult
))
println
(
"mcg -->>>>> authinfo="
+
JsonUtil
.
toJson
(
authResult
))
authListener
?.
authSuccess
()
authListener
?.
authSuccess
()
commitAlipayAutoInfo
(
JsonUtil
.
toJson
(
authResult
))
commitAlipayAutoInfo
(
JsonUtil
.
toJson
(
authResult
))
}
else
{
}
else
{
...
@@ -54,10 +55,11 @@ object AlipayAuthManager {
...
@@ -54,10 +55,11 @@ object AlipayAuthManager {
private
fun
commitAlipayAutoInfo
(
info
:
String
)
{
private
fun
commitAlipayAutoInfo
(
info
:
String
)
{
val
vo
=
HashMap
<
String
,
Any
>()
val
vo
=
HashMap
<
String
,
Any
>()
vo
.
put
(
"authInfo"
,
info
)
vo
.
put
(
"user_id"
,
UserManager
.
getInstance
().
userID
)
vo
.
put
(
"result"
,
info
)
val
baseApplication
=
MintsApplication
.
getContext
()
as
MintsApplication
val
baseApplication
=
MintsApplication
.
getContext
()
as
MintsApplication
AppHttpManager
.
getInstance
(
baseApplication
)
AppHttpManager
.
getInstance
(
baseApplication
)
.
call
(
baseApplication
.
loanService
.
cancelCollect
(
vo
),
.
call
(
baseApplication
.
loanService
.
reportAlipayMsg
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
Any
>>()
{
object
:
BaseSubscriber
<
BaseResponse
<
Any
>>()
{
override
fun
onError
(
e
:
Throwable
)
{
override
fun
onError
(
e
:
Throwable
)
{
...
@@ -76,19 +78,20 @@ object AlipayAuthManager {
...
@@ -76,19 +78,20 @@ object AlipayAuthManager {
authListener
=
listener
authListener
=
listener
val
weakReference
=
WeakReference
(
activity
)
val
weakReference
=
WeakReference
(
activity
)
println
(
"mcg -->>>>> 开始授权"
)
println
(
"mcg -->>>>> 开始授权"
)
val
vo
=
HashMap
<
String
,
Any
>()
vo
.
put
(
"user_id"
,
UserManager
.
getInstance
().
userID
)
val
baseApplication
=
MintsApplication
.
getContext
()
as
MintsApplication
AppHttpManager
.
getInstance
(
baseApplication
)
.
call
(
baseApplication
.
loanService
.
getAlipayAuthUrl
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
JsonObject
>>()
{
override
fun
onError
(
e
:
Throwable
)
{
// val baseApplication = MintsApplication.getContext() as MintsApplication
}
// AppHttpManager.getInstance(baseApplication)
// .call(baseApplication.loanService.homeV1Types,
override
fun
onNext
(
t
:
BaseResponse
<
JsonObject
>)
{
// object : BaseSubscriber<BaseResponse<Any>>() {
if
(
t
.
status
==
200
)
{
// override fun onError(e: Throwable) {
val
data
=
t
.
data
//
val
authInfo
=
data
[
"url"
].
asString
// }
//
//
// override fun onNext(t: BaseResponse<Any>) {
// if (t.status == 200) {
val
authInfo
=
""
val
authRunnable
=
Runnable
{
// 构造AuthTask 对象
val
authRunnable
=
Runnable
{
// 构造AuthTask 对象
val
authTask
=
AuthTask
(
weakReference
.
get
())
val
authTask
=
AuthTask
(
weakReference
.
get
())
// 调用授权接口,获取授权结果
// 调用授权接口,获取授权结果
...
@@ -102,11 +105,11 @@ object AlipayAuthManager {
...
@@ -102,11 +105,11 @@ object AlipayAuthManager {
// 必须异步调用
// 必须异步调用
val
authThread
=
Thread
(
authRunnable
)
val
authThread
=
Thread
(
authRunnable
)
authThread
.
start
()
authThread
.
start
()
//
} else {
}
else
{
//
ToastUtil.show(MintsApplication.getContext(), t.message)
ToastUtil
.
show
(
MintsApplication
.
getContext
(),
t
.
message
)
//
}
}
//
}
}
//
})
})
}
}
private
var
authListener
:
AuthListener
?
=
null
private
var
authListener
:
AuthListener
?
=
null
...
...
video/app/src/main/java/com/duben/dayplaylet/mvp/model/UserBean.java
View file @
8a4c3b5d
...
@@ -11,6 +11,16 @@ public class UserBean implements Serializable {
...
@@ -11,6 +11,16 @@ public class UserBean implements Serializable {
private
UserMsgBean
userMsg
;
private
UserMsgBean
userMsg
;
private
int
riskPercentage
;
public
int
getRiskPercentage
()
{
return
riskPercentage
;
}
public
void
setRiskPercentage
(
int
riskPercentage
)
{
this
.
riskPercentage
=
riskPercentage
;
}
public
UserMsgBean
getUserMsg
()
{
public
UserMsgBean
getUserMsg
()
{
return
userMsg
;
return
userMsg
;
}
}
...
...
video/app/src/main/java/com/duben/dayplaylet/mvp/presenters/TrackPresenter.java
View file @
8a4c3b5d
...
@@ -283,48 +283,6 @@ public class TrackPresenter extends BaseTrackPresenter {
...
@@ -283,48 +283,6 @@ public class TrackPresenter extends BaseTrackPresenter {
});
});
}
}
public
void
saveTerminalInfo
()
{
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
DeviceInfo
deviceInfo
=
DeviceInfo
.
Companion
.
getInstance
();
String
macAddress
=
deviceInfo
.
getMacAddress
();
String
mac
=
macAddress
.
replace
(
":"
,
""
);
vo
.
put
(
"androidid"
,
deviceInfo
.
getAndroidId
(
null
));
vo
.
put
(
"mac"
,
mac
);
vo
.
put
(
"mac1"
,
macAddress
);
vo
.
put
(
"os"
,
"android"
);
vo
.
put
(
"model"
,
deviceInfo
.
getBrand
()
+
" "
+
deviceInfo
.
getMobileModel
());
vo
.
put
(
"uuid"
,
new
DeviceUuidFactory
().
getDeviceUuid
());
vo
.
put
(
"osversion"
,
deviceInfo
.
getOSVersion
());
vo
.
put
(
"appversion"
,
deviceInfo
.
getVersionName
());
vo
.
put
(
"oaid"
,
MintsApplication
.
OAID
);
vo
.
put
(
"imei"
,
deviceInfo
.
getIMEI
());
vo
.
put
(
"shumeiId"
,
ShumeiManager
.
getInstance
().
getShumeiDeviceId
());
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
saveTerminalInfo
(
vo
),
new
BaseSubscriber
<
BaseResponse
<
Object
>>()
{
@Override
public
void
onCompleted
()
{
}
@Override
public
void
onError
(
Throwable
e
)
{
}
@Override
public
void
onNext
(
BaseResponse
<
Object
>
baseResponse
)
{
switch
(
baseResponse
.
getStatus
())
{
case
200
:
{
getMyInfo
();
}
}
}
});
}
public
void
commitVedio
(
HashMap
<
String
,
Object
>
vo
)
{
public
void
commitVedio
(
HashMap
<
String
,
Object
>
vo
)
{
AppHttpManager
.
getInstance
(
loanApplication
)
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
reportIndex
(
vo
),
.
call
(
loanService
.
reportIndex
(
vo
),
...
@@ -453,6 +411,8 @@ public class TrackPresenter extends BaseTrackPresenter {
...
@@ -453,6 +411,8 @@ public class TrackPresenter extends BaseTrackPresenter {
AppConfig
.
awardRedpkg
=
data
.
get
(
"coin"
).
getAsInt
();
AppConfig
.
awardRedpkg
=
data
.
get
(
"coin"
).
getAsInt
();
AppConfig
.
awardYuanbao
=
data
.
get
(
"di"
).
getAsInt
();
AppConfig
.
awardYuanbao
=
data
.
get
(
"di"
).
getAsInt
();
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
@@ -478,7 +438,7 @@ public class TrackPresenter extends BaseTrackPresenter {
...
@@ -478,7 +438,7 @@ public class TrackPresenter extends BaseTrackPresenter {
@Override
@Override
public
void
onNext
(
BaseResponse
<
JsonObject
>
baseResponse
)
{
public
void
onNext
(
BaseResponse
<
JsonObject
>
baseResponse
)
{
if
(
baseResponse
.
getStatus
()
!=
200
)
{
if
(
baseResponse
.
getStatus
()
!=
200
)
{
ToastUtil
.
show
(
MintsApplication
.
getContext
(),
baseResponse
.
getMessage
());
ToastUtil
.
show
Long
(
MintsApplication
.
getContext
(),
baseResponse
.
getMessage
());
}
}
}
}
});
});
...
...
video/app/src/main/java/com/duben/dayplaylet/net/LoanService.java
View file @
8a4c3b5d
...
@@ -329,6 +329,18 @@ public interface LoanService {
...
@@ -329,6 +329,18 @@ public interface LoanService {
@POST
(
"na/addTag"
)
@POST
(
"na/addTag"
)
Observable
<
BaseResponse
<
Object
>>
riskCmtInfo
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
Object
>>
riskCmtInfo
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 支付宝获取授权
*/
@POST
(
"api/user/getAlipayAuthUrl"
)
Observable
<
BaseResponse
<
JsonObject
>>
getAlipayAuthUrl
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 风控标记
*/
@POST
(
"api/user/reportAlipayMsg"
)
Observable
<
BaseResponse
<
Object
>>
reportAlipayMsg
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
* 默认http工厂
* 默认http工厂
*/
*/
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/activitys/AwardActivity.kt
deleted
100644 → 0
View file @
0b5c6d63
package
com.duben.dayplaylet.ui.activitys
import
android.os.Bundle
import
android.view.KeyEvent
import
android.view.View
import
com.duben.dayplaylet.R
import
com.duben.dayplaylet.common.AppConfig
import
com.duben.dayplaylet.mvp.model.CoinMsgBean
import
com.duben.dayplaylet.mvp.presenters.AwardPresenter
import
com.duben.dayplaylet.mvp.views.AwardView
import
com.duben.dayplaylet.ui.activitys.base.BaseActivity
import
com.duben.dayplaylet.ui.widgets.countdowntimer.CountDownTimerSupport
import
com.duben.dayplaylet.ui.widgets.countdowntimer.OnCountDownTimerListener
import
com.duben.library.utils.nodoubleclick.AntiShake
import
java.math.BigDecimal
/**
* 奖励弹窗
*/
class
AwardActivity
:
BaseActivity
(),
AwardView
,
View
.
OnClickListener
{
private
val
awardPresenter
by
lazy
{
AwardPresenter
()
}
private
var
mTimer
:
CountDownTimerSupport
?
=
null
companion
object
{
const
val
REDPACKET
=
"REDPACKET"
const
val
YUANBAO
=
"YUANBAO"
const
val
CARRIERTYPE
=
"CARRIERTYPE"
}
private
var
redPacket
=
0.0
private
var
yuanbao
=
0
private
var
carrierType
=
""
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_award
override
fun
isApplyKitKatTranslucency
()
=
false
override
fun
toggleOverridePendingTransition
()
=
true
override
fun
getOverridePendingTransitionMode
()
=
TransitionMode
.
SCALE
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
super
.
getBundleExtras
(
extras
)
extras
?.
let
{
redPacket
=
it
.
getDouble
(
REDPACKET
,
0.0
)
if
(
redPacket
==
0.0
)
{
redPacket
=
AppConfig
.
awardRedpkg
.
toDouble
()
}
yuanbao
=
it
.
getInt
(
YUANBAO
,
0
)
if
(
yuanbao
==
0
)
{
yuanbao
=
AppConfig
.
awardYuanbao
}
carrierType
=
it
.
getString
(
carrierType
,
""
)
}
}
override
fun
initViewsAndEvents
()
{
awardPresenter
.
attachView
(
this
)
initListener
()
startTime
()
}
private
fun
initListener
()
{
// tv_nine_know_next.setOnClickListener(this)
}
override
fun
onResume
()
{
super
.
onResume
()
if
(!
this
@AwardActivity
.
isFinishing
)
{
// if (AntiShake.check(icAwardBg?.id)) return
awardPresenter
.
getCoinMsg
()
}
}
override
fun
finish
()
{
super
.
finish
()
hideLoading
()
AppConfig
.
awardRedpkg
=
0
AppConfig
.
awardYuanbao
=
0
AppConfig
.
gromoreId
=
""
overridePendingTransition
(
0
,
R
.
anim
.
scale_out
)
}
override
fun
onDestroy
()
{
AppConfig
.
awardRedpkg
=
0
AppConfig
.
awardYuanbao
=
0
AppConfig
.
gromoreId
=
""
mTimer
?.
stop
()
mTimer
=
null
awardPresenter
.
detachView
()
super
.
onDestroy
()
}
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.tv_nine_know_next -> {
// finish()
// }
}
}
/**
* 弹窗倒计时
*/
private
fun
startTime
()
{
mTimer
=
CountDownTimerSupport
(
3000L
,
1000L
)
mTimer
?.
setOnCountDownTimerListener
(
object
:
OnCountDownTimerListener
{
override
fun
onTick
(
millisUntilFinished
:
Long
)
{
if
(!
this
@AwardActivity
.
isFinishing
)
{
// 防止时时获取不到金币 , 倒计时延迟展示
if
(
millisUntilFinished
==
1000L
&&
(
AppConfig
.
awardRedpkg
>
0
||
AppConfig
.
awardYuanbao
>
0
))
{
//
}
}
}
override
fun
onFinish
()
{
if
(!
this
@AwardActivity
.
isFinishing
)
{
}
}
})
mTimer
?.
start
()
}
override
fun
getUserTaskMsgSuc
(
data
:
CoinMsgBean
)
{
if
(!
this
@AwardActivity
.
isFinishing
)
{
val
sumCoin
=
data
.
coin
.
toString
()
val
allcoinBig
=
BigDecimal
(
sumCoin
)
val
rateBig
=
BigDecimal
(
"10000"
)
val
cashStr
=
allcoinBig
.
divide
(
rateBig
).
setScale
(
2
,
BigDecimal
.
ROUND_DOWN
).
toString
()
// 更新金币数
// UserManager.getInstance().userGold = data.coin.toString()
}
}
}
\ No newline at end of file
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/MainFragment.kt
View file @
8a4c3b5d
...
@@ -128,7 +128,9 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
...
@@ -128,7 +128,9 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
if
(
AppConfig
.
mainShowHalfAd
)
{
if
(
AppConfig
.
mainShowHalfAd
)
{
AppConfig
.
mainShowHalfAd
=
false
AppConfig
.
mainShowHalfAd
=
false
HalfScreenManager
.
getInstance
().
showAd
(
requireActivity
(),
null
)
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
HalfScreenManager
.
getInstance
().
showAd
(
requireActivity
(),
null
)
},
200
)
}
}
}
}
}
}
...
@@ -291,6 +293,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
...
@@ -291,6 +293,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
if
(
AppConfig
.
fragmentClickFlag
!=
Constant
.
FRAGMENT_CLICK_ONE
)
return
if
(
AppConfig
.
fragmentClickFlag
!=
Constant
.
FRAGMENT_CLICK_ONE
)
return
this
.
userInfo
=
user
.
userMsg
this
.
userInfo
=
user
.
userMsg
AppConfig
.
riskPercentage
=
user
.
riskPercentage
UserManager
.
getInstance
().
saveUserInfo
(
user
)
UserManager
.
getInstance
().
saveUserInfo
(
user
)
tv_cash
.
text
=
"${FormatUtil.getCashFormaet(user.userMsg.coin)}元"
tv_cash
.
text
=
"${FormatUtil.getCashFormaet(user.userMsg.coin)}元"
...
@@ -529,7 +532,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
...
@@ -529,7 +532,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
}
override
fun
authFail
(
resultStatus
:
String
)
{
override
fun
authFail
(
resultStatus
:
String
)
{
showToast
(
"支付宝授权失败"
+
resultStatus
)
showToast
(
"支付宝授权失败
"
+
resultStatus
)
}
}
})
})
}
}
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/MusicFragment.kt
View file @
8a4c3b5d
...
@@ -32,15 +32,14 @@ import com.duben.dayplaylet.ad.AdManager
...
@@ -32,15 +32,14 @@ import com.duben.dayplaylet.ad.AdManager
import
com.duben.dayplaylet.ad.AdStatusListener
import
com.duben.dayplaylet.ad.AdStatusListener
import
com.duben.dayplaylet.ad.NoPreAdManager
import
com.duben.dayplaylet.ad.NoPreAdManager
import
com.duben.dayplaylet.ad.express.MyExpressManager
import
com.duben.dayplaylet.ad.express.MyExpressManager
import
com.duben.dayplaylet.ad.half.HalfScreenManager
import
com.duben.dayplaylet.common.AppConfig
import
com.duben.dayplaylet.common.AppConfig
import
com.duben.dayplaylet.common.Constant
import
com.duben.dayplaylet.common.Constant
import
com.duben.dayplaylet.manager.DPHolder
import
com.duben.dayplaylet.manager.DPHolder
import
com.duben.dayplaylet.mvp.model.MusicBean
import
com.duben.dayplaylet.mvp.model.MusicBean
import
com.duben.dayplaylet.mvp.presenters.MusicPresenter
import
com.duben.dayplaylet.mvp.presenters.MusicPresenter
import
com.duben.dayplaylet.mvp.views.MusicView
import
com.duben.dayplaylet.mvp.views.MusicView
import
com.duben.dayplaylet.ui.activitys.NineActivity
import
com.duben.dayplaylet.ui.activitys.MainActivity
import
com.duben.dayplaylet.ui.activitys.MainActivity
import
com.duben.dayplaylet.ui.activitys.NineActivity
import
com.duben.dayplaylet.ui.activitys.SongAwardActivity
import
com.duben.dayplaylet.ui.activitys.SongAwardActivity
import
com.duben.dayplaylet.ui.fragment.base.LazyLoadBaseFragment
import
com.duben.dayplaylet.ui.fragment.base.LazyLoadBaseFragment
import
com.duben.dayplaylet.ui.widgets.countdowntimer.CountDownTimerSupport
import
com.duben.dayplaylet.ui.widgets.countdowntimer.CountDownTimerSupport
...
@@ -637,13 +636,6 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView, View.OnClickListener {
...
@@ -637,13 +636,6 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView, View.OnClickListener {
},
800
)
},
800
)
},
100
)
},
100
)
}
}
HalfScreenManager
.
getInstance
().
preLoadAd
(
requireActivity
())
mainHandler
.
postDelayed
({
HalfScreenManager
.
getInstance
().
showAd
(
requireActivity
(),
null
)
cl_reward
.
visibility
=
View
.
GONE
},
1500
)
}
}
override
fun
reportAddCoinMsgSuc
(
coin
:
Int
,
di
:
Int
)
{
override
fun
reportAddCoinMsgSuc
(
coin
:
Int
,
di
:
Int
)
{
...
@@ -670,8 +662,6 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView, View.OnClickListener {
...
@@ -670,8 +662,6 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView, View.OnClickListener {
}
}
private
fun
awardVideo
(
carrierType
:
String
)
{
private
fun
awardVideo
(
carrierType
:
String
)
{
HalfScreenManager
.
getInstance
().
preLoadAd
(
requireActivity
())
AdManager
.
instance
.
showAd
(
requireActivity
(),
carrierType
,
AdManager
.
instance
.
showAd
(
requireActivity
(),
carrierType
,
object
:
AdStatusListener
{
object
:
AdStatusListener
{
var
canFail
=
false
var
canFail
=
false
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/RedpkgFragment.kt
View file @
8a4c3b5d
...
@@ -180,8 +180,6 @@ class RedpkgFragment : LazyLoadBaseFragment(), View.OnClickListener, RedpkgView
...
@@ -180,8 +180,6 @@ class RedpkgFragment : LazyLoadBaseFragment(), View.OnClickListener, RedpkgView
private
fun
awardVideo
(
carrierType
:
String
,
cash
:
Double
,
unitId
:
String
=
""
)
{
private
fun
awardVideo
(
carrierType
:
String
,
cash
:
Double
,
unitId
:
String
=
""
)
{
mCarrierType
=
carrierType
mCarrierType
=
carrierType
HalfScreenManager
.
getInstance
().
preLoadAd
(
requireActivity
())
AdManager
.
instance
.
showAd
(
requireActivity
(),
carrierType
,
AdManager
.
instance
.
showAd
(
requireActivity
(),
carrierType
,
object
:
AdStatusListener
{
object
:
AdStatusListener
{
var
canFail
=
false
var
canFail
=
false
...
@@ -378,8 +376,6 @@ class RedpkgFragment : LazyLoadBaseFragment(), View.OnClickListener, RedpkgView
...
@@ -378,8 +376,6 @@ class RedpkgFragment : LazyLoadBaseFragment(), View.OnClickListener, RedpkgView
}
}
private
fun
showRedPkgAwardDialog
(
cash
:
Int
,
showBtn
:
Boolean
)
{
private
fun
showRedPkgAwardDialog
(
cash
:
Int
,
showBtn
:
Boolean
)
{
HalfScreenManager
.
getInstance
().
preLoadAd
(
requireActivity
())
mRedPkgAwardDialog
=
mRedPkgAwardDialog
=
RedPkgAwardDialog
(
RedPkgAwardDialog
(
requireContext
(),
requireContext
(),
...
@@ -395,7 +391,6 @@ class RedpkgFragment : LazyLoadBaseFragment(), View.OnClickListener, RedpkgView
...
@@ -395,7 +391,6 @@ class RedpkgFragment : LazyLoadBaseFragment(), View.OnClickListener, RedpkgView
awardVideo
(
Constant
.
CARRIERTYPE_REWARD_HONGBAO_MORE
,
0.0
)
awardVideo
(
Constant
.
CARRIERTYPE_REWARD_HONGBAO_MORE
,
0.0
)
}
}
R
.
id
.
ib_close
->
{
R
.
id
.
ib_close
->
{
HalfScreenManager
.
getInstance
().
showAd
(
requireActivity
(),
null
)
}
}
else
->
{}
else
->
{}
}
}
...
...
video/app/src/main/res/layout/activity_song_award.xml
View file @
8a4c3b5d
...
@@ -33,9 +33,7 @@
...
@@ -33,9 +33,7 @@
android:layout_marginTop=
"110dp"
android:layout_marginTop=
"110dp"
android:layout_marginRight=
"20dp"
android:layout_marginRight=
"20dp"
android:background=
"@drawable/shape_bg_task"
android:background=
"@drawable/shape_bg_task"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
>
android:paddingLeft=
"20dp"
android:paddingRight=
"20dp"
>
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_award_redpkg"
android:id=
"@+id/ll_award_redpkg"
...
@@ -44,9 +42,9 @@
...
@@ -44,9 +42,9 @@
android:layout_gravity=
"center_horizontal|center_vertical"
android:layout_gravity=
"center_horizontal|center_vertical"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:orientation=
"vertical"
android:orientation=
"vertical"
android:paddingLeft=
"
10
dp"
android:paddingLeft=
"
8
dp"
android:paddingTop=
"16dp"
android:paddingTop=
"16dp"
android:paddingRight=
"
10
dp"
android:paddingRight=
"
8
dp"
android:paddingBottom=
"6dp"
>
android:paddingBottom=
"6dp"
>
<ImageView
<ImageView
...
@@ -70,6 +68,7 @@
...
@@ -70,6 +68,7 @@
android:paddingLeft=
"18dp"
android:paddingLeft=
"18dp"
android:paddingTop=
"3dp"
android:paddingTop=
"3dp"
android:paddingRight=
"18dp"
android:paddingRight=
"18dp"
android:singleLine=
"true"
android:paddingBottom=
"3dp"
android:paddingBottom=
"3dp"
android:text=
"+10"
android:text=
"+10"
android:textColor=
"@color/red"
android:textColor=
"@color/red"
...
@@ -111,6 +110,7 @@
...
@@ -111,6 +110,7 @@
android:gravity=
"center"
android:gravity=
"center"
android:paddingLeft=
"18dp"
android:paddingLeft=
"18dp"
android:paddingTop=
"3dp"
android:paddingTop=
"3dp"
android:singleLine=
"true"
android:paddingRight=
"18dp"
android:paddingRight=
"18dp"
android:paddingBottom=
"3dp"
android:paddingBottom=
"3dp"
android:text=
"+10"
android:text=
"+10"
...
...
video/app/src/main/res/layout/activity_task_award.xml
View file @
8a4c3b5d
...
@@ -18,11 +18,11 @@
...
@@ -18,11 +18,11 @@
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<ImageView
<ImageView
android:layout_marginTop=
"10dp"
android:id=
"@+id/iv_award_quit"
android:id=
"@+id/iv_award_quit"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:layout_gravity=
"right"
android:layout_marginTop=
"10dp"
android:src=
"@mipmap/ic_draw_quit"
/>
android:src=
"@mipmap/ic_draw_quit"
/>
...
@@ -33,9 +33,7 @@
...
@@ -33,9 +33,7 @@
android:layout_marginTop=
"90dp"
android:layout_marginTop=
"90dp"
android:layout_marginRight=
"20dp"
android:layout_marginRight=
"20dp"
android:background=
"@drawable/shape_bg_task"
android:background=
"@drawable/shape_bg_task"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
>
android:paddingLeft=
"20dp"
android:paddingRight=
"20dp"
>
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_award_redpkg"
android:id=
"@+id/ll_award_redpkg"
...
@@ -71,6 +69,7 @@
...
@@ -71,6 +69,7 @@
android:paddingTop=
"3dp"
android:paddingTop=
"3dp"
android:paddingRight=
"18dp"
android:paddingRight=
"18dp"
android:paddingBottom=
"3dp"
android:paddingBottom=
"3dp"
android:singleLine=
"true"
android:text=
"+10"
android:text=
"+10"
android:textColor=
"@color/red"
android:textColor=
"@color/red"
android:textSize=
"18sp"
></TextView>
android:textSize=
"18sp"
></TextView>
...
@@ -122,6 +121,7 @@
...
@@ -122,6 +121,7 @@
android:paddingTop=
"3dp"
android:paddingTop=
"3dp"
android:paddingRight=
"18dp"
android:paddingRight=
"18dp"
android:paddingBottom=
"3dp"
android:paddingBottom=
"3dp"
android:singleLine=
"true"
android:text=
"+10"
android:text=
"+10"
android:textColor=
"@color/red"
android:textColor=
"@color/red"
android:textSize=
"18sp"
></TextView>
android:textSize=
"18sp"
></TextView>
...
...
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