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
7dabf76c
Commit
7dabf76c
authored
Jan 19, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
金币弹框页添加超级翻倍
parent
d140cdb2
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
389 additions
and
135 deletions
+389
-135
InitAppService.kt
...y/app/src/main/java/com/mints/goodmoney/InitAppService.kt
+3
-1
MintsApplication.java
...p/src/main/java/com/mints/goodmoney/MintsApplication.java
+9
-25
CoralDownload.java
...n/java/com/mints/goodmoney/ad/download/CoralDownload.java
+2
-2
AppTryPlayManager.kt
...ain/java/com/mints/goodmoney/manager/AppTryPlayManager.kt
+1
-1
AwardPresenter.java
...va/com/mints/goodmoney/mvp/presenters/AwardPresenter.java
+7
-1
AwardView.kt
.../src/main/java/com/mints/goodmoney/mvp/views/AwardView.kt
+1
-2
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+243
-57
TaskActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/TaskActivity.kt
+6
-4
AppUtil.kt
...ey/app/src/main/java/com/mints/goodmoney/utils/AppUtil.kt
+2
-2
shape_btn_gold_left.xml
GoodMoney/app/src/main/res/drawable/shape_btn_gold_left.xml
+10
-0
shape_btn_gold_right.xml
GoodMoney/app/src/main/res/drawable/shape_btn_gold_right.xml
+10
-0
shape_tips.xml
GoodMoney/app/src/main/res/drawable/shape_tips.xml
+1
-1
activity_award.xml
GoodMoney/app/src/main/res/layout/activity_award.xml
+92
-38
item_share_view.xml
GoodMoney/app/src/main/res/layout/item_share_view.xml
+1
-1
icon_video.png
GoodMoney/app/src/main/res/mipmap-xhdpi/icon_video.png
+0
-0
colors.xml
GoodMoney/app/src/main/res/values/colors.xml
+1
-0
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/InitAppService.kt
View file @
7dabf76c
...
...
@@ -81,13 +81,15 @@ class InitAppService : IntentService("InitializeService") {
PRDownloader
.
initialize
(
this
,
config
)
}
/**
* 微转分享
*/
private
fun
initWzShare
()
{
val
iwxapi
=
WXAPIFactory
.
createWXAPI
(
this
,
"wxc8ac2985f6a805e2"
,
false
)
iwxapi
.
registerApp
(
"wxc8ac2985f6a805e2"
)
XzArticleSdk
.
get
().
init
(
MintsApplication
.
getContext
(),
iwxapi
,
"151"
,
"haozhuanqian"
)
}
/**
* 绑定jpush
*/
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/MintsApplication.java
View file @
7dabf76c
...
...
@@ -10,8 +10,6 @@ import android.webkit.WebView;
import
androidx.localbroadcastmanager.content.LocalBroadcastManager
;
import
androidx.multidex.MultiDexApplication
;
import
com.downloader.PRDownloader
;
import
com.downloader.PRDownloaderConfig
;
import
com.hjq.toast.ToastUtils
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.manager.ChannelManager
;
...
...
@@ -121,16 +119,6 @@ public class MintsApplication extends MultiDexApplication {
// 按渠道匹配代码位
ChannelManager
.
INSTANCE
.
updataCodeIdForRegisterChannel
(
null
);
// 子线程初始化三方SDK
String
processName
=
SystemUtils
.
INSTANCE
.
getProcessName
(
this
,
android
.
os
.
Process
.
myPid
());
if
(
processName
!=
null
)
{
// 判断onCreate方法执行是否在当前应用的application上
boolean
defaultProcess
=
TextUtils
.
equals
(
processName
,
Constant
.
MINTS_PKG_NAME
);
if
(
defaultProcess
)
{
InitAppService
.
Companion
.
start
(
this
);
//初始化数据
}
}
// 优量汇
YlhAdManager
.
INSTANCE
.
initYlhAd
(
this
);
...
...
@@ -158,12 +146,18 @@ public class MintsApplication extends MultiDexApplication {
// 自定义logger
bindLogger
();
// PR下载附件
// initPRDownloader();
// 天卓珊瑚
TzManager
.
INSTANCE
.
initTz
(
this
);
// 子线程初始化三方SDK
String
processName
=
SystemUtils
.
INSTANCE
.
getProcessName
(
this
,
android
.
os
.
Process
.
myPid
());
if
(
processName
!=
null
)
{
// 判断onCreate方法执行是否在当前应用的application上
boolean
defaultProcess
=
TextUtils
.
equals
(
processName
,
Constant
.
MINTS_PKG_NAME
);
if
(
defaultProcess
)
{
InitAppService
.
Companion
.
start
(
this
);
//初始化数据
}
}
}
/**
...
...
@@ -197,16 +191,6 @@ public class MintsApplication extends MultiDexApplication {
Logger
.
addLogAdapter
(
new
AndroidLogAdapter
(
formatStrategy
));
}
/**
* PR下载附件
*/
private
void
initPRDownloader
()
{
PRDownloaderConfig
config
=
PRDownloaderConfig
.
newBuilder
()
.
setDatabaseEnabled
(
true
)
.
build
();
PRDownloader
.
initialize
(
this
,
config
);
}
private
MiitHelper
.
AppIdsUpdater
appIdsUpdater
=
ids
->
OAID
=
ids
;
/**
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/
tz_
ad/CoralDownload.java
→
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/
downlo
ad/CoralDownload.java
View file @
7dabf76c
package
com
.
mints
.
goodmoney
.
ad
.
tz_
ad
;
package
com
.
mints
.
goodmoney
.
ad
.
downlo
ad
;
import
androidx.annotation.Nullable
;
...
...
@@ -20,7 +20,7 @@ import java.util.HashMap;
import
java.util.List
;
/**
*
下载
*
珊瑚CPD下载安装试玩
*/
public
final
class
CoralDownload
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/AppTryPlayManager.kt
View file @
7dabf76c
...
...
@@ -21,7 +21,7 @@ object AppTryPlayManager {
fun
getTryPlayIsOK
(
pkg
:
String
,
useTime
:
Int
):
Boolean
{
val
timePkgUsed
=
AppUtil
.
getTimePkgUsed
(
MintsApplication
.
getContext
(),
pkg
)
LogUtil
.
d
(
"A
AAAAAAAA
"
+
timePkgUsed
)
LogUtil
.
d
(
"A
ppTryPlayManager ->
"
+
timePkgUsed
)
return
timePkgUsed
>=
useTime
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/AwardPresenter.java
View file @
7dabf76c
...
...
@@ -57,7 +57,13 @@ public class AwardPresenter extends BasePresenter<AwardView> {
if
(
riskinfoRateElement
!=
null
)
{
riskFlag
=
data
.
get
(
"riskinfoRate"
).
getAsBoolean
();
}
view
.
getUserTaskMsgSuc
(
data
.
get
(
"coin"
).
getAsInt
(),
riskFlag
);
boolean
hideSomeodular
=
false
;
JsonElement
hideSomeodularElement
=
data
.
get
(
"hideSomeodular"
);
if
(
hideSomeodularElement
!=
null
)
{
hideSomeodular
=
data
.
get
(
"hideSomeodular"
).
getAsBoolean
();
}
view
.
getUserTaskMsgSuc
(
data
.
get
(
"coin"
).
getAsInt
(),
riskFlag
,
hideSomeodular
);
}
break
;
default
:
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/views/AwardView.kt
View file @
7dabf76c
package
com.mints.goodmoney.mvp.views
import
com.mints.goodmoney.mvp.model.UserTaskMsgBean
interface
AwardView
:
BaseView
{
/**
* 获取用户配置信息成功
*/
fun
getUserTaskMsgSuc
(
coin
:
Int
,
riskFlag
:
Boolean
)
fun
getUserTaskMsgSuc
(
coin
:
Int
,
riskFlag
:
Boolean
,
hideSomeodular
:
Boolean
)
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
7dabf76c
This diff is collapsed.
Click to expand it.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/TaskActivity.kt
View file @
7dabf76c
...
...
@@ -8,7 +8,7 @@ import android.os.Bundle
import
android.view.View
import
androidx.recyclerview.widget.GridLayoutManager
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.
tz_
ad.CoralDownload
import
com.mints.goodmoney.ad.
downlo
ad.CoralDownload
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.AppTryPlayManager
import
com.mints.goodmoney.manager.DownloadApkManager
...
...
@@ -169,7 +169,6 @@ class TaskActivity : BaseActivity(), OnItemClickListener, OnRefreshListener, Cor
}
private
fun
clickDialog
(
position
:
Int
)
{
taskDialog
=
TaskDialog
(
this
)
taskDialog
?.
setData
(
mTaskList
[
position
],
needUseTime
,
mCoin
)
taskDialog
?.
show
()
...
...
@@ -197,10 +196,13 @@ class TaskActivity : BaseActivity(), OnItemClickListener, OnRefreshListener, Cor
}
override
fun
onLoadFail
()
{
iv_empty
.
visibility
=
View
.
VISIBLE
hideLoading
()
showToast
(
"加载失败,请下拉刷新重试"
)
hideLoading
()
mTaskList
.
clear
()
mTaskAdapter
?.
notifyDataSetChanged
()
iv_empty
.
visibility
=
View
.
VISIBLE
srl_task
.
finishRefresh
(
false
)
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/AppUtil.kt
View file @
7dabf76c
...
...
@@ -71,7 +71,7 @@ object AppUtil {
val
usageStatsManager
=
ctx
.
getSystemService
(
"usagestats"
)
as
UsageStatsManager
val
time
=
System
.
currentTimeMillis
()
// 过去5分钟内app使用情况
val
queryUsageStats
=
usageStatsManager
.
queryUsageStats
(
UsageStatsManager
.
INTERVAL_DAILY
,
time
-
5
*
6
0
*
1000
,
time
)
val
queryUsageStats
=
usageStatsManager
.
queryUsageStats
(
UsageStatsManager
.
INTERVAL_DAILY
,
time
-
5
*
6
*
1000
,
time
)
var
totalTime
=
0L
if
(
queryUsageStats
.
size
>
0
)
{
for
(
usageStat
in
queryUsageStats
)
{
...
...
@@ -118,7 +118,7 @@ object AppUtil {
if
(
StringUtilMy
.
stringAvalable
(
paramString
)
&&
checkPackInfo
(
paramContext
,
paramString
)
&&
Build
.
VERSION
.
SDK_INT
>=
21
)
{
val
usageStatsManager
=
paramContext
.
getSystemService
(
"usagestats"
)
as
UsageStatsManager
var
l
=
System
.
currentTimeMillis
()
val
list
=
usageStatsManager
.
queryUsageStats
(
4
,
l
-
6
*
60
*
1000L
,
l
)
val
list
=
usageStatsManager
.
queryUsageStats
(
4
,
l
-
5
*
6
*
1000L
,
l
)
if
(
list
!=
null
&&
list
.
size
>
0
)
for
(
i
in
list
.
indices
)
{
val
str
=
(
list
[
i
]
as
UsageStats
).
packageName
(
list
[
i
]
as
UsageStats
).
lastTimeUsed
...
...
GoodMoney/app/src/main/res/drawable/shape_btn_gold_left.xml
0 → 100644
View file @
7dabf76c
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<!-- 弧形的半径 -->
<corners
android:radius=
"20dip"
/>
<!-- 渐变色 -->
<solid
android:color=
"#fffd9a2a"
/>
</shape>
\ No newline at end of file
GoodMoney/app/src/main/res/drawable/shape_btn_gold_right.xml
0 → 100644
View file @
7dabf76c
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<!-- 弧形的半径 -->
<corners
android:radius=
"20dip"
/>
<!-- 渐变色 -->
<solid
android:color=
"#fffd8d26"
/>
</shape>
\ No newline at end of file
GoodMoney/app/src/main/res/drawable/shape_tips.xml
View file @
7dabf76c
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"6dp"
/>
<solid
android:color=
"@color/color_
5
0000000"
/>
<solid
android:color=
"@color/color_
2
0000000"
/>
</shape>
\ No newline at end of file
GoodMoney/app/src/main/res/layout/activity_award.xml
View file @
7dabf76c
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
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"
...
...
@@ -9,14 +10,14 @@
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"
11
0dp"
android:layout_margin
Right
=
"30dp"
>
android:layout_marginTop=
"
9
0dp"
android:layout_margin
End
=
"30dp"
>
<TextView
android:id=
"@+id/tvAwardBack"
android:layout_width=
"25dp"
android:layout_height=
"25dp"
android:layout_alignParent
Right
=
"true"
android:layout_alignParent
End
=
"true"
android:background=
"@drawable/shape_back"
android:gravity=
"center"
android:text=
"3"
...
...
@@ -27,13 +28,12 @@
android:id=
"@+id/ivAwardBack"
android:layout_width=
"25dp"
android:layout_height=
"25dp"
android:layout_alignParent
Right
=
"true"
android:layout_alignParent
End
=
"true"
android:src=
"@mipmap/ic_drink_cancel"
android:visibility=
"gone"
/>
</RelativeLayout>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
>
...
...
@@ -53,47 +53,110 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"
7
0dp"
android:layout_marginTop=
"
6
0dp"
android:layout_marginBottom=
"10dp"
android:textColor=
"@color/color_333"
android:textSize=
"
18
sp"
android:textSize=
"
20
sp"
tools:text=
"恭喜获取120金币"
/>
<TextView
android:id=
"@+id/tvAwardHint"
android:layout_width=
"
wrap_content
"
android:id=
"@+id/tvAwardHi
ghConte
nt"
android:layout_width=
"
200dp
"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:textColor=
"@color/color_AAA"
android:textSize=
"18sp"
android:visibility=
"gone"
tools:text=
"123"
/>
android:layout_marginBottom=
"10dp"
android:background=
"@drawable/shape_tips"
android:gravity=
"center"
android:padding=
"6dp"
android:textSize=
"14sp"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/tvAward
Nex
t"
android:id=
"@+id/tvAward
Hin
t"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"10dp"
android:background=
"@drawable/shape_tv_gold"
android:paddingLeft=
"20dp"
android:paddingTop=
"10dp"
android:paddingRight=
"20dp"
android:paddingBottom=
"10dp"
android:text=
"领取金币"
android:textColor=
"@color/white"
android:textSize=
"14sp"
/>
android:textColor=
"@color/color_AAA"
android:textSize=
"18sp"
android:visibility=
"gone"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:id=
"@+id/tvAwardNext"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:background=
"@drawable/shape_btn_gold_left"
android:drawablePadding=
"4dp"
android:gravity=
"center"
android:paddingLeft=
"10dp"
android:paddingTop=
"10dp"
android:paddingRight=
"10dp"
android:paddingBottom=
"10dp"
android:text=
"领取金币"
android:textColor=
"@color/white"
android:textSize=
"14sp"
app:layout_constraintEnd_toStartOf=
"@+id/tvAwardHigh"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tvAwardHigh"
android:layout_width=
"160dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:background=
"@drawable/shape_btn_gold_right"
android:drawablePadding=
"4dp"
android:paddingStart=
"20dp"
android:paddingTop=
"10dp"
android:paddingBottom=
"10dp"
android:text=
"超级加倍领取"
android:textColor=
"@color/white"
android:textSize=
"14sp"
android:visibility=
"gone"
app:drawableStartCompat=
"@mipmap/icon_video"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@+id/tvAwardNext"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tvAwardHighInfo"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:textSize=
"12sp"
android:visibility=
"gone"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"@+id/tvAwardHigh"
app:layout_constraintStart_toStartOf=
"@+id/tvAwardHigh"
app:layout_constraintTop_toBottomOf=
"@id/tvAwardHigh"
/>
<TextView
android:id=
"@+id/tvAwardHighInfo2"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:textSize=
"12sp"
android:visibility=
"gone"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"@+id/tvAwardNext"
app:layout_constraintStart_toStartOf=
"@+id/tvAwardNext"
app:layout_constraintTop_toBottomOf=
"@+id/tvAwardNext"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id=
"@+id/tvAwardCash"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"1
4
dp"
android:layout_marginTop=
"1
0
dp"
android:layout_marginBottom=
"10dp"
android:textColor=
"@color/color_333"
android:textSize=
"14sp"
tools:text=
"123"
/>
android:textSize=
"14sp"
/>
</LinearLayout>
...
...
@@ -105,23 +168,14 @@
</FrameLayout>
<FrameLayout
android:layout_width=
"match_parent"
android:id=
"@+id/flAwardAd"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginLeft=
"25dp"
android:layout_marginTop=
"10dp"
android:layout_marginRight=
"25dp"
android:background=
"@drawable/shape_bg_
write"
>
android:background=
"@drawable/shape_bg_
award"
/
>
<FrameLayout
android:id=
"@+id/flAwardAd"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:background=
"@color/color_0000"
>
</FrameLayout>
</FrameLayout>
</LinearLayout>
\ No newline at end of file
GoodMoney/app/src/main/res/layout/item_share_view.xml
View file @
7dabf76c
...
...
@@ -80,7 +80,7 @@
android:layout_gravity=
"end"
android:layout_marginTop=
"10dp"
android:layout_marginEnd=
"10dp"
android:buttonTint=
"@color/color_
00895B
"
android:buttonTint=
"@color/color_
FF9837
"
android:clickable=
"false"
/>
</FrameLayout>
\ No newline at end of file
GoodMoney/app/src/main/res/mipmap-xhdpi/icon_video.png
0 → 100644
View file @
7dabf76c
1.27 KB
GoodMoney/app/src/main/res/values/colors.xml
View file @
7dabf76c
...
...
@@ -10,6 +10,7 @@
<color
name=
"color_ccc"
>
#cccccc
</color>
<color
name=
"color_AAA"
>
#AAAAAA
</color>
<color
name=
"color_0000"
>
#00000000
</color>
<color
name=
"color_20000000"
>
#20000000
</color>
<color
name=
"color_60000000"
>
#60000000
</color>
<color
name=
"color_50000000"
>
#50000000
</color>
<color
name=
"color_2B3238"
>
#2B3238
</color>
...
...
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