Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
L
LuckyFarm
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
LuckyFarm
Commits
2a88c3e0
Commit
2a88c3e0
authored
Nov 19, 2020
by
Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[李俊岐] 完善打卡提现和福利中心
parent
dd8f4df0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
828 additions
and
87 deletions
+828
-87
ClockInWithdrawActitivy.kt
...main/java/com/ym/game/activity/ClockInWithdrawActitivy.kt
+46
-4
SplashActivity.kt
app/src/main/java/com/ym/game/activity/SplashActivity.kt
+5
-5
WelfareActivity.kt
app/src/main/java/com/ym/game/activity/WelfareActivity.kt
+13
-8
ClockInWithdrawAdpater.kt
...c/main/java/com/ym/game/adapter/ClockInWithdrawAdpater.kt
+198
-27
WelfareDiamondAdapter.kt
...rc/main/java/com/ym/game/adapter/WelfareDiamondAdapter.kt
+9
-4
ClockInWithdrawContract.kt
...main/java/com/ym/game/contract/ClockInWithdrawContract.kt
+1
-1
WelfareContract.kt
app/src/main/java/com/ym/game/contract/WelfareContract.kt
+3
-6
ClockInWithdrawPresenter.kt
...in/java/com/ym/game/presenter/ClockInWithdrawPresenter.kt
+37
-3
WelfarePresenter.kt
app/src/main/java/com/ym/game/presenter/WelfarePresenter.kt
+6
-8
MainDialog.kt
app/src/main/java/com/ym/game/view/MainDialog.kt
+80
-2
icon_clock_in_item_bg.png
app/src/main/res/drawable-xhdpi/icon_clock_in_item_bg.png
+0
-0
icon_clock_in_item_gray_bg.png
...rc/main/res/drawable-xhdpi/icon_clock_in_item_gray_bg.png
+0
-0
icon_clock_in_item_gray_pg_complete.png
...es/drawable-xhdpi/icon_clock_in_item_gray_pg_complete.png
+0
-0
icon_clock_in_item_phone.png
app/src/main/res/drawable-xhdpi/icon_clock_in_item_phone.png
+0
-0
icon_clock_in_item_red_pg.png
...src/main/res/drawable-xhdpi/icon_clock_in_item_red_pg.png
+0
-0
icon_clock_in_item_red_pg_coin.png
...ain/res/drawable-xhdpi/icon_clock_in_item_red_pg_coin.png
+0
-0
icon_clock_in_item_red_pg_coin_complete.png
...rawable-xhdpi/icon_clock_in_item_red_pg_coin_complete.png
+0
-0
icon_clock_in_item_red_pg_coin_uncomplete.png
...wable-xhdpi/icon_clock_in_item_red_pg_coin_uncomplete.png
+0
-0
icon_clock_in_item_red_pg_gray.png
...ain/res/drawable-xhdpi/icon_clock_in_item_red_pg_gray.png
+0
-0
icon_clock_in_item_yellow_bg.png
.../main/res/drawable-xhdpi/icon_clock_in_item_yellow_bg.png
+0
-0
game_clock_in_item_progress_bg.xml
app/src/main/res/drawable/game_clock_in_item_progress_bg.xml
+23
-0
shape_ffffff_r10.xml
app/src/main/res/drawable/shape_ffffff_r10.xml
+5
-0
activity_clock_in_withdraw.xml
app/src/main/res/layout/activity_clock_in_withdraw.xml
+3
-4
dialog_get_welfare_drop.xml
app/src/main/res/layout/dialog_get_welfare_drop.xml
+182
-0
item_clock_in_tip.xml
app/src/main/res/layout/item_clock_in_tip.xml
+11
-4
item_clock_in_withdraw.xml
app/src/main/res/layout/item_clock_in_withdraw.xml
+156
-1
Constant.java
library/src/main/java/com/ym/library/Constant.java
+1
-0
ClockInWithdrawEntity.kt
.../main/java/com/ym/library/module/ClockInWithdrawEntity.kt
+33
-1
FlyBoxEntity.kt
library/src/main/java/com/ym/library/module/FlyBoxEntity.kt
+3
-0
IGameApi.kt
library/src/main/java/com/ym/library/net/IGameApi.kt
+4
-4
NetConfig.java
library/src/main/java/com/ym/library/net/NetConfig.java
+3
-3
dialog_get_diamand.xml
library/src/main/res/layout/dialog_get_diamand.xml
+6
-2
No files found.
app/src/main/java/com/ym/game/activity/ClockInWithdrawActitivy.kt
View file @
2a88c3e0
package
com.ym.game.activity
package
com.ym.game.activity
import
android.content.DialogInterface
import
android.text.Html
import
android.view.View
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.LinearLayoutManager
import
com.ym.ddcy.R
import
com.ym.ddcy.R
import
com.ym.game.adapter.ClockInWithdrawAdpater
import
com.ym.game.contract.ClockInWithdrawContract
import
com.ym.game.contract.ClockInWithdrawContract
import
com.ym.game.presenter.ClockInWithdrawPresenter
import
com.ym.game.presenter.ClockInWithdrawPresenter
import
com.ym.library.Constant
import
com.ym.library.listener.OnRecycleItemClickListener
import
com.ym.library.module.ClockInWithdrawEntity
import
com.ym.library.module.ClockInWithdrawEntity
import
com.ym.library.net.BaseActivity
import
com.ym.library.net.BaseActivity
import
com.ym.library.utils.CenterDialog
import
kotlinx.android.synthetic.main.activity_clock_in_withdraw.*
import
kotlinx.android.synthetic.main.activity_clock_in_withdraw.*
//打卡提现 福利
//打卡提现 福利
class
ClockInWithdrawActitivy
:
BaseActivity
(),
ClockInWithdrawContract
.
View
{
class
ClockInWithdrawActitivy
:
BaseActivity
(),
ClockInWithdrawContract
.
View
,
OnRecycleItemClickListener
<
ClockInWithdrawEntity
.
ClockInItemEntity
>
{
private
var
mPresenter
:
ClockInWithdrawPresenter
?
=
null
private
var
mPresenter
:
ClockInWithdrawPresenter
?
=
null
private
var
mAdapter
:
ClockInWithdrawAdpater
?
=
null
private
var
mData
:
ClockInWithdrawEntity
.
ClockInItemEntity
?
=
null
override
fun
layoutID
():
Int
{
override
fun
layoutID
():
Int
{
return
R
.
layout
.
activity_clock_in_withdraw
return
R
.
layout
.
activity_clock_in_withdraw
...
@@ -24,21 +34,53 @@ class ClockInWithdrawActitivy : BaseActivity(), ClockInWithdrawContract.View {
...
@@ -24,21 +34,53 @@ class ClockInWithdrawActitivy : BaseActivity(), ClockInWithdrawContract.View {
}
}
initAdapter
()
initAdapter
()
mPresenter
?.
getClockInWithdrawList
()
mPresenter
?.
getClockInWithdrawList
()
}
}
private
fun
initAdapter
()
{
private
fun
initAdapter
()
{
recycler_clock_in
.
layoutManager
=
LinearLayoutManager
(
this
)
recycler_clock_in
?.
layoutManager
=
LinearLayoutManager
(
this
)
mAdapter
=
ClockInWithdrawAdpater
(
this
,
this
)
recycler_clock_in
?.
adapter
=
mAdapter
}
}
override
fun
onItemClick
(
view
:
View
,
position
:
Int
,
data
:
ClockInWithdrawEntity
.
ClockInItemEntity
)
{
mData
=
data
if
(
data
.
special
==
1
)
{
mPresenter
?.
getFlyBoxReceive
(
this
)
}
else
if
(
data
.
special
==
2
)
{
mPresenter
?.
getDoWd
(
data
.
id
!!
)
}
}
//任务列表结果
override
fun
clockInWithdrawListResult
(
result
:
ClockInWithdrawEntity
?)
{
override
fun
clockInWithdrawListResult
(
result
:
ClockInWithdrawEntity
?)
{
if
(
result
!=
null
)
{
Constant
.
videoNum
=
result
?.
videoNum
?:
20
tv_clock_in_days
?.
text
=
Html
.
fromHtml
(
"已连续打卡<font color=\"#8F2C0F\"><big>${result?.clockNum}</big></font>天"
)
tv_clock_in_info
?.
text
=
"每日观看${result?.videoNum}个视频即可完成打卡"
mAdapter
?.
clear
()
mAdapter
?.
appendToList
(
result
?.
list
)
mAdapter
?.
notifyDataSetChanged
()
}
}
}
//提现结果
override
fun
dowdResult
(
result
:
ClockInWithdrawEntity
?)
{
override
fun
dowdResult
(
result
:
ClockInWithdrawEntity
?)
{
mPresenter
?.
getClockInWithdrawList
()
if
(
result
!=
null
)
{
CenterDialog
.
showgetWaterDrop
(
this
,
3
,
mData
?.
cashStr
?.
toInt
()
!!
,
DialogInterface
.
OnCancelListener
{
},
null
)
}
}
}
}
}
\ No newline at end of file
app/src/main/java/com/ym/game/activity/SplashActivity.kt
View file @
2a88c3e0
...
@@ -7,20 +7,20 @@ import android.view.View
...
@@ -7,20 +7,20 @@ import android.view.View
import
android.widget.FrameLayout
import
android.widget.FrameLayout
import
android.widget.TextView
import
android.widget.TextView
import
androidx.core.app.ActivityCompat
import
androidx.core.app.ActivityCompat
import
com.bytedance.sdk.openadsdk.TTSplashAd
import
com.gyf.immersionbar.BarHide
import
com.gyf.immersionbar.BarHide
import
com.gyf.immersionbar.ImmersionBar
import
com.gyf.immersionbar.ImmersionBar
import
com.umeng.analytics.MobclickAgent
import
com.umeng.analytics.MobclickAgent
import
com.ym.admodule.config.AdManager
import
com.ym.admodule.config.AdManager
import
com.ym.admodule.listener.ZXADSplashListener
import
com.ym.admodule.listener.ZXADSplashListener
import
com.ym.game.GameActivity
import
com.ym.ddcy.R
import
com.ym.ddcy.R
import
com.ym.game.GameActivity
import
com.ym.game.utils.CenterDialog
import
com.ym.library.Constant
import
com.ym.library.Constant
import
com.ym.library.module.ReportEntity
import
com.ym.library.module.ReportEntity
import
com.ym.library.net.PermissionsActivity
import
com.ym.library.net.SplashContract
import
com.ym.library.net.SplashPresenter
import
com.ym.library.net.SplashPresenter.Companion.PERMISSIONS
import
com.ym.library.net.SplashPresenter.Companion.PERMISSIONS
import
com.ym.game.utils.CenterDialog
import
com.ym.library.module.NewsEntity
import
com.ym.library.net.*
import
com.ym.library.utils.*
import
com.ym.library.utils.*
import
com.ym.modulecommon.base.BaseActivity
import
com.ym.modulecommon.base.BaseActivity
...
...
app/src/main/java/com/ym/game/activity/WelfareActivity.kt
View file @
2a88c3e0
...
@@ -11,12 +11,11 @@ import com.ym.ddcy.R
...
@@ -11,12 +11,11 @@ import com.ym.ddcy.R
import
com.ym.game.adapter.WelfareDiamondAdapter
import
com.ym.game.adapter.WelfareDiamondAdapter
import
com.ym.game.adapter.WelfareTaskAdpater
import
com.ym.game.adapter.WelfareTaskAdpater
import
com.ym.game.contract.WelfareContract
import
com.ym.game.contract.WelfareContract
import
com.ym.game.listener.IDialogViewCloseCallback
import
com.ym.game.presenter.WelfarePresenter
import
com.ym.game.presenter.WelfarePresenter
import
com.ym.game.view.MainDialog
import
com.ym.library.listener.OnRecycleItemClickListener
import
com.ym.library.listener.OnRecycleItemClickListener
import
com.ym.library.module.DiamondEntity
import
com.ym.library.module.*
import
com.ym.library.module.NewsEntity
import
com.ym.library.module.TaskCompleteEntity
import
com.ym.library.module.TaskListEntity
import
com.ym.library.net.BaseActivity
import
com.ym.library.net.BaseActivity
import
com.ym.library.utils.ADConfig
import
com.ym.library.utils.ADConfig
import
com.ym.library.utils.CenterDialog
import
com.ym.library.utils.CenterDialog
...
@@ -58,7 +57,7 @@ class WelfareActivity : BaseActivity(), WelfareContract.View,
...
@@ -58,7 +57,7 @@ class WelfareActivity : BaseActivity(), WelfareContract.View,
private
fun
initAdapter
()
{
private
fun
initAdapter
()
{
diamonAdapter
=
WelfareDiamondAdapter
(
this
,
object
:
OnRecycleItemClickListener
<
DiamondEntity
>
{
diamonAdapter
=
WelfareDiamondAdapter
(
this
,
object
:
OnRecycleItemClickListener
<
DiamondEntity
>
{
override
fun
onItemClick
(
view
:
View
,
position
:
Int
,
data
:
DiamondEntity
)
{
override
fun
onItemClick
(
view
:
View
,
position
:
Int
,
data
:
DiamondEntity
)
{
mPresenter
?.
getWelfareTaskBox
()
}
}
})
})
recycler_welfare_diamond_reward
?.
layoutManager
=
GridLayoutManager
(
this
,
7
)
recycler_welfare_diamond_reward
?.
layoutManager
=
GridLayoutManager
(
this
,
7
)
...
@@ -145,10 +144,16 @@ class WelfareActivity : BaseActivity(), WelfareContract.View,
...
@@ -145,10 +144,16 @@ class WelfareActivity : BaseActivity(), WelfareContract.View,
}
}
}
}
//提现结果
//领取宝箱结果
override
fun
taskCashResult
(
result
:
NewsEntity
?)
{
override
fun
taskCashResult
(
result
:
List
<
FlyBoxEntity
>?)
{
if
(
result
!=
null
)
{
mPresenter
?.
getDiamondList
()
if
(
result
!=
null
&&
result
.
isNotEmpty
())
{
CenterDialog
.
showGuideGetMoney
(
this
,
"0.3"
,
null
)
CenterDialog
.
showGuideGetMoney
(
this
,
"0.3"
,
null
)
MainDialog
.
showWelfareOpenBox
(
this
,
result
,
object
:
IDialogViewCloseCallback
{
override
fun
onCloseViewSuccess
(
isSuccess
:
Boolean
)
{
}
})
}
}
}
}
...
...
app/src/main/java/com/ym/game/adapter/ClockInWithdrawAdpater.kt
View file @
2a88c3e0
This diff is collapsed.
Click to expand it.
app/src/main/java/com/ym/game/adapter/WelfareDiamondAdapter.kt
View file @
2a88c3e0
...
@@ -13,6 +13,8 @@ import com.ym.library.base.BaseRecyclerAdapter
...
@@ -13,6 +13,8 @@ import com.ym.library.base.BaseRecyclerAdapter
import
com.ym.library.listener.OnRecycleItemClickListener
import
com.ym.library.listener.OnRecycleItemClickListener
import
com.ym.library.module.DiamondEntity
import
com.ym.library.module.DiamondEntity
import
com.ym.library.module.NewsEntity
import
com.ym.library.module.NewsEntity
import
com.ym.library.utils.Utils
/**
/**
*Craeted by ${junqi.li}
*Craeted by ${junqi.li}
*Craeted by 2020/9/18
*Craeted by 2020/9/18
...
@@ -58,13 +60,16 @@ class WelfareDiamondAdapter :
...
@@ -58,13 +60,16 @@ class WelfareDiamondAdapter :
holder
?.
ivStatus
.
setImageResource
(
R
.
drawable
.
icon_welfare_box_close
)
holder
?.
ivStatus
.
setImageResource
(
R
.
drawable
.
icon_welfare_box_close
)
}
}
holder
?.
ivDottedLine
.
visibility
=
View
.
GONE
holder
?.
ivDottedLine
.
visibility
=
View
.
GONE
holder
?.
itemView
?.
setOnClickListener
{
if
(
data
.
coins
!!
>=
data
.
max
!!
){
listener
?.
onItemClick
(
it
,
position
,
mList
[
position
])
}
else
{
Utils
.
showToast
(
mContext
,
"钻石不足"
)
}
}
}
else
{
}
else
{
holder
?.
ivDottedLine
.
visibility
=
View
.
VISIBLE
holder
?.
ivDottedLine
.
visibility
=
View
.
VISIBLE
}
}
holder
?.
itemView
?.
setOnClickListener
{
listener
?.
onItemClick
(
it
,
position
,
mList
[
position
])
}
}
}
}
}
...
...
app/src/main/java/com/ym/game/contract/ClockInWithdrawContract.kt
View file @
2a88c3e0
...
@@ -11,6 +11,6 @@ class ClockInWithdrawContract {
...
@@ -11,6 +11,6 @@ class ClockInWithdrawContract {
interface
Presenter
{
interface
Presenter
{
fun
getClockInWithdrawList
()
fun
getClockInWithdrawList
()
fun
getDoWd
()
fun
getDoWd
(
id
:
Int
)
}
}
}
}
\ No newline at end of file
app/src/main/java/com/ym/game/contract/WelfareContract.kt
View file @
2a88c3e0
package
com.ym.game.contract
package
com.ym.game.contract
import
com.ym.library.module.DiamondEntity
import
com.ym.library.module.*
import
com.ym.library.module.NewsEntity
import
com.ym.library.module.TaskCompleteEntity
import
com.ym.library.module.TaskListEntity
class
WelfareContract
{
class
WelfareContract
{
interface
View
{
interface
View
{
fun
diamondListResult
(
result
:
DiamondEntity
?)
fun
diamondListResult
(
result
:
DiamondEntity
?)
fun
taskListResult
(
result
:
TaskListEntity
?)
fun
taskListResult
(
result
:
TaskListEntity
?)
fun
taskReceiveListResult
(
result
:
TaskCompleteEntity
?)
fun
taskReceiveListResult
(
result
:
TaskCompleteEntity
?)
fun
taskCashResult
(
result
:
NewsEntity
?)
fun
taskCashResult
(
result
:
List
<
FlyBoxEntity
>
?)
}
}
interface
Presenter
{
interface
Presenter
{
...
@@ -22,6 +19,6 @@ class WelfareContract {
...
@@ -22,6 +19,6 @@ class WelfareContract {
fun
getWelfareVideoReport
(
sid
:
Int
)
fun
getWelfareVideoReport
(
sid
:
Int
)
fun
get
TaskCash
()
fun
get
WelfareTaskBox
()
}
}
}
}
\ No newline at end of file
app/src/main/java/com/ym/game/presenter/ClockInWithdrawPresenter.kt
View file @
2a88c3e0
package
com.ym.game.presenter
package
com.ym.game.presenter
import
android.app.Activity
import
com.ym.game.contract.ClockInWithdrawContract
import
com.ym.game.contract.ClockInWithdrawContract
import
com.ym.game.contract.RecordContract
import
com.ym.game.listener.IDialogViewCloseCallback
import
com.ym.game.view.MainDialog
import
com.ym.library.module.ClockInWithdrawEntity
import
com.ym.library.module.ClockInWithdrawEntity
import
com.ym.library.module.FlyBoxEntity
import
com.ym.library.net.BaseObserver
import
com.ym.library.net.BaseObserver
import
com.ym.library.net.GameApiClient
import
com.ym.library.net.GameApiClient
import
com.ym.library.net.RxSchedulers
import
com.ym.library.net.RxSchedulers
...
@@ -30,8 +33,8 @@ class ClockInWithdrawPresenter : ClockInWithdrawContract.Presenter {
...
@@ -30,8 +33,8 @@ class ClockInWithdrawPresenter : ClockInWithdrawContract.Presenter {
})
})
}
}
override
fun
getDoWd
()
{
override
fun
getDoWd
(
id
:
Int
)
{
GameApiClient
.
gameApi
.
getDoWd
().
compose
(
GameApiClient
.
gameApi
.
getDoWd
(
id
).
compose
(
RxSchedulers
.
observableIO2Main
()
RxSchedulers
.
observableIO2Main
()
).
subscribe
(
object
:
BaseObserver
<
ClockInWithdrawEntity
>()
{
).
subscribe
(
object
:
BaseObserver
<
ClockInWithdrawEntity
>()
{
override
fun
onSuccess
(
result
:
ClockInWithdrawEntity
?)
{
override
fun
onSuccess
(
result
:
ClockInWithdrawEntity
?)
{
...
@@ -43,4 +46,35 @@ class ClockInWithdrawPresenter : ClockInWithdrawContract.Presenter {
...
@@ -43,4 +46,35 @@ class ClockInWithdrawPresenter : ClockInWithdrawContract.Presenter {
}
}
})
})
}
}
fun
getFlyBoxReceive
(
activity
:
Activity
)
{
GameApiClient
.
gameApi
.
getopenBox
()
.
compose
(
RxSchedulers
.
observableIO2Main
())
.
subscribe
(
object
:
BaseObserver
<
FlyBoxEntity
>()
{
override
fun
onSuccess
(
result
:
FlyBoxEntity
?)
{
getClockInWithdrawList
()
if
(
result
!=
null
)
{
var
type
=
result
.
type
if
(
type
!=
null
)
{
MainDialog
.
showopenBox
(
activity
,
type
,
"宝箱奖励"
,
result
.
awardNum
?:
0
,
result
,
object
:
IDialogViewCloseCallback
{
override
fun
onCloseViewSuccess
(
isSuccess
:
Boolean
)
{
}
}
)
}
}
}
override
fun
onFailure
(
e
:
Throwable
?,
code
:
String
?,
errorMsg
:
String
?)
{
}
})
}
}
}
\ No newline at end of file
app/src/main/java/com/ym/game/presenter/WelfarePresenter.kt
View file @
2a88c3e0
package
com.ym.game.presenter
package
com.ym.game.presenter
import
com.ym.game.contract.WelfareContract
import
com.ym.game.contract.WelfareContract
import
com.ym.library.module.DiamondEntity
import
com.ym.library.module.*
import
com.ym.library.module.NewsEntity
import
com.ym.library.module.TaskCompleteEntity
import
com.ym.library.module.TaskListEntity
import
com.ym.library.net.BaseObserver
import
com.ym.library.net.BaseObserver
import
com.ym.library.net.GameApiClient
import
com.ym.library.net.GameApiClient
import
com.ym.library.net.RxSchedulers
import
com.ym.library.net.RxSchedulers
import
com.ym.library.utils.Utils
class
WelfarePresenter
:
WelfareContract
.
Presenter
{
class
WelfarePresenter
:
WelfareContract
.
Presenter
{
...
@@ -73,11 +71,11 @@ class WelfarePresenter : WelfareContract.Presenter {
...
@@ -73,11 +71,11 @@ class WelfarePresenter : WelfareContract.Presenter {
})
})
}
}
override
fun
get
TaskCash
()
{
override
fun
get
WelfareTaskBox
()
{
GameApiClient
.
gameApi
.
get
TaskCash
().
compose
(
GameApiClient
.
gameApi
.
get
WelfareTaskBox
().
compose
(
RxSchedulers
.
observableIO2Main
()
RxSchedulers
.
observableIO2Main
()
).
subscribe
(
object
:
BaseObserver
<
NewsEntity
>()
{
).
subscribe
(
object
:
BaseObserver
<
List
<
FlyBoxEntity
>
>()
{
override
fun
onSuccess
(
result
:
NewsEntity
?)
{
override
fun
onSuccess
(
result
:
List
<
FlyBoxEntity
>
?)
{
mView
?.
taskCashResult
(
result
)
mView
?.
taskCashResult
(
result
)
}
}
...
...
app/src/main/java/com/ym/game/view/MainDialog.kt
View file @
2a88c3e0
...
@@ -71,7 +71,7 @@ object MainDialog {
...
@@ -71,7 +71,7 @@ object MainDialog {
0
,
0
,
Gravity
.
CENTER
Gravity
.
CENTER
)
)
val
layouAd
=
mDialogView
?.
findViewById
<
FrameLayout
>(
R
.
id
.
layout_get_drop_ad2
)
val
layou
t
Ad
=
mDialogView
?.
findViewById
<
FrameLayout
>(
R
.
id
.
layout_get_drop_ad2
)
AdManager
.
loadFeedAd
(
AdManager
.
loadFeedAd
(
ADConfig
.
AD_IMG_FADE
,
ADConfig
.
AD_IMG_FADE
,
...
@@ -80,7 +80,7 @@ object MainDialog {
...
@@ -80,7 +80,7 @@ object MainDialog {
Utils
.
px2dip
(
PhoneUtils
.
getScreenWidth
(
activity
).
toFloat
())
-
56
,
Utils
.
px2dip
(
PhoneUtils
.
getScreenWidth
(
activity
).
toFloat
())
-
56
,
((
Utils
.
px2dip
(
activity
.
windowManager
?.
defaultDisplay
?.
width
!!
.
toFloat
())
-
56
)
*
0.66
).
toInt
()
((
Utils
.
px2dip
(
activity
.
windowManager
?.
defaultDisplay
?.
width
!!
.
toFloat
())
-
56
)
*
0.66
).
toInt
()
),
),
layouAd
layou
t
Ad
)
)
mDialog
.
setOnDismissListener
(
object
:
DialogInterface
.
OnDismissListener
{
mDialog
.
setOnDismissListener
(
object
:
DialogInterface
.
OnDismissListener
{
...
@@ -354,6 +354,84 @@ object MainDialog {
...
@@ -354,6 +354,84 @@ object MainDialog {
mDialog
.
show
()
mDialog
.
show
()
}
}
//福利中心开宝箱
fun
showWelfareOpenBox
(
context
:
Context
?,
results
:
List
<
FlyBoxEntity
>,
mListener
:
IDialogViewCloseCallback
)
{
if
(
context
==
null
)
{
return
}
val
mDialog
=
Dialog
(
context
,
R
.
style
.
UpdateVersionCompatDialogTheme
)
val
mDialogView
=
showBottomDialog
(
R
.
layout
.
dialog_get_welfare_drop
,
context
,
mDialog
,
0
,
Gravity
.
CENTER
)
val
layout_seed
=
mDialogView
?.
findViewById
<
LinearLayout
>(
R
.
id
.
layout_seed
)
val
layout_coins
=
mDialogView
?.
findViewById
<
LinearLayout
>(
R
.
id
.
layout_coins
)
val
layout_accelerator
=
mDialogView
?.
findViewById
<
LinearLayout
>(
R
.
id
.
layout_accelerator
)
val
tv_seed
=
mDialogView
?.
findViewById
<
TextView
>(
R
.
id
.
tv_seed
)
val
iv_seed_bg
=
mDialogView
?.
findViewById
<
ImageView
>(
R
.
id
.
iv_seed_bg
)
val
tv_coin
=
mDialogView
?.
findViewById
<
TextView
>(
R
.
id
.
tv_coin
)
val
tv_accelerator
=
mDialogView
?.
findViewById
<
TextView
>(
R
.
id
.
tv_accelerator
)
val
layoutAd
=
mDialogView
?.
findViewById
<
FrameLayout
>(
R
.
id
.
layout_get_drop_ad
)
for
(
entity
in
results
)
{
//1种子 2金币 3加速剂
when
(
entity
.
awardType
)
{
1
->
{
layout_seed
.
visibility
=
View
.
VISIBLE
setImage
(
iv_seed_bg
,
entity
.
id
)
tv_seed
.
text
=
"+${entity.awardNum}"
}
2
->
{
layout_coins
.
visibility
=
View
.
VISIBLE
tv_coin
.
text
=
"+${entity.awardNum}"
}
3
->
{
layout_accelerator
.
visibility
=
View
.
VISIBLE
tv_accelerator
.
text
=
"+${entity.awardNum}"
}
}
}
mDialogView
.
findViewById
<
TextView
>(
R
.
id
.
btn_get_drop_happy_accept
).
setOnClickListener
{
mDialog
.
dismiss
()
mListener
.
onCloseViewSuccess
(
true
)
}
mDialogView
.
findViewById
<
ImageView
>(
R
.
id
.
lv_get_drop_close
).
setOnClickListener
{
mDialog
.
dismiss
()
mListener
.
onCloseViewSuccess
(
true
)
}
AdManager
.
loadFeedAd
(
ADConfig
.
AD_IMG_FADE
,
(
context
as
Activity
),
ZXADSizeConfig
(
Utils
.
px2dip
(
PhoneUtils
.
getScreenWidth
(
context
).
toFloat
())
-
56
,
((
Utils
.
px2dip
(
context
.
windowManager
?.
defaultDisplay
?.
width
!!
.
toFloat
())
-
56
)
*
0.66
).
toInt
()
),
layoutAd
)
mDialog
.
setOnDismissListener
(
object
:
DialogInterface
.
OnDismissListener
{
override
fun
onDismiss
(
p0
:
DialogInterface
?)
{
onDestroy
()
}
})
mDialog
.
setCanceledOnTouchOutside
(
false
)
mDialog
.
setCancelable
(
false
)
mDialog
.
show
()
}
//提现弹窗
//提现弹窗
fun
showWithDraw
(
fun
showWithDraw
(
...
...
app/src/main/res/drawable-xhdpi/icon_clock_in_item_bg.png
0 → 100644
View file @
2a88c3e0
5.88 KB
app/src/main/res/drawable-xhdpi/icon_clock_in_item_gray_bg.png
0 → 100644
View file @
2a88c3e0
5.82 KB
app/src/main/res/drawable-xhdpi/icon_clock_in_item_gray_pg_complete.png
0 → 100644
View file @
2a88c3e0
13.8 KB
app/src/main/res/drawable-xhdpi/icon_clock_in_item_phone.png
0 → 100644
View file @
2a88c3e0
23.3 KB
app/src/main/res/drawable-xhdpi/icon_clock_in_item_red_pg.png
0 → 100644
View file @
2a88c3e0
6.73 KB
app/src/main/res/drawable-xhdpi/icon_clock_in_item_red_pg_coin.png
0 → 100644
View file @
2a88c3e0
7.06 KB
app/src/main/res/drawable-xhdpi/icon_clock_in_item_red_pg_coin_complete.png
0 → 100644
View file @
2a88c3e0
12.5 KB
app/src/main/res/drawable-xhdpi/icon_clock_in_item_red_pg_coin_uncomplete.png
0 → 100644
View file @
2a88c3e0
12.6 KB
app/src/main/res/drawable-xhdpi/icon_clock_in_item_red_pg_gray.png
0 → 100644
View file @
2a88c3e0
14.7 KB
app/src/main/res/drawable-xhdpi/icon_clock_in_item_yellow_bg.png
0 → 100644
View file @
2a88c3e0
8.85 KB
app/src/main/res/drawable/game_clock_in_item_progress_bg.xml
0 → 100644
View file @
2a88c3e0
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:id=
"@android:id/background"
>
<shape>
<corners
android:radius=
"7.5dp"
/>
<!-- <stroke-->
<!-- android:width="1dp"-->
<!-- android:color="#EEEEEE" />-->
<solid
android:color=
"#D9D9D9"
/>
</shape>
</item>
<item
android:id=
"@android:id/progress"
>
<clip>
<shape>
<corners
android:radius=
"7.5dp"
/>
<gradient
android:angle=
"0"
android:endColor=
"#ED7624"
android:startColor=
"#ED7624"
/>
</shape>
</clip>
</item>
</layer-list>
\ No newline at end of file
app/src/main/res/drawable/shape_ffffff_r10.xml
0 → 100644
View file @
2a88c3e0
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"#69ffffff"
/>
<corners
android:radius=
"10.5dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/activity_clock_in_withdraw.xml
View file @
2a88c3e0
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
xmlns:tools=
"http://schemas.android.com/tools"
android:background=
"#F7BD7C"
android:background=
"#F7BD7C"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
...
@@ -46,7 +47,7 @@
...
@@ -46,7 +47,7 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:includeFontPadding=
"false"
android:includeFontPadding=
"false"
android
:text=
"已连续打卡 天"
tools
:text=
"已连续打卡 天"
android:textColor=
"#ED7624"
android:textColor=
"#ED7624"
android:textSize=
"26sp"
/>
android:textSize=
"26sp"
/>
...
@@ -56,7 +57,7 @@
...
@@ -56,7 +57,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"11dp"
android:layout_marginTop=
"11dp"
android:includeFontPadding=
"false"
android:includeFontPadding=
"false"
android
:text=
"每日观看20个视频即可完成打卡"
tools
:text=
"每日观看20个视频即可完成打卡"
android:textColor=
"#8F2C0F"
android:textColor=
"#8F2C0F"
android:textSize=
"16sp"
/>
android:textSize=
"16sp"
/>
...
@@ -65,9 +66,7 @@
...
@@ -65,9 +66,7 @@
android:id=
"@+id/recycler_clock_in"
android:id=
"@+id/recycler_clock_in"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"20dp"
android:layout_marginTop=
"22dp"
android:layout_marginTop=
"22dp"
android:layout_marginRight=
"20dp"
android:layout_marginBottom=
"30dp"
/>
android:layout_marginBottom=
"30dp"
/>
</LinearLayout>
</LinearLayout>
...
...
app/src/main/res/layout/dialog_get_welfare_drop.xml
0 → 100644
View file @
2a88c3e0
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:orientation=
"vertical"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"370dp"
>
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_centerHorizontal=
"true"
android:background=
"@mipmap/icon_main_dialog_get_drops_bg"
>
</RelativeLayout>
<ImageView
android:id=
"@+id/lv_get_drop_close"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_marginTop=
"70dp"
android:layout_marginRight=
"@dimen/dp_30"
android:src=
"@mipmap/icon_new_close"
/>
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_height=
"350dp"
android:layout_alignParentBottom=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"@dimen/dp_10"
android:layout_marginBottom=
"20dp"
android:background=
"@mipmap/icon_content_bg"
>
<ImageView
android:id=
"@+id/id_img_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"35dp"
android:src=
"@mipmap/icon_top_bg"
/>
<TextView
android:id=
"@+id/id_tv_gongxi_get"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"@dimen/dp_44"
android:text=
"恭喜获得"
android:textColor=
"@color/white"
android:textSize=
"20sp"
/>
<LinearLayout
android:id=
"@+id/id_ll_content"
android:layout_width=
"310dp"
android:layout_height=
"150dp"
android:layout_below=
"@+id/id_tv_gongxi_get"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"@dimen/dp_60"
android:orientation=
"horizontal"
android:visibility=
"visible"
>
<LinearLayout
android:id=
"@+id/layout_seed"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_weight=
"1"
android:gravity=
"center"
android:orientation=
"vertical"
android:visibility=
"gone"
>
<ImageView
android:id=
"@+id/iv_seed_bg"
android:layout_width=
"@dimen/dp_60"
android:layout_height=
"@dimen/dp_60"
android:src=
"@mipmap/img_cabbage"
/>
<TextView
android:id=
"@+id/tv_seed"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_10"
android:textColor=
"@color/color_7C1714"
android:textSize=
"30sp"
android:textStyle=
"bold"
tools:text=
"+40"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/layout_coins"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginLeft=
"@dimen/dp_40"
android:layout_weight=
"1"
android:gravity=
"center"
android:orientation=
"vertical"
android:visibility=
"gone"
>
<ImageView
android:layout_width=
"@dimen/dp_60"
android:layout_height=
"@dimen/dp_60"
android:src=
"@mipmap/icon_coin"
/>
<TextView
android:id=
"@+id/tv_coin"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_10"
android:textColor=
"@color/color_7C1714"
android:textSize=
"30sp"
android:textStyle=
"bold"
tools:text=
"+40g"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/layout_accelerator"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginLeft=
"@dimen/dp_40"
android:layout_weight=
"1"
android:gravity=
"center"
android:orientation=
"vertical"
android:visibility=
"gone"
>
<ImageView
android:layout_width=
"@dimen/dp_60"
android:layout_height=
"@dimen/dp_60"
android:src=
"@mipmap/icon_speed_water"
/>
<TextView
android:id=
"@+id/tv_accelerator"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_10"
android:textColor=
"@color/color_7C1714"
android:textSize=
"30sp"
android:textStyle=
"bold"
tools:text=
"+40"
/>
</LinearLayout>
</LinearLayout>
<TextView
android:id=
"@+id/btn_get_drop_happy_accept"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/id_ll_content"
android:layout_centerHorizontal=
"true"
android:background=
"@drawable/btn_selector"
/>
</RelativeLayout>
</RelativeLayout>
<FrameLayout
android:id=
"@+id/layout_get_drop_ad"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"18dp"
android:layout_marginTop=
"5dp"
android:layout_marginRight=
"18dp"
android:background=
"@color/white"
android:padding=
"@dimen/dp_10"
android:visibility=
"gone"
/>
</LinearLayout>
</FrameLayout>
\ No newline at end of file
app/src/main/res/layout/item_clock_in_tip.xml
View file @
2a88c3e0
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"21dp"
android:layout_marginLeft=
"20dp"
android:layout_marginRight=
"20dp"
>
<TextView
<com.ym.game.wedget.MediumBoldTextView
android:layout_width=
"wrap_content"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
android:layout_height=
"wrap_content"
android:background=
"@drawable/shape_ffffff_r10"
android:gravity=
"center"
android:text=
"完成当前打卡,可解锁下一天打卡任务"
android:textColor=
"#8F2C0F"
android:textSize=
"15sp"
/>
</FrameLayout>
</FrameLayout>
\ No newline at end of file
app/src/main/res/layout/item_clock_in_withdraw.xml
View file @
2a88c3e0
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"20dp"
android:layout_marginBottom=
"5dp"
>
<RelativeLayout
android:id=
"@+id/layout_clock_in_item_root"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"3dp"
android:layout_marginRight=
"@dimen/dp_20"
>
<ImageView
android:id=
"@+id/iv_clock_in_item_bg"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:scaleType=
"fitXY"
android:src=
"@drawable/icon_clock_in_item_bg"
/>
<TextView
android:id=
"@+id/tv_clock_in_item_day"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/dp_14"
android:text=
"第一天"
android:textColor=
"#ED7624"
android:textSize=
"16sp"
/>
<TextView
android:id=
"@+id/tv_clock_in_complete"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
android:text=
"今日已完成打卡"
android:textColor=
"#8C856F"
android:textSize=
"14sp"
android:visibility=
"gone"
/>
<LinearLayout
android:id=
"@+id/layout_clock_in_center"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
android:gravity=
"center_vertical"
android:orientation=
"vertical"
>
<com.ym.game.wedget.MediumBoldTextView
android:id=
"@+id/tv_clock_in_item_ad_count"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_2"
android:layout_marginRight=
"@dimen/dp_2"
android:includeFontPadding=
"false"
android:text=
"17"
android:textColor=
"#E91119"
android:textSize=
"20sp"
/>
<com.ym.game.wedget.MediumBoldTextView
android:id=
"@+id/tv_clock_in_item_money"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_2"
android:layout_marginRight=
"@dimen/dp_2"
android:includeFontPadding=
"false"
android:text=
"0.3元"
android:textColor=
"#E91119"
android:textSize=
"22sp"
android:visibility=
"visible"
/>
<RelativeLayout
android:id=
"@+id/layout_progress"
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/dp_12"
android:layout_marginTop=
"8dp"
android:visibility=
"gone"
>
<ProgressBar
android:id=
"@+id/progress_clock_in_bar"
style=
"?android:attr/progressBarStyleHorizontal"
android:layout_width=
"151dp"
android:layout_height=
"@dimen/dp_12"
android:max=
"100"
android:progress=
"30"
android:progressDrawable=
"@drawable/game_clock_in_item_progress_bg"
/>
<com.ym.game.wedget.MediumBoldTextView
android:id=
"@+id/tv_clock_in_item_progress"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:includeFontPadding=
"false"
android:text=
"3/20"
android:textStyle=
"bold"
android:textColor=
"#A43D14"
android:textSize=
"10sp"
/>
</RelativeLayout>
</LinearLayout>
<ImageView
android:id=
"@+id/iv_clock_in_item_status"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"20dp"
android:src=
"@drawable/icon_clock_in_item_red_pg"
android:visibility=
"visible"
/>
</RelativeLayout>
<RelativeLayout
android:id=
"@+id/layout_clock_in_red_pg"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"10dp"
android:visibility=
"visible"
>
<ImageView
android:id=
"@+id/iv_clock_in_item_red_pg_status"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"-8dp"
android:src=
"@drawable/icon_clock_in_item_red_pg_coin_complete"
/>
<com.ym.game.wedget.MediumBoldTextView
android:id=
"@+id/tv_clock_in_item_money_red"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
android:includeFontPadding=
"false"
android:text=
"0.3"
android:textColor=
"#E91119"
android:textSize=
"20sp"
/>
</RelativeLayout>
<FrameLayout
android:id=
"@+id/layout_tip"
android:layout_width=
"match_parent"
android:layout_height=
"21dp"
android:layout_below=
"@+id/layout_clock_in_item_root"
android:layout_marginTop=
"10dp"
android:layout_marginRight=
"20dp"
android:visibility=
"gone"
>
<com.ym.game.wedget.MediumBoldTextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/shape_ffffff_r10"
android:gravity=
"center"
android:text=
"完成当前打卡,可解锁下一天打卡任务"
android:textColor=
"#8F2C0F"
android:textSize=
"15sp"
/>
</FrameLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
library/src/main/java/com/ym/library/Constant.java
View file @
2a88c3e0
...
@@ -90,6 +90,7 @@ public class Constant {
...
@@ -90,6 +90,7 @@ public class Constant {
public
static
int
ali_status
=
0
;
public
static
int
ali_status
=
0
;
public
static
int
to_kandian_withdraw
=
0
;
public
static
int
to_kandian_withdraw
=
0
;
public
static
int
superMasterTab
=
0
;
public
static
int
superMasterTab
=
0
;
public
static
int
videoNum
=
20
;
public
static
LatestLoginInfo
latestLoginInfo
;
public
static
LatestLoginInfo
latestLoginInfo
;
public
static
final
int
PAGE_MAIN
=
1
;
//主页
public
static
final
int
PAGE_MAIN
=
1
;
//主页
...
...
library/src/main/java/com/ym/library/module/ClockInWithdrawEntity.kt
View file @
2a88c3e0
package
com.ym.library.module
package
com.ym.library.module
class
ClockInWithdrawEntity
{
class
ClockInWithdrawEntity
{
var
type
:
Int
?
=
0
var
clockNum
:
Int
?
=
0
var
videoNum
:
Int
?
=
0
var
list
:
List
<
ClockInItemEntity
>?
=
null
class
ClockInItemEntity
{
var
id
:
Int
?
=
0
//提现id
var
title
:
String
?
=
""
//打卡标题
var
targetNum
:
Int
?
=
0
//打卡目标数
var
currentNum
:
Int
?
=
null
//当前打卡数
var
cash
:
Int
?
=
null
//可提现金额 单位:分
var
cashStr
:
String
?
=
null
//可提现金额 字符串
var
status
:
Int
?
=
null
//红包状态 1 已提现 2 可提现 0 未完成
var
desc
:
String
?
=
null
//文案
var
isToday
:
Int
?
=
0
//是否是今天 1是 0不是
var
special
:
Int
?
=
1
//1 普通打卡 2 提现打卡 3 手机
var
needClockNum
=
0
//打卡天数
var
type
:
Int
?
=
0
//是否隔断展示文案 0不展示 1展示
}
/**
* 普通任务 special=1
加亮无角标:当天任务,未完成打卡 status=4
变暗带角标:当天任务,已完成 status=2
变暗带角标:未来任务(未解锁) status=5
提现任务 special=2
晃动加亮无角标:已完成打卡未提现,点击调提现接口 status=1
加亮无角标:当天任务,未完成打卡 status=3
加亮带角标:未来任务,未解锁 status=7
变暗带角标:已完成打卡并已提现 status=6
*/
}
}
\ No newline at end of file
library/src/main/java/com/ym/library/module/FlyBoxEntity.kt
View file @
2a88c3e0
package
com.ym.library.module
package
com.ym.library.module
class
FlyBoxEntity
{
class
FlyBoxEntity
{
var
id
:
Int
=
0
var
type
:
Int
?
=
0
var
type
:
Int
?
=
0
var
awardNum
:
Int
?
=
0
var
awardNum
:
Int
?
=
0
var
awardType
:
Int
?
=
0
//1种子 2金币 3加速剂
var
subType
:
Int
?
=
0
var
seedList
:
MutableList
<
SeedList
>
=
ArrayList
()
var
seedList
:
MutableList
<
SeedList
>
=
ArrayList
()
class
SeedList
{
class
SeedList
{
...
...
library/src/main/java/com/ym/library/net/IGameApi.kt
View file @
2a88c3e0
...
@@ -262,8 +262,8 @@ interface IGameApi {
...
@@ -262,8 +262,8 @@ interface IGameApi {
fun
getClockList
():
Observable
<
Response
<
ClockInWithdrawEntity
>>
fun
getClockList
():
Observable
<
Response
<
ClockInWithdrawEntity
>>
//打卡提现
//打卡提现
@
GE
T
(
NetConfig
.
Game
.
URL_GAME_DO_WD
)
@
POS
T
(
NetConfig
.
Game
.
URL_GAME_DO_WD
)
fun
getDoWd
():
Observable
<
Response
<
ClockInWithdrawEntity
>>
fun
getDoWd
(
@Query
(
"clockId"
)
clockId
:
Int
):
Observable
<
Response
<
ClockInWithdrawEntity
>>
/**
/**
* 任务页列表
* 任务页列表
...
@@ -292,8 +292,8 @@ interface IGameApi {
...
@@ -292,8 +292,8 @@ interface IGameApi {
/**
/**
* 福利提现
* 福利提现
*/
*/
@POST
(
NetConfig
.
Game
.
URL_GAME_
TASK_CASH
)
@POST
(
NetConfig
.
Game
.
URL_GAME_
WELFARE_TASK_BOX
)
fun
get
TaskCash
():
Observable
<
Response
<
NewsEntity
>>
fun
get
WelfareTaskBox
():
Observable
<
Response
<
List
<
FlyBoxEntity
>
>>
@GET
(
NetConfig
.
Game
.
URL_COLLECT_CARD
)
@GET
(
NetConfig
.
Game
.
URL_COLLECT_CARD
)
fun
getCollectCard
():
Observable
<
Response
<
PuzzleEntity
?
>>
fun
getCollectCard
():
Observable
<
Response
<
PuzzleEntity
?
>>
...
...
library/src/main/java/com/ym/library/net/NetConfig.java
View file @
2a88c3e0
...
@@ -254,12 +254,12 @@ public class NetConfig {
...
@@ -254,12 +254,12 @@ public class NetConfig {
public
static
final
String
URL_GAME_OPEN_PLANT_BOX
=
"app/v1/game/ddcy/open_plant_box"
;
//底部拆红包
public
static
final
String
URL_GAME_OPEN_PLANT_BOX
=
"app/v1/game/ddcy/open_plant_box"
;
//底部拆红包
public
static
final
String
URL_GAME_CLOCK_LIST
=
"app/v1/game/clock_list"
;
//打卡提现列表
public
static
final
String
URL_GAME_CLOCK_LIST
=
"app/v1/game/
ddcy/
clock_list"
;
//打卡提现列表
public
static
final
String
URL_GAME_DO_WD
=
"app/v1/game/ddcy/
do
_wd"
;
//打卡提现
public
static
final
String
URL_GAME_DO_WD
=
"app/v1/game/ddcy/
clock
_wd"
;
//打卡提现
public
static
final
String
URL_GAME_TASK_PROCESS
=
"app/v1/game/task_process"
;
//福利中心钻石进度
public
static
final
String
URL_GAME_TASK_PROCESS
=
"app/v1/game/task_process"
;
//福利中心钻石进度
public
static
final
String
URL_GAME_WELFARE_VIDEO_REPORT
=
"app/v1/game/welfare_video_report"
;
//福利中心看视频任务
public
static
final
String
URL_GAME_WELFARE_VIDEO_REPORT
=
"app/v1/game/welfare_video_report"
;
//福利中心看视频任务
public
static
final
String
URL_GAME_
TASK_CASH
=
"app/v1/game/task_cash"
;
//福利中心提现
public
static
final
String
URL_GAME_
WELFARE_TASK_BOX
=
"app/v1/game/farm/welfare_task_box"
;
//福利中心宝箱领取
public
static
final
String
URL_COLLECT_CARD
=
"app/v1/collect-card/list"
;
//宝箱卡片列表
public
static
final
String
URL_COLLECT_CARD
=
"app/v1/collect-card/list"
;
//宝箱卡片列表
public
static
final
String
URL_COLLECT_CARD_PUT
=
"app/v1/collect-card/put"
;
//宝箱卡片拼图
public
static
final
String
URL_COLLECT_CARD_PUT
=
"app/v1/collect-card/put"
;
//宝箱卡片拼图
public
static
final
String
URL_COLLECT_CARD_ADV
=
"app/v1/collect-card/adv"
;
//看广告一键拼图
public
static
final
String
URL_COLLECT_CARD_ADV
=
"app/v1/collect-card/adv"
;
//看广告一键拼图
...
...
library/src/main/res/layout/dialog_get_diamand.xml
View file @
2a88c3e0
...
@@ -110,8 +110,12 @@
...
@@ -110,8 +110,12 @@
android:id=
"@+id/layout_ad"
android:id=
"@+id/layout_ad"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"15dp"
android:layout_marginLeft=
"15dp"
android:padding=
"10dp"
/>
android:layout_marginTop=
"10dp"
android:layout_marginRight=
"15dp"
android:background=
"@color/white"
android:padding=
"10dp"
android:visibility=
"gone"
/>
</LinearLayout>
</LinearLayout>
...
...
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