Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
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_goodmoney
Commits
2c8070d1
Commit
2c8070d1
authored
Jan 30, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
61cd15b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
13 deletions
+23
-13
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+6
-2
TaskCpdActivity.kt
.../java/com/mints/goodmoney/ui/activitys/TaskCpdActivity.kt
+17
-11
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
2c8070d1
...
...
@@ -385,12 +385,13 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
videoAdingManager
.
setVideoAdingListener
(
null
)
videoAdingManager
.
onDestory
()
awardPresenter
.
detachView
()
if
(
mReceiverBroadcastReceiver
!=
null
)
{
mContext
.
stopService
(
Intent
(
context
,
AppInstallService
::
class
.
java
))
mContext
.
unregisterReceiver
(
mReceiverBroadcastReceiver
)
}
awardPresenter
.
detachView
()
}
override
fun
onKeyDown
(
keyCode
:
Int
,
event
:
KeyEvent
):
Boolean
{
...
...
@@ -634,6 +635,9 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
private
fun
refreshHighTask
(
highCoin
:
Int
)
{
if
(
mCurrentPkg
==
null
)
{
// 用户点击激励视频但并未下载安装
// 超级翻倍领取状态 0-去下载 1-去试玩 2-试玩时间不足 3-领取奖励 4-放弃试玩
//(mReceiverBroadcastReceiver != null && superTaskStatus == 0) 表示 点击超级翻倍去下载
//(mReceiverBroadcastReceiver == null && superTaskStatus == 4) 表示 普通任务未下载
if
((
mReceiverBroadcastReceiver
!=
null
&&
superTaskStatus
==
0
)
||
(
mReceiverBroadcastReceiver
==
null
&&
superTaskStatus
==
4
))
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/TaskCpdActivity.kt
View file @
2c8070d1
...
...
@@ -22,7 +22,7 @@ import kotlinx.android.synthetic.main.header_layout.*
*/
class
TaskCpdActivity
:
BaseActivity
(),
View
.
OnClickListener
{
private
lateinit
var
cdaa
:
CustomDialogAsApple
private
var
cdaa
:
CustomDialogAsApple
?
=
null
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_task_cpd
...
...
@@ -39,6 +39,12 @@ class TaskCpdActivity : BaseActivity(), View.OnClickListener {
initListener
()
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
cdaa
=
null
}
override
fun
onBackPressed
()
{
backDialog
()
}
...
...
@@ -56,11 +62,11 @@ class TaskCpdActivity : BaseActivity(), View.OnClickListener {
private
fun
initViewAndData
()
{
val
tabs
:
MutableList
<
String
>
=
ArrayList
()
val
fragments
:
MutableList
<
Fragment
>
=
ArrayList
()
tabs
.
add
(
"
试玩
"
)
tabs
.
add
(
"
每日精选
"
)
fragments
.
add
(
TaskCpdFragment
())
if
(
AppConfig
.
useAppCpdModelShow
)
{
tabs
.
add
(
"
点击
"
)
tabs
.
add
(
"
获取更多金币
"
)
fragments
.
add
(
TaskCpdHistoryFragment
())
xtTaskCpd
.
visibility
=
View
.
VISIBLE
}
else
{
...
...
@@ -79,10 +85,10 @@ class TaskCpdActivity : BaseActivity(), View.OnClickListener {
}
private
fun
backDialog
()
{
cdaa
=
CustomDialogAsApple
(
context
,
object
:
DialogListener
()
{
cdaa
=
CustomDialogAsApple
(
this
,
object
:
DialogListener
()
{
override
fun
onClick
(
v
:
View
)
{
if
(
cdaa
.
isShowing
)
{
cdaa
.
dismiss
()
if
(
cdaa
!=
null
&&
cdaa
!!
.
isShowing
)
{
cdaa
!!
.
dismiss
()
}
when
(
v
.
id
)
{
R
.
id
.
dialog_btn_right
->
{
...
...
@@ -91,11 +97,11 @@ class TaskCpdActivity : BaseActivity(), View.OnClickListener {
}
}
})
cdaa
.
setTitle
(
"提示"
)
cdaa
.
setContent
(
"退出当前页面将会重置当前任务状态"
)
cdaa
.
setLeft
(
"取消"
)
cdaa
.
setRight
(
"确定"
)
cdaa
.
show
()
cdaa
!!
.
setTitle
(
"提示"
)
cdaa
!!
.
setContent
(
"退出当前页面将会重置当前任务状态"
)
cdaa
!!
.
setLeft
(
"取消"
)
cdaa
!!
.
setRight
(
"确定"
)
cdaa
!!
.
show
()
}
}
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