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
f70a4a1f
Commit
f70a4a1f
authored
Jan 28, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加cpd新页面,优化来电秀提示,分红展示,平台攻略,cpd试玩任务标记等
parent
30ae1db2
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
185 additions
and
62 deletions
+185
-62
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+3
-0
AppConfig.java
...p/src/main/java/com/mints/goodmoney/common/AppConfig.java
+5
-0
TaskPresenter.kt
.../java/com/mints/goodmoney/mvp/presenters/TaskPresenter.kt
+2
-1
TrackPresenter.java
...va/com/mints/goodmoney/mvp/presenters/TrackPresenter.java
+1
-0
TaskView.kt
...p/src/main/java/com/mints/goodmoney/mvp/views/TaskView.kt
+1
-1
TaskActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/TaskActivity.kt
+1
-1
TaskCpdActivity.kt
.../java/com/mints/goodmoney/ui/activitys/TaskCpdActivity.kt
+92
-0
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+3
-7
PanFragment.kt
.../main/java/com/mints/goodmoney/ui/fragment/PanFragment.kt
+1
-3
TaskCpdFragment.kt
...n/java/com/mints/goodmoney/ui/fragment/TaskCpdFragment.kt
+4
-28
btn_my_friends.xml
GoodMoney/app/src/main/res/drawable/btn_my_friends.xml
+9
-0
activity_kyl_video.xml
GoodMoney/app/src/main/res/layout/activity_kyl_video.xml
+1
-1
activity_task.xml
GoodMoney/app/src/main/res/layout/activity_task.xml
+0
-2
activity_task_cpd.xml
GoodMoney/app/src/main/res/layout/activity_task_cpd.xml
+33
-0
header_layout.xml
GoodMoney/app/src/main/res/layout/header_layout.xml
+4
-3
item_fragment_main_my_title.xml
...y/app/src/main/res/layout/item_fragment_main_my_title.xml
+21
-11
item_task_recy.xml
GoodMoney/app/src/main/res/layout/item_task_recy.xml
+2
-2
item_task_recy_cpd.xml
GoodMoney/app/src/main/res/layout/item_task_recy_cpd.xml
+2
-2
ic_friends.png
GoodMoney/app/src/main/res/mipmap-xhdpi/ic_friends.png
+0
-0
No files found.
GoodMoney/app/src/main/AndroidManifest.xml
View file @
f70a4a1f
...
...
@@ -212,6 +212,9 @@
<activity
android:name=
".ui.activitys.TaskActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activitys.TaskCpdActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activitys.KylVideoActivity"
android:configChanges=
"orientation|screenSize|keyboardHidden"
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/common/AppConfig.java
View file @
f70a4a1f
...
...
@@ -105,6 +105,11 @@ public class AppConfig {
*/
public
static
boolean
isMainShowWz
=
false
;
/**
* 显示cpd任务下载
*/
public
static
boolean
useAppCpdModelShow
=
true
;
/**
* 微转金币
*/
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/TaskPresenter.kt
View file @
f70a4a1f
...
...
@@ -36,7 +36,8 @@ class TaskPresenter : BasePresenter<TaskView>() {
when
(
code
)
{
200
->
{
if
(
data
!=
null
)
{
view
.
getShCpdTimeSuc
(
data
.
get
(
"needSeconds"
).
asInt
,
data
.
get
(
"CPD"
).
asInt
,
data
.
get
(
"CPD_SYD"
).
asInt
)
view
.
getShCpdTimeSuc
(
data
.
get
(
"needSeconds"
).
asInt
,
data
.
get
(
"coin"
).
asInt
,
data
.
get
(
"CPD"
).
asInt
,
data
.
get
(
"CPD_SYD"
).
asInt
)
}
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/TrackPresenter.java
View file @
f70a4a1f
...
...
@@ -210,6 +210,7 @@ public class TrackPresenter extends BaseTrackPresenter {
JsonObject
data
=
baseResponse
.
getData
();
if
(
data
!=
null
)
{
AppConfig
.
isMainShowWz
=
data
.
get
(
"showCallShow"
).
getAsBoolean
();
AppConfig
.
useAppCpdModelShow
=
data
.
get
(
"useAppCpdModelShow"
).
getAsBoolean
();
}
}
}
catch
(
Exception
e
)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/views/TaskView.kt
View file @
f70a4a1f
...
...
@@ -3,7 +3,7 @@ package com.mints.goodmoney.mvp.views
import
com.mints.goodmoney.mvp.model.CpdModelBean
interface
TaskView
:
BaseView
{
fun
getShCpdTimeSuc
(
time
:
Int
,
CPD
:
Int
,
CPD_SYD
:
Int
)
fun
getShCpdTimeSuc
(
time
:
Int
,
coin
:
Int
,
CPD
:
Int
,
CPD_SYD
:
Int
)
fun
getCpdModelSuc
(
dataBean
:
CpdModelBean
.
DataBean
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/TaskActivity.kt
View file @
f70a4a1f
...
...
@@ -146,7 +146,7 @@ class TaskActivity : BaseActivity(), TaskView,
override
fun
isApplyKitKatTranslucency
()
=
false
override
fun
getShCpdTimeSuc
(
time
:
Int
,
CPD
:
Int
,
CPD_SYD
:
Int
)
{
override
fun
getShCpdTimeSuc
(
time
:
Int
,
coin
:
Int
,
CPD
:
Int
,
CPD_SYD
:
Int
)
{
needUseTime
=
time
shMax
=
CPD
cpdMax
=
CPD_SYD
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/TaskCpdActivity.kt
0 → 100644
View file @
f70a4a1f
package
com.mints.goodmoney.ui.activitys
import
android.view.View
import
androidx.fragment.app.Fragment
import
androidx.viewpager.widget.ViewPager
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.adapter.MessageFragAdapter
import
com.mints.goodmoney.ui.fragment.TaskCpdFragment
import
com.mints.goodmoney.ui.widgets.CustomDialogAsApple
import
com.mints.goodmoney.ui.widgets.DialogListener
import
kotlinx.android.synthetic.main.activity_task_cpd.*
import
kotlinx.android.synthetic.main.header_layout.*
/**
* 描述:cpd管理
* 作者:孟崔广
* 时间:2021/1/28 14:29
*/
class
TaskCpdActivity
:
BaseActivity
(),
View
.
OnClickListener
{
private
lateinit
var
cdaa
:
CustomDialogAsApple
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_task_cpd
override
fun
isApplyKitKatTranslucency
()
=
false
override
fun
initViewsAndEvents
()
{
tv_title
.
text
=
"下载试玩任务"
iv_left_icon
.
visibility
=
View
.
VISIBLE
iv_left_icon
.
setImageResource
(
R
.
mipmap
.
ic_arrow_back
)
initViewAndData
()
initListener
()
}
override
fun
onBackPressed
()
{
backDialog
()
}
override
fun
onClick
(
v
:
View
?)
{
when
(
v
?.
id
)
{
R
.
id
.
iv_left_icon
->
backDialog
()
}
}
private
fun
initListener
()
{
iv_left_icon
.
setOnClickListener
(
this
)
}
private
fun
initViewAndData
()
{
val
tabs
:
MutableList
<
String
>
=
ArrayList
()
val
fragments
:
MutableList
<
Fragment
>
=
ArrayList
()
tabs
.
add
(
"标签1"
)
fragments
.
add
(
TaskCpdFragment
())
if
(
AppConfig
.
useAppCpdModelShow
)
{
tabs
.
add
(
"标签2"
)
fragments
.
add
(
TaskCpdFragment
())
xtTaskCpd
.
visibility
=
View
.
VISIBLE
}
else
{
xtTaskCpd
.
visibility
=
View
.
GONE
}
xtTaskCpd
.
overScrollMode
=
ViewPager
.
OVER_SCROLL_NEVER
val
adapter
=
MessageFragAdapter
(
supportFragmentManager
,
fragments
,
tabs
)
vpTaskCpd
.
adapter
=
adapter
xtTaskCpd
.
setxTabDisplayNum
(
tabs
.
size
)
xtTaskCpd
.
setupWithViewPager
(
vpTaskCpd
)
}
private
fun
backDialog
()
{
cdaa
=
CustomDialogAsApple
(
context
,
object
:
DialogListener
()
{
override
fun
onClick
(
v
:
View
)
{
if
(
cdaa
.
isShowing
)
{
cdaa
.
dismiss
()
}
when
(
v
.
id
)
{
R
.
id
.
dialog_btn_right
->
{
finish
()
}
}
}
})
cdaa
.
setTitle
(
"提示"
)
cdaa
.
setContent
(
"退出当前页面将会重置当前任务状态"
)
cdaa
.
setLeft
(
"取消"
)
cdaa
.
setRight
(
"确定"
)
cdaa
.
show
()
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
f70a4a1f
...
...
@@ -467,9 +467,7 @@ class MyFragment : BaseFragment(),
carrierType
=
""
val
bundle
=
Bundle
()
bundle
.
putInt
(
TaskActivity
.
TASK_COIN
,
taskBean
.
otherConfig
.
coin
)
readyGo
(
TaskActivity
::
class
.
java
,
bundle
)
readyGo
(
TaskCpdActivity
::
class
.
java
)
}
// 跳转高额视频
MainMyAdapter
.
APP_HiGH_ACTIVITY
->
{
...
...
@@ -902,9 +900,7 @@ class MyFragment : BaseFragment(),
if
(
dataList
.
isNotEmpty
())
{
for
(
listBean
in
dataList
)
{
if
(
listBean
.
baseConfig
.
taskId
==
MainMyAdapter
.
TO_SHARE_NEWS
)
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
TaskActivity
.
TASK_COIN
,
listBean
.
otherConfig
.
coin
)
readyGo
(
TaskActivity
::
class
.
java
,
bundle
)
readyGo
(
TaskCpdActivity
::
class
.
java
)
return
}
}
...
...
@@ -1040,7 +1036,7 @@ class MyFragment : BaseFragment(),
iv_right_icon2
.
visibility
=
View
.
VISIBLE
iv_right_icon2
.
setImageResource
(
R
.
mipmap
.
icon_customer_service
)
tv_left_subtitle
.
visibility
=
View
.
VISIBLE
tv_left_subtitle
.
text
=
"
团长
攻略"
tv_left_subtitle
.
text
=
"
平台
攻略"
tv_left_subtitle
.
setOnClickListener
(
this
)
iv_right_icon2
.
setOnClickListener
(
this
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/PanFragment.kt
View file @
f70a4a1f
...
...
@@ -135,9 +135,7 @@ class PanFragment : BaseFragment(), PanView {
return
}
val
bundle
=
Bundle
()
bundle
.
putInt
(
TaskActivity
.
TASK_COIN
,
panActionInfo
.
coin
)
readyGo
(
TaskActivity
::
class
.
java
,
bundle
)
readyGo
(
TaskCpdActivity
::
class
.
java
)
}
2
->
{
if
(!
userManager
.
userIsLogin
())
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/TaskCpdFragment.kt
View file @
f70a4a1f
...
...
@@ -40,7 +40,6 @@ class TaskCpdFragment : BaseFragment(), TaskView,
OnRefreshListener
,
CoralDownload
.
OnAdLoadListener
,
OnItemChildClickListener
,
View
.
OnClickListener
,
DownloadApkManager
.
OnMyDownloadListener
{
private
val
taskPresenter
by
lazy
{
TaskPresenter
()
}
...
...
@@ -69,12 +68,6 @@ class TaskCpdFragment : BaseFragment(), TaskView,
private
val
outNetIp
by
lazy
{
SPUtil
.
getInstance
().
getString
(
Constant
.
OUT_NET_IP
)
}
companion
object
{
const
val
TASK_COIN
=
"task_coin"
const
val
TASK_USE_MAX
=
"task_use_max"
const
val
TASK_USE_COMPLETE
=
"task_use_complete"
}
private
var
mCoin
=
0
private
var
needUseTime
=
-
1
...
...
@@ -84,18 +77,9 @@ class TaskCpdFragment : BaseFragment(), TaskView,
private
var
shLoadCountTime
=
0
// 珊瑚 加载广告次数
private
var
cpdLoadCountTime
=
0
// CPD 加载广告次数
// override fun getBundleExtras(extras: Bundle) {
// super.getBundleExtras(extras)
// mCoin = extras.getInt(TaskActivity.TASK_COIN)
// }
override
fun
initViewsAndEvents
()
{
taskPresenter
.
attachView
(
this
)
tv_title
.
text
=
"下载试玩任务"
iv_left_icon
.
visibility
=
View
.
VISIBLE
iv_left_icon
.
setImageResource
(
R
.
mipmap
.
ic_arrow_back
)
mCoralDownload
=
CoralDownload
().
setOnAdLoadListener
(
this
)
CacheUtil
.
clearAllCache
(
context
)
...
...
@@ -118,7 +102,6 @@ class TaskCpdFragment : BaseFragment(), TaskView,
recy_task
.
adapter
=
mTaskAdapter
recy_task
.
setItemViewCacheSize
(
20
)
mTaskAdapter
?.
setOnItemChildClickListener
(
this
)
iv_left_icon
.
setOnClickListener
(
this
)
}
private
fun
initListener
()
{
...
...
@@ -141,8 +124,9 @@ class TaskCpdFragment : BaseFragment(), TaskView,
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_task
override
fun
getShCpdTimeSuc
(
time
:
Int
,
CPD
:
Int
,
CPD_SYD
:
Int
)
{
override
fun
getShCpdTimeSuc
(
time
:
Int
,
coin
:
Int
,
CPD
:
Int
,
CPD_SYD
:
Int
)
{
needUseTime
=
time
mCoin
=
coin
shMax
=
CPD
cpdMax
=
CPD_SYD
...
...
@@ -552,7 +536,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
if
(
trackerBean
!=
null
)
{
// 上报CPD激活完成
LogUtil
.
d
(
"CPD -> install_start"
)
LogUtil
.
d
(
"CPD -> install_start"
)
taskPresenter
.
cmtImp
(
trackerBean
.
install_start
[
0
])
LogUtil
.
d
(
"CPD -> install_finish"
)
...
...
@@ -578,7 +562,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
val
trackerBean
=
mFakeTaskList
[
position
].
trackerBean
if
(
trackerBean
!=
null
)
{
// 上报CPD激活完成
LogUtil
.
d
(
"CPD -> activation"
)
LogUtil
.
d
(
"CPD -> activation"
)
taskPresenter
.
cmtImp
(
trackerBean
.
activation
[
0
])
}
...
...
@@ -631,14 +615,6 @@ class TaskCpdFragment : BaseFragment(), TaskView,
cdaa
.
show
()
}
override
fun
onClick
(
v
:
View
?)
{
when
(
v
?.
id
)
{
R
.
id
.
iv_left_icon
->
{
backDialog
()
}
}
}
/**
* 开始下载
*/
...
...
GoodMoney/app/src/main/res/drawable/btn_my_friends.xml
0 → 100755
View file @
f70a4a1f
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@color/color_FF9837"
/>
<corners
android:bottomLeftRadius=
"30dp"
android:topLeftRadius=
"30dp"
/>
</shape>
\ No newline at end of file
GoodMoney/app/src/main/res/layout/activity_kyl_video.xml
View file @
f70a4a1f
...
...
@@ -44,7 +44,7 @@
android:layout_marginRight=
"50dp"
android:background=
"@drawable/shape_tv_gold"
android:gravity=
"center"
android:text=
"设置来电秀"
android:text=
"
看广告
设置来电秀"
android:layout_marginBottom=
"40dp"
app:layout_constraintBottom_toBottomOf=
"parent"
android:textColor=
"@color/white"
/>
...
...
GoodMoney/app/src/main/res/layout/activity_task.xml
View file @
f70a4a1f
...
...
@@ -5,8 +5,6 @@
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"
...
...
GoodMoney/app/src/main/res/layout/activity_task_cpd.xml
0 → 100644
View file @
f70a4a1f
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:background=
"@color/white"
android:orientation=
"vertical"
>
<include
layout=
"@layout/header_layout"
/>
<com.androidkun.xtablayout.XTabLayout
android:id=
"@+id/xtTaskCpd"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:xTabIndicatorColor=
"#F28335"
app:xTabIndicatorHeight=
"4dp"
app:xTabIndicatorRoundX=
"30dp"
app:xTabIndicatorRoundY=
"30dp"
android:visibility=
"gone"
app:xTabIndicatorWidth=
"20dp"
app:xTabMode=
"scrollable"
app:xTabSelectedTextColor=
"@color/color_FF9837"
app:xTabSelectedTextSize=
"18sp"
app:xTabTextColor=
"#000"
app:xTabTextSize=
"14sp"
/>
<com.mints.goodmoney.ui.widgets.MyViewPager
android:id=
"@+id/vpTaskCpd"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
GoodMoney/app/src/main/res/layout/header_layout.xml
View file @
f70a4a1f
...
...
@@ -21,9 +21,10 @@
android:layout_height=
"wrap_content"
android:lines=
"1"
android:maxLength=
"12"
android:padding=
"10dp"
android:textColor=
"@color/color_121B32"
android:textSize=
"16sp"
android:padding=
"8dp"
android:textColor=
"@color/black"
android:textSize=
"18sp"
android:textStyle=
"bold"
android:visibility=
"gone"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
...
...
GoodMoney/app/src/main/res/layout/item_fragment_main_my_title.xml
View file @
f70a4a1f
...
...
@@ -5,8 +5,10 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/ll_my_login"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"15dp"
>
android:layout_marginLeft=
"15dp"
android:layout_marginTop=
"15dp"
android:layout_marginBottom=
"15dp"
android:layout_height=
"wrap_content"
>
<com.mints.goodmoney.ui.widgets.CircleImageView
android:id=
"@+id/item_title_avatar"
...
...
@@ -32,18 +34,26 @@
app:layout_constraintLeft_toRightOf=
"@+id/item_title_avatar"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/item_title_friends"
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:drawableTop=
"@mipmap/ic_friends"
android:drawablePadding=
"2dp"
android:text=
"平台分红"
android:textColor=
"@color/color_FF9837"
android:textSize=
"14sp"
android:layout_height=
"50dp"
android:paddingLeft=
"16dp"
android:paddingRight=
"10dp"
android:background=
"@drawable/btn_my_friends"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
>
<TextView
android:id=
"@+id/item_title_friends"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:drawableTop=
"@mipmap/ic_friends"
android:text=
"平台分红"
android:layout_centerVertical=
"true"
android:textColor=
"@color/white"
android:textSize=
"14sp"
/>
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
...
...
GoodMoney/app/src/main/res/layout/item_task_recy.xml
View file @
f70a4a1f
...
...
@@ -19,8 +19,8 @@
<ImageView
android:id=
"@+id/item_iv_avatar"
android:layout_width=
"
5
0dp"
android:layout_height=
"
5
0dp"
android:layout_width=
"
4
0dp"
android:layout_height=
"
4
0dp"
android:layout_marginTop=
"10dp"
android:src=
"@mipmap/ic_launcher_main"
/>
...
...
GoodMoney/app/src/main/res/layout/item_task_recy_cpd.xml
View file @
f70a4a1f
...
...
@@ -8,8 +8,8 @@
<ImageView
android:id=
"@+id/item_iv_avatar"
android:layout_width=
"
5
0dp"
android:layout_height=
"
5
0dp"
android:layout_width=
"
4
0dp"
android:layout_height=
"
4
0dp"
android:layout_marginTop=
"10dp"
android:src=
"@mipmap/ic_launcher_main"
/>
...
...
GoodMoney/app/src/main/res/mipmap-xhdpi/ic_friends.png
View replaced file @
30ae1db2
View file @
f70a4a1f
1.6 KB
|
W:
|
H:
1.14 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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