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
8efd08e8
Commit
8efd08e8
authored
Jan 28, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
b116c2fc
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
741 additions
and
5 deletions
+741
-5
TzTaskBean.java
...c/main/java/com/mints/goodmoney/mvp/model/TzTaskBean.java
+11
-2
TaskActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/TaskActivity.kt
+4
-3
TaskCpdFragment.kt
...n/java/com/mints/goodmoney/ui/fragment/TaskCpdFragment.kt
+684
-0
fragment_task_cpd.xml
GoodMoney/app/src/main/res/layout/fragment_task_cpd.xml
+42
-0
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/TzTaskBean.java
View file @
8efd08e8
...
...
@@ -14,8 +14,9 @@ public class TzTaskBean {
private
int
coin
;
private
int
state
;
private
String
currentPkgName
;
private
String
downLoadPkgName
;
public
TzTaskBean
(
String
icon
,
String
title
,
String
description
,
boolean
isShCpd
,
int
coin
,
int
state
,
String
current
PkgName
)
{
public
TzTaskBean
(
String
icon
,
String
title
,
String
description
,
boolean
isShCpd
,
int
coin
,
int
state
,
String
downLoad
PkgName
)
{
this
.
icon
=
icon
;
this
.
title
=
title
;
this
.
description
=
description
;
...
...
@@ -23,7 +24,15 @@ public class TzTaskBean {
this
.
coralAd
=
coralAd
;
this
.
coin
=
coin
;
this
.
state
=
state
;
this
.
currentPkgName
=
currentPkgName
;
this
.
downLoadPkgName
=
downLoadPkgName
;
}
public
String
getDownLoadPkgName
()
{
return
downLoadPkgName
;
}
public
void
setDownLoadPkgName
(
String
downLoadPkgName
)
{
this
.
downLoadPkgName
=
downLoadPkgName
;
}
public
String
getDescription
()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/TaskActivity.kt
View file @
8efd08e8
...
...
@@ -218,7 +218,7 @@ class TaskActivity : BaseActivity(), TaskView,
if
(!
mFakeTaskList
[
i
].
isShCpd
&&
!
mFakeTaskList
[
j
].
isShCpd
)
{
// 数据重复
if
(
i
!=
j
&&
mFakeTaskList
[
i
].
currentPkgName
==
mFakeTaskList
[
j
].
current
PkgName
)
{
if
(
i
!=
j
&&
mFakeTaskList
[
i
].
downLoadPkgName
==
mFakeTaskList
[
j
].
downLoad
PkgName
)
{
flag
=
false
break
}
...
...
@@ -227,7 +227,7 @@ class TaskActivity : BaseActivity(), TaskView,
if
(
flag
)
{
// 是否已经安装此app
if
(!
DeviceInfo
.
instance
.
isLoadingPkg
(
mFakeTaskList
[
i
].
current
PkgName
))
{
if
(!
DeviceInfo
.
instance
.
isLoadingPkg
(
mFakeTaskList
[
i
].
downLoad
PkgName
))
{
cpdLoadCountTime
--
newPkgData
.
add
(
mFakeTaskList
[
i
])
}
...
...
@@ -470,8 +470,9 @@ class TaskActivity : BaseActivity(), TaskView,
taskPresenter
.
cmtImp
(
trackerBean
.
clikc
[
0
])
}
// 圣于地开始下载
DownloadApkManager
.
setOnMyDownloadListener
(
this
@TaskActivity
)
DownloadApkManager
.
downloadApk
(
this
@TaskActivity
,
mFakeTaskList
[
position
].
app_url
,
mFakeTaskList
[
position
].
current
PkgName
)
DownloadApkManager
.
downloadApk
(
this
@TaskActivity
,
mFakeTaskList
[
position
].
app_url
,
mFakeTaskList
[
position
].
downLoad
PkgName
)
}
})
taskCpdDialog
?.
setData
(
mFakeTaskList
[
position
].
title
,
mFakeTaskList
[
position
].
description
,
mFakeTaskList
[
position
].
icon
,
needUseTime
,
mCoin
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/TaskCpdFragment.kt
0 → 100644
View file @
8efd08e8
This diff is collapsed.
Click to expand it.
GoodMoney/app/src/main/res/layout/fragment_task_cpd.xml
0 → 100644
View file @
8efd08e8
<?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"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<include
layout=
"@layout/header_layout"
/>
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id=
"@+id/srl_task"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/color_F8F"
app:srlAccentColor=
"@color/gray"
app:srlPrimaryColor=
"@color/color_50E8E8E8"
>
<com.scwang.smartrefresh.layout.header.ClassicsHeader
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/recy_task"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<ImageView
android:id=
"@+id/iv_empty"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:src=
"@mipmap/ic_record_empty"
android:visibility=
"gone"
/>
</FrameLayout>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</LinearLayout>
\ No newline at end of file
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