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
698de6d3
Commit
698de6d3
authored
Jan 15, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
6fe62a9c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
8 deletions
+52
-8
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+1
-1
CoralDownload.java
...main/java/com/mints/goodmoney/ad/tz_ad/CoralDownload.java
+15
-1
VideoAdingManager.java
.../java/com/mints/goodmoney/ad/video/VideoAdingManager.java
+2
-1
TzManager.kt
...pp/src/main/java/com/mints/goodmoney/manager/TzManager.kt
+0
-1
TaskActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/TaskActivity.kt
+24
-1
TaskDialog.kt
...rc/main/java/com/mints/goodmoney/ui/widgets/TaskDialog.kt
+9
-2
activity_walk.xml
GoodMoney/app/src/main/res/layout/activity_walk.xml
+1
-1
No files found.
GoodMoney/app/src/main/AndroidManifest.xml
View file @
698de6d3
...
...
@@ -203,7 +203,7 @@
android:name=
".ui.activitys.TaskActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activitys.KylV
edi
oActivity"
android:name=
".ui.activitys.KylV
ide
oActivity"
android:configChanges=
"orientation|screenSize|keyboardHidden"
android:screenOrientation=
"portrait"
/>
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/tz_ad/CoralDownload.java
View file @
698de6d3
...
...
@@ -172,7 +172,9 @@ public final class CoralDownload {
*/
@Override
public
boolean
onAppDownloading
(
@Nullable
CoralAD
ad
,
@Nullable
String
downloadUrl
)
{
// i = false;
if
(
mOnAdLoadListener
!=
null
)
{
mOnAdLoadListener
.
onSDKDownloadStart
();
}
return
false
;
}
...
...
@@ -188,6 +190,9 @@ public final class CoralDownload {
*/
@Override
public
boolean
onAppDownloaded
(
@Nullable
CoralAD
ad
,
@Nullable
String
downloadUrl
,
@Nullable
String
localFile
)
{
if
(
mOnAdLoadListener
!=
null
)
{
mOnAdLoadListener
.
onSDKDownloaded
();
}
return
false
;
}
...
...
@@ -203,6 +208,9 @@ public final class CoralDownload {
*/
@Override
public
boolean
onAppInstalled
(
@Nullable
CoralAD
ad
,
@Nullable
String
downloadUrl
,
@Nullable
String
localFile
)
{
if
(
mOnAdLoadListener
!=
null
)
{
mOnAdLoadListener
.
onSDKInstalled
();
}
return
false
;
}
...
...
@@ -239,6 +247,12 @@ public final class CoralDownload {
void
onLoadFail
();
void
onSDKDownloadStart
();
void
onSDKDownloaded
();
void
onSDKInstalled
();
void
onGetDownloadProcess
(
DownloadProcess
downloadProcess
);
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/VideoAdingManager.java
View file @
698de6d3
...
...
@@ -235,7 +235,7 @@ public class VideoAdingManager {
LogUtil
.
d
(
TAG
,
"权重值:sdhzWeight:"
+
wnWeight
);
}
if
(
AppConfig
.
shVideoAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
wn
Weight
,
Constant
.
SH_VEDIO_AD
));
weightList
.
add
(
new
WeightBean
(
shVideo
Weight
,
Constant
.
SH_VEDIO_AD
));
weight
=
weight
+
shVideoWeight
;
LogUtil
.
d
(
TAG
,
"权重值:shWeight:"
+
shVideoWeight
);
}
...
...
@@ -248,6 +248,7 @@ public class VideoAdingManager {
LogUtil
.
d
(
TAG
,
"2、权重随机值:"
+
randomWeight
);
for
(
WeightBean
weightBean
:
weightList
)
{
LogUtil
.
d
(
TAG
,
weightBean
.
getType
()
+
" -> "
+
weightBean
.
getWeight
());
randomWeight
-=
weightBean
.
getWeight
();
if
(
randomWeight
<=
0
)
{
LogUtil
.
d
(
TAG
,
"3、权重结果:"
+
weightBean
.
getType
());
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/TzManager.kt
View file @
698de6d3
...
...
@@ -23,7 +23,6 @@ object TzManager {
.
appSecret
(
"1c00e59f2257bdfdd4ad9363b41621b5"
)
.
appChannel
(
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
))
.
forTest
(
BuildConfig
.
DEBUG
)
.
verbose
(
BuildConfig
.
DEBUG
)
.
build
(),
object
:
IADEngineState
{
override
fun
onIdle
()
{}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/TaskActivity.kt
View file @
698de6d3
...
...
@@ -23,6 +23,7 @@ import com.mints.goodmoney.ui.widgets.DialogListener
import
com.mints.goodmoney.ui.widgets.TaskDialog
import
com.mints.goodmoney.utils.AppUtil
import
com.mints.goodmoney.utils.CacheUtil
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.SpacesItemDecoration
import
com.scwang.smartrefresh.layout.api.RefreshLayout
import
com.scwang.smartrefresh.layout.listener.OnRefreshListener
...
...
@@ -109,7 +110,11 @@ class TaskActivity : BaseActivity(), OnItemClickListener, OnRefreshListener, Cor
DownloadApkManager
.
tryOnceInstallApk
()
refreshDemoTask
()
try
{
refreshDemoTask
()
}
catch
(
e
:
Exception
)
{
LogUtil
.
e
(
e
.
printStackTrace
())
}
}
/**
...
...
@@ -199,6 +204,24 @@ class TaskActivity : BaseActivity(), OnItemClickListener, OnRefreshListener, Cor
srl_task
.
finishRefresh
(
false
)
}
override
fun
onSDKDownloadStart
()
{
taskDialog
?.
dismiss
()
// SDK上报开始下载
mDownloadProcess
?.
reportDownloadStart
(
false
)
registerBroad
()
}
override
fun
onSDKDownloaded
()
{
// SDK上报下载完成
mDownloadProcess
?.
reportInstallSuccess
(
false
)
}
override
fun
onSDKInstalled
()
{
// SDK上报安装完成
mDownloadProcess
?.
reportInstallSuccess
(
false
)
}
override
fun
onGetDownloadProcess
(
downloadProcess
:
DownloadProcess
?)
{
// 点击之后回调下载数据
mDownloadProcess
=
downloadProcess
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/TaskDialog.kt
View file @
698de6d3
...
...
@@ -23,7 +23,7 @@ class TaskDialog(context: Context) :
private
val
tvInfo
:
TextView
private
val
ivAvatar
:
ImageView
private
val
textView
:
TextView
private
va
l
adContainer
:
ADContainer
private
va
r
adContainer
:
ADContainer
?
=
null
init
{
setContentView
(
R
.
layout
.
dialog_task
)
...
...
@@ -52,6 +52,7 @@ class TaskDialog(context: Context) :
// tvTitle.setOnClickListener(listener)
// tvInfo.setOnClickListener(listener)
// btnDownload.setOnClickListener(listener)
}
fun
setData
(
data
:
CoralAD
,
seconds
:
Int
,
coin
:
Int
)
{
...
...
@@ -61,6 +62,12 @@ class TaskDialog(context: Context) :
GlideUtils
.
loadImageView
(
context
,
data
.
icon
,
ivAvatar
)
tvInfo
.
text
=
data
.
title
adContainer
.
setAdModel
(
data
)
adContainer
?.
setAdModel
(
data
)
}
override
fun
dismiss
()
{
super
.
dismiss
()
adContainer
?.
removeAllViews
()
adContainer
=
null
}
}
\ No newline at end of file
GoodMoney/app/src/main/res/layout/activity_walk.xml
View file @
698de6d3
...
...
@@ -29,7 +29,7 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"60dp"
android:src=
"@mipmap/ic_font_wa
ter
"
/>
android:src=
"@mipmap/ic_font_wa
lk
"
/>
<com.mints.goodmoney.ui.widgets.StepView
android:id=
"@+id/svWalk"
...
...
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