Commit f419b8fe authored by Li's avatar Li

[李俊岐] 修改福利中心ui

parent cd3ed079
...@@ -87,12 +87,6 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback { ...@@ -87,12 +87,6 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
AdUtils.loadNextCacheRewardVideoAd(this) AdUtils.loadNextCacheRewardVideoAd(this)
AdUtils.loadFeedCacheAdToCache(this) AdUtils.loadFeedCacheAdToCache(this)
AdManager.loadFeedAdToCache(
ADConfig.AD_IMG_FADE, this, ZXADSizeConfig(
Utils.px2dip(PhoneUtils.getScreenWidth(this).toFloat()) - 40, 280
)
)
} }
override fun onDestroy() { override fun onDestroy() {
......
...@@ -15,6 +15,7 @@ import com.ym.library.module.ClockInWithdrawEntity ...@@ -15,6 +15,7 @@ import com.ym.library.module.ClockInWithdrawEntity
import com.ym.library.module.ExchangeEntity import com.ym.library.module.ExchangeEntity
import com.ym.library.net.BaseActivity import com.ym.library.net.BaseActivity
import com.ym.library.utils.CenterDialog import com.ym.library.utils.CenterDialog
import com.ym.library.utils.EventUtils
import kotlinx.android.synthetic.main.activity_clock_in_withdraw.* import kotlinx.android.synthetic.main.activity_clock_in_withdraw.*
//打卡提现 福利 //打卡提现 福利
...@@ -30,6 +31,7 @@ class ClockInWithdrawActitivy : BaseActivity(), ClockInWithdrawContract.View, ...@@ -30,6 +31,7 @@ class ClockInWithdrawActitivy : BaseActivity(), ClockInWithdrawContract.View,
} }
override fun init() { override fun init() {
EventUtils.onEvent("tab_imp","ClockInWithdraw")
mPresenter = ClockInWithdrawPresenter(this) mPresenter = ClockInWithdrawPresenter(this)
iv_clock_in_close?.setOnClickListener { iv_clock_in_close?.setOnClickListener {
finish() finish()
...@@ -52,8 +54,10 @@ class ClockInWithdrawActitivy : BaseActivity(), ClockInWithdrawContract.View, ...@@ -52,8 +54,10 @@ class ClockInWithdrawActitivy : BaseActivity(), ClockInWithdrawContract.View,
) { ) {
mData = data mData = data
if (data.special == 1) { if (data.special == 1) {
EventUtils.onEvent("attendance_task_ordinary_click")
mPresenter?.getFlyBoxReceive(this) mPresenter?.getFlyBoxReceive(this)
} else if (data.special == 2) { } else if (data.special == 2) {
EventUtils.onEvent("attendance_task_withdraw_click")
mPresenter?.getDoWd(data.id!!) mPresenter?.getDoWd(data.id!!)
} }
} }
...@@ -65,7 +69,7 @@ class ClockInWithdrawActitivy : BaseActivity(), ClockInWithdrawContract.View, ...@@ -65,7 +69,7 @@ class ClockInWithdrawActitivy : BaseActivity(), ClockInWithdrawContract.View,
tv_clock_in_days?.text = tv_clock_in_days?.text =
Html.fromHtml("已连续打卡 <font color=\"#8F2C0F\"><big>${result?.clockNum}</big></font> 天") Html.fromHtml("已连续打卡 <font color=\"#8F2C0F\"><big>${result?.clockNum}</big></font> 天")
tv_clock_in_info?.text = "每日观看${result?.videoNum}个视频即可完成打卡" tv_clock_in_info?.text = "${result?.title}"
mAdapter?.clear() mAdapter?.clear()
mAdapter?.appendToList(result?.list) mAdapter?.appendToList(result?.list)
...@@ -85,8 +89,9 @@ class ClockInWithdrawActitivy : BaseActivity(), ClockInWithdrawContract.View, ...@@ -85,8 +89,9 @@ class ClockInWithdrawActitivy : BaseActivity(), ClockInWithdrawContract.View,
result?.buttonText?:"", result?.buttonText?:"",
result?.buttonStatus?:0, result?.buttonStatus?:0,
null, null,
4, 8,
null null,
false
) )
} }
} }
......
package com.ym.game.activity package com.ym.game.activity
import android.animation.ObjectAnimator
import android.animation.ValueAnimator
import android.content.DialogInterface import android.content.DialogInterface
import android.text.Html import android.text.Html
import android.view.View import android.view.View
import android.view.animation.AnimationUtils
import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import com.ym.ddcy.R import com.ym.ddcy.R
...@@ -28,17 +31,48 @@ class WelfareActivity : BaseActivity(), WelfareContract.View, ...@@ -28,17 +31,48 @@ class WelfareActivity : BaseActivity(), WelfareContract.View,
private var mDiamonList: MutableList<DiamondEntity> = ArrayList() private var mDiamonList: MutableList<DiamondEntity> = ArrayList()
private var mData: NewsEntity? = null private var mData: NewsEntity? = null
private var mDiamondEntity: DiamondEntity? = null
override fun layoutID(): Int { override fun layoutID(): Int {
return R.layout.activity_welfare return R.layout.activity_welfare
} }
override fun init() { override fun init() {
EventUtils.onEvent("tab_imp","WelfareActivity")
mPresenter = WelfarePresenter(this) mPresenter = WelfarePresenter(this)
iv_welfare_close?.setOnClickListener { iv_welfare_close?.setOnClickListener {
finish() finish()
} }
iv_welfare_reward_box?.setOnClickListener {
EventUtils.onEvent("welfare_task_reward_box_click")
if (mDiamondEntity?.coins != null && mDiamondEntity?.max != null) {
if (mDiamondEntity?.coins!! >= mDiamondEntity?.max!!) {
mPresenter?.getWelfareTaskBox()
} else {
var lack = mDiamondEntity?.max!! - mDiamondEntity?.coins!!
MainDialog?.showWithDraw(
this,
3,
"",
"需要钻石${mDiamondEntity?.max}颗,还差${lack}颗,快去做任务领钻石吧",
"",
0,
null,
0,
null,
true
)
}
}
}
iv_welfare_reward_red_pg?.setOnClickListener {
EventUtils.onEvent("welfare_task_reward_red_package_click")
mPresenter?.getWelfareTaskCash()
}
initAdapter() initAdapter()
request() request()
} }
...@@ -49,13 +83,14 @@ class WelfareActivity : BaseActivity(), WelfareContract.View, ...@@ -49,13 +83,14 @@ class WelfareActivity : BaseActivity(), WelfareContract.View,
} }
private fun initAdapter() { private fun initAdapter() {
diamonAdapter = WelfareDiamondAdapter(this,object :OnRecycleItemClickListener<DiamondEntity> { //钻石列表
override fun onItemClick(view: View, position: Int, data: DiamondEntity) { // diamonAdapter = WelfareDiamondAdapter(this,object :OnRecycleItemClickListener<DiamondEntity> {
mPresenter?.getWelfareTaskBox() // override fun onItemClick(view: View, position: Int, data: DiamondEntity) {
} // mPresenter?.getWelfareTaskBox()
}) // }
recycler_welfare_diamond_reward?.layoutManager = GridLayoutManager(this, 7) // })
recycler_welfare_diamond_reward?.adapter = diamonAdapter // recycler_welfare_diamond_reward?.layoutManager = GridLayoutManager(this, 7)
// recycler_welfare_diamond_reward?.adapter = diamonAdapter
taskAdapter = WelfareTaskAdpater(this, this) taskAdapter = WelfareTaskAdpater(this, this)
recycler_welfare_task.layoutManager = LinearLayoutManager(this) recycler_welfare_task.layoutManager = LinearLayoutManager(this)
...@@ -70,6 +105,7 @@ class WelfareActivity : BaseActivity(), WelfareContract.View, ...@@ -70,6 +105,7 @@ class WelfareActivity : BaseActivity(), WelfareContract.View,
0 -> { 0 -> {
if (data.opentype == NewsEntity.AD_TYPE_SDK) { if (data.opentype == NewsEntity.AD_TYPE_SDK) {
if (data.sid != null) { if (data.sid != null) {
EventUtils.onEvent("welfare_task_undone_click","${data.sid}")
showAd(data.sid) showAd(data.sid)
} }
} else { } else {
...@@ -80,6 +116,7 @@ class WelfareActivity : BaseActivity(), WelfareContract.View, ...@@ -80,6 +116,7 @@ class WelfareActivity : BaseActivity(), WelfareContract.View,
Utils.showToast(this, "已领取") Utils.showToast(this, "已领取")
} }
2 -> { 2 -> {
EventUtils.onEvent("welfare_task_done_click","${data.sid}")
mPresenter?.getTaskReceiveList(data?.sid) mPresenter?.getTaskReceiveList(data?.sid)
} }
} }
...@@ -88,12 +125,42 @@ class WelfareActivity : BaseActivity(), WelfareContract.View, ...@@ -88,12 +125,42 @@ class WelfareActivity : BaseActivity(), WelfareContract.View,
//钻石列表结果 //钻石列表结果
override fun diamondListResult(result: DiamondEntity?) { override fun diamondListResult(result: DiamondEntity?) {
if (result != null) { if (result != null) {
mDiamondEntity = result
mDiamonList.clear() mDiamonList.clear()
tv_welfare_diamond_conut?.text = "集齐${result?.max}颗钻石可获得宝箱奖励" tv_welfare_diamond_progress?.text = "${result?.coins}/${result?.max}"
tv_welfare_diamond_progress?.text = progess_watering_bar?.max = result?.max ?: 10
Html.fromHtml("<font color=\"#FF5A44\">${result?.coins}</font>/${result?.max}") progess_watering_bar?.progress = result?.coins ?: 0
if (result?.display != null && result?.display == 1) {
tv_welfare_diamond_conut?.text = "集齐${result?.max}颗钻石可开宝箱"
iv_welfare_reward_red_pg?.visibility = View.GONE
iv_welfare_reward_box?.visibility = View.VISIBLE
clearAnimation()
if (result?.coins != null && result?.max != null && result?.coins!! >= result?.max!!) {
iv_welfare_reward_box?.setImageResource(R.drawable.icon_welfare_box_open)
val oa: ObjectAnimator = ObjectAnimator.ofFloat(
iv_welfare_reward_box,
View.ROTATION,
0F, 30F, -25F, 0F, 0F, 0F, 0F, 0F, 0F
)
oa.repeatCount = ValueAnimator.INFINITE
oa.setDuration(2000).start()
} else {
iv_welfare_reward_box?.animation =
AnimationUtils.loadAnimation(this, R.anim.scale_anim)
iv_welfare_reward_box?.setImageResource(R.drawable.icon_welfare_box_close)
}
} else {
iv_welfare_reward_red_pg?.visibility = View.VISIBLE
iv_welfare_reward_box?.visibility = View.GONE
tv_welfare_diamond_conut?.text = "集齐${result?.max}颗钻石可提现"
iv_welfare_reward_red_pg?.animation =
AnimationUtils.loadAnimation(this, R.anim.scale_anim)
var i = 0 }
/*var i = 0
while (i < 7) { while (i < 7) {
var data = DiamondEntity() var data = DiamondEntity()
data.coins = result.coins data.coins = result.coins
...@@ -108,7 +175,7 @@ class WelfareActivity : BaseActivity(), WelfareContract.View, ...@@ -108,7 +175,7 @@ class WelfareActivity : BaseActivity(), WelfareContract.View,
} }
diamonAdapter?.clear() diamonAdapter?.clear()
diamonAdapter?.appendToList(mDiamonList) diamonAdapter?.appendToList(mDiamonList)
diamonAdapter?.notifyDataSetChanged() diamonAdapter?.notifyDataSetChanged()*/
} }
} }
...@@ -141,9 +208,9 @@ class WelfareActivity : BaseActivity(), WelfareContract.View, ...@@ -141,9 +208,9 @@ class WelfareActivity : BaseActivity(), WelfareContract.View,
//领取宝箱结果 //领取宝箱结果
override fun taskCashResult(result: List<FlyBoxEntity>?) { override fun taskCashResult(result: List<FlyBoxEntity>?) {
mPresenter?.getDiamondList()
if (result != null && result.isNotEmpty()) { if (result != null && result.isNotEmpty()) {
MainDialog.showWelfareOpenBox(this,result,object :IDialogViewCloseCallback { mPresenter?.getDiamondList()
MainDialog.showWelfareOpenBox(this, result, object : IDialogViewCloseCallback {
override fun onCloseViewSuccess(isSuccess: Boolean) { override fun onCloseViewSuccess(isSuccess: Boolean) {
} }
...@@ -151,8 +218,27 @@ class WelfareActivity : BaseActivity(), WelfareContract.View, ...@@ -151,8 +218,27 @@ class WelfareActivity : BaseActivity(), WelfareContract.View,
} }
} }
fun showAd(sId:Int) { //领红包结果
AdUtils.playRewardAd(this,"welfare_task",object : IAdVideoListener { override fun welfareTaskCashResult(result: ExchangeEntity?) {
if (result != null) {
mPresenter?.getDiamondList()
MainDialog?.showWithDraw(
this,
result?.status ?: 0,
result?.title ?: "",
result?.reason ?: "",
result?.buttonText ?: "",
result?.buttonStatus ?: 0,
null,
7,
null,
true
)
}
}
fun showAd(sId: Int) {
AdUtils.playRewardAd(this, "welfare_task", object : IAdVideoListener {
override fun onAdClose() { override fun onAdClose() {
mPresenter?.getWelfareVideoReport(sId) mPresenter?.getWelfareVideoReport(sId)
} }
...@@ -178,4 +264,14 @@ class WelfareActivity : BaseActivity(), WelfareContract.View, ...@@ -178,4 +264,14 @@ class WelfareActivity : BaseActivity(), WelfareContract.View,
super.onPause() super.onPause()
isPause = true isPause = true
} }
private fun clearAnimation() {
iv_welfare_reward_box?.clearAnimation()
iv_welfare_reward_red_pg?.clearAnimation()
}
override fun onDestroy() {
super.onDestroy()
clearAnimation()
}
} }
\ No newline at end of file
...@@ -108,7 +108,8 @@ class CashExchangeAdapter : ...@@ -108,7 +108,8 @@ class CashExchangeAdapter :
result?.buttonStatus?:0, result?.buttonStatus?:0,
id, id,
type, type,
jine jine,
false
) )
} }
} }
......
...@@ -56,6 +56,7 @@ class ClockInWithdrawAdpater : ...@@ -56,6 +56,7 @@ class ClockInWithdrawAdpater :
Html.fromHtml("可提现${data?.cashStr}元") Html.fromHtml("可提现${data?.cashStr}元")
holder?.tvMoneyRedPg.text = holder?.tvMoneyRedPg.text =
Html.fromHtml("${data?.cashStr}<small><small>元</small></small>") Html.fromHtml("${data?.cashStr}<small><small>元</small></small>")
holder?.tvComplete.text = "${data.desc}"
if (data.type == 1) { if (data.type == 1) {
holder?.layoutTip.visibility = View.VISIBLE holder?.layoutTip.visibility = View.VISIBLE
...@@ -69,7 +70,7 @@ class ClockInWithdrawAdpater : ...@@ -69,7 +70,7 @@ class ClockInWithdrawAdpater :
//普通任务 //普通任务
holder?.tvDayNum?.setTextColor(Color.parseColor("#ED7624")) holder?.tvDayNum?.setTextColor(Color.parseColor("#ED7624"))
holder?.tvAdNum.text = holder?.tvAdNum.text =
Html.fromHtml("<font color=\"#8C856F\"><small>差 </small><</font>${Constant.videoNum}<font color=\"#8C856F\"><small> 个视频完成打卡</small></font>") Html.fromHtml("<font color=\"#8C856F\"><small>${data?.firstDesc} </small><</font>${data?.middleDesc}<font color=\"#8C856F\"><small> ${data?.endDesc}</small></font>")
holder?.tvMoney?.visibility = View.GONE holder?.tvMoney?.visibility = View.GONE
...@@ -153,7 +154,7 @@ class ClockInWithdrawAdpater : ...@@ -153,7 +154,7 @@ class ClockInWithdrawAdpater :
//提现任务 //提现任务
holder?.ivBg?.setImageResource(R.drawable.icon_clock_in_item_yellow_bg) holder?.ivBg?.setImageResource(R.drawable.icon_clock_in_item_yellow_bg)
holder?.tvAdNum.text = holder?.tvAdNum.text =
Html.fromHtml("<font color=\"#8F2C0F\"><small>差 </small></font>${Constant.videoNum}<font color=\"#8F2C0F\"><small> 个视频完成打卡</small></font>") Html.fromHtml("<font color=\"#8F2C0F\"><small>${data.firstDesc} </small></font>${data.middleDesc}<font color=\"#8F2C0F\"><small> ${data.endDesc}</small></font>")
if (data.status == 3 || data.status == 1) { if (data.status == 3 || data.status == 1) {
// 当天任务,未完成打卡 // 当天任务,未完成打卡
...@@ -208,7 +209,7 @@ class ClockInWithdrawAdpater : ...@@ -208,7 +209,7 @@ class ClockInWithdrawAdpater :
} }
3 -> { 3 -> {
holder?.tvAdNum.text = holder?.tvAdNum.text =
Html.fromHtml("<font color=\"#8F2C0F\"><small>差 </small></font>${Constant.videoNum}<font color=\"#8F2C0F\"><small> 个视频完成打卡</small></font>") Html.fromHtml("<font color=\"#8F2C0F\"><small>${data.firstDesc} </small></font>${data.middleDesc}<font color=\"#8F2C0F\"><small> ${data.endDesc}</small></font>")
holder?.tvDayNum?.setTextColor(Color.parseColor("#ffffff")) holder?.tvDayNum?.setTextColor(Color.parseColor("#ffffff"))
holder?.ivRedPgStatus?.setImageResource(R.drawable.icon_clock_in_item_phone) holder?.ivRedPgStatus?.setImageResource(R.drawable.icon_clock_in_item_phone)
holder?.ivBg?.setImageResource(R.drawable.icon_clock_in_item_yellow_bg) holder?.ivBg?.setImageResource(R.drawable.icon_clock_in_item_yellow_bg)
......
...@@ -8,6 +8,7 @@ class WelfareContract { ...@@ -8,6 +8,7 @@ class WelfareContract {
fun taskListResult(result: TaskListEntity?) fun taskListResult(result: TaskListEntity?)
fun taskReceiveListResult(result: TaskCompleteEntity?) fun taskReceiveListResult(result: TaskCompleteEntity?)
fun taskCashResult(result: List<FlyBoxEntity>?) fun taskCashResult(result: List<FlyBoxEntity>?)
fun welfareTaskCashResult(result: ExchangeEntity?)
} }
interface Presenter { interface Presenter {
......
package com.ym.game.presenter package com.ym.game.presenter
import com.tencent.ep.commonbase.api.AppContext
import com.ym.game.contract.WelfareContract import com.ym.game.contract.WelfareContract
import com.ym.library.module.* import com.ym.library.module.*
import com.ym.library.net.BaseObserver import com.ym.library.net.BaseObserver
...@@ -84,4 +85,18 @@ class WelfarePresenter : WelfareContract.Presenter { ...@@ -84,4 +85,18 @@ class WelfarePresenter : WelfareContract.Presenter {
} }
}) })
} }
fun getWelfareTaskCash() {
GameApiClient.gameApi.getWelfareTaskCash().compose(
RxSchedulers.observableIO2Main()
).subscribe(object : BaseObserver<ExchangeEntity>() {
override fun onSuccess(result: ExchangeEntity?) {
mView?.welfareTaskCashResult(result)
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
mView?.welfareTaskCashResult(null)
}
})
}
} }
\ No newline at end of file
...@@ -344,6 +344,7 @@ object MainDialog { ...@@ -344,6 +344,7 @@ object MainDialog {
if (context == null) { if (context == null) {
return return
} }
EventUtils.onEvent("welfare_task_reward_box_show")
val mDialog = Dialog(context, R.style.UpdateVersionCompatDialogTheme) val mDialog = Dialog(context, R.style.UpdateVersionCompatDialogTheme)
val mDialogView = val mDialogView =
showBottomDialog( showBottomDialog(
...@@ -418,7 +419,8 @@ object MainDialog { ...@@ -418,7 +419,8 @@ object MainDialog {
buttonStatus: Int, buttonStatus: Int,
id: Int?, id: Int?,
type: Int?, type: Int?,
jine: Int? jine: Int?,
isWelfarePage:Boolean
) { ) {
if (context == null) { if (context == null) {
...@@ -445,6 +447,10 @@ object MainDialog { ...@@ -445,6 +447,10 @@ object MainDialog {
EventUtils.onEvent("show_xinshou0.3", "新手0.3") EventUtils.onEvent("show_xinshou0.3", "新手0.3")
} else if (type == 4) { } else if (type == 4) {
EventUtils.onEvent("show_fuli0.3", "福利0.3") EventUtils.onEvent("show_fuli0.3", "福利0.3")
} else if (type == 7){
EventUtils.onEvent("welfare_withdraw_success")
} else if (type == 8) {
EventUtils.onEvent("cattendance_withdraw_success")
} else { } else {
if (id != null) { if (id != null) {
when (id) { when (id) {
...@@ -496,7 +502,10 @@ object MainDialog { ...@@ -496,7 +502,10 @@ object MainDialog {
mDialog.dismiss() mDialog.dismiss()
} else { } else {
mDialog.dismiss() mDialog.dismiss()
JumpUtils.h5Jump("每日福利", Constant.Param.WelfareCenter, false, context as Activity) if (!isWelfarePage) {
JumpUtils.jumpWelfareActivity()
}
// JumpUtils.h5Jump("每日福利", Constant.Param.WelfareCenter, false, context as Activity)
} }
} }
......
...@@ -119,12 +119,13 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View, ...@@ -119,12 +119,13 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View,
3 -> dismiss() 3 -> dismiss()
6 -> { 6 -> {
dismiss() dismiss()
JumpUtils.h5Jump( JumpUtils.jumpWelfareActivity()
"每日福利", // JumpUtils.h5Jump(
Constant.Param.WelfareCenter, // "每日福利",
false, // Constant.Param.WelfareCenter,
mContext as Activity // false,
) // mContext as Activity
// )
} }
4 -> { 4 -> {
EventUtils.onEvent("click_receive_coin_task_video_btn", "领金币任务视频") EventUtils.onEvent("click_receive_coin_task_video_btn", "领金币任务视频")
......
...@@ -90,12 +90,13 @@ class SpeedWaterPopupWindow : PopupWindow(), SpeedWaterContract.View, ...@@ -90,12 +90,13 @@ class SpeedWaterPopupWindow : PopupWindow(), SpeedWaterContract.View,
3 -> dismiss() 3 -> dismiss()
6 -> { 6 -> {
dismiss() dismiss()
JumpUtils.h5Jump( JumpUtils.jumpWelfareActivity()
"每日福利", // JumpUtils.h5Jump(
Constant.Param.WelfareCenter, // "每日福利",
false, // Constant.Param.WelfareCenter,
mContext as Activity // false,
) // mContext as Activity
// )
} }
4 -> { 4 -> {
EventUtils.onEvent("click_jiasuji_task_video_btn", "领加速剂任务视频") EventUtils.onEvent("click_jiasuji_task_video_btn", "领加速剂任务视频")
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
<scale xmlns:tools="http://schemas.android.com/tools" <scale xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
tools:ignore="MissingDefaultResource" tools:ignore="MissingDefaultResource"
android:duration="5000" android:duration="1000"
android:pivotX="50%" android:pivotX="50%"
android:pivotY="50%" android:pivotY="50%"
android:fromXScale="0.8" android:fromXScale="1.0"
android:fromYScale="0.8" android:fromYScale="1.0"
android:toXScale="1" android:toXScale="1.4"
android:toYScale="1" android:toYScale="1.4"
android:repeatMode="reverse" android:repeatMode="reverse"
android:repeatCount="infinite"/> android:repeatCount="infinite"/>
\ No newline at end of file
<?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="9dp" />
<!-- <stroke-->
<!-- android:width="1dp"-->
<!-- android:color="#EEEEEE" />-->
<solid android:color="#975423" />
</shape>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<corners android:radius="9dp" />
<gradient
android:angle="0"
android:endColor="#FF5A44"
android:startColor="#FF5A44" />
</shape>
</clip>
</item>
</layer-list>
\ No newline at end of file
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:paddingBottom="11dp" android:paddingBottom="8dp"
android:text="福利中心" android:text="福利中心"
android:textColor="@color/color_333333" android:textColor="@color/color_333333"
android:textSize="20sp" android:textSize="20sp"
...@@ -45,6 +45,11 @@ ...@@ -45,6 +45,11 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<View
android:layout_width="match_parent"
android:layout_height="75dp"
android:background="#FF9E35" />
<ImageView <ImageView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -60,12 +65,93 @@ ...@@ -60,12 +65,93 @@
android:layout_marginBottom="80dp" android:layout_marginBottom="80dp"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <RelativeLayout
android:layout_width="match_parent"
android:layout_height="85dp"
android:layout_marginTop="10dp"
android:background="@drawable/shape_fefce2_r8">
<ImageView
android:id="@+id/iv_welfare_diamond_big"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="14dp"
android:layout_marginRight="8dp"
android:src="@drawable/icon_welfare_diamond_big" />
<LinearLayout
android:id="@+id/layout_welfare_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/iv_welfare_diamond_big"
android:orientation="vertical">
<com.ym.game.wedget.MediumBoldTextView
android:id="@+id/tv_welfare_diamond_conut"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:includeFontPadding="false"
android:text="集齐20颗钻石可获得宝箱"
android:textColor="#975423"
android:textSize="17sp" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ProgressBar
android:id="@+id/progess_watering_bar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="230dp"
android:layout_height="14dp"
android:max="100"
android:progress="30"
android:progressDrawable="@drawable/game_welfare_progress_bg" />
<TextView
android:id="@+id/tv_welfare_diamond_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:includeFontPadding="false"
android:text="3/6"
android:textColor="@color/white"
android:textSize="12sp" />
</RelativeLayout>
</LinearLayout>
<ImageView
android:id="@+id/iv_welfare_reward_box"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="-5.5dp"
android:layout_marginTop="26dp"
android:layout_toRightOf="@+id/layout_welfare_progress"
android:src="@drawable/icon_welfare_box_close" />
<ImageView
android:id="@+id/iv_welfare_reward_red_pg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:layout_toRightOf="@+id/layout_welfare_progress"
android:src="@drawable/icon_welfare_red_pg_big"
android:visibility="gone" />
</RelativeLayout>
<!--<LinearLayout
android:id="@+id/layout_diamond"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="23dp" android:layout_marginTop="23dp"
android:gravity="center_vertical"> android:gravity="center_vertical"
android:visibility="gone">
<TextView <TextView
android:id="@+id/tv_welfare_diamond_conut" android:id="@+id/tv_welfare_diamond_conut"
android:layout_width="0dp" android:layout_width="0dp"
...@@ -95,13 +181,13 @@ ...@@ -95,13 +181,13 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_welfare_diamond_reward" android:id="@+id/recycler_welfare_diamond_reward"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />-->
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_welfare_task" android:id="@+id/recycler_welfare_task"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" /> android:layout_marginTop="16dp" />
</LinearLayout> </LinearLayout>
......
...@@ -30,6 +30,9 @@ public class CustomWebView extends WebView { ...@@ -30,6 +30,9 @@ public class CustomWebView extends WebView {
} }
public static Context getFixedContext(Context context) { public static Context getFixedContext(Context context) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
setWebContentsDebuggingEnabled(true);
}
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
return context.createConfigurationContext(new Configuration()); return context.createConfigurationContext(new Configuration());
} else { } else {
......
...@@ -4,6 +4,7 @@ class ClockInWithdrawEntity { ...@@ -4,6 +4,7 @@ class ClockInWithdrawEntity {
var clockNum: Int? = 0 var clockNum: Int? = 0
var videoNum: Int? = 0 var videoNum: Int? = 0
var title: String? = ""
var list: List<ClockInItemEntity>? = null var list: List<ClockInItemEntity>? = null
var status:Int? = 0 var status:Int? = 0
...@@ -13,16 +14,22 @@ class ClockInWithdrawEntity { ...@@ -13,16 +14,22 @@ class ClockInWithdrawEntity {
var id: Int? = 0//提现id var id: Int? = 0//提现id
var title: String? = ""//打卡标题 var title: String? = ""//打卡标题
var targetNum: Int? = 0//打卡目标数 var targetNum: Int? = 0//打卡目标数
var currentNum: Int? = null//当前打卡数 var currentNum: Int? = 0//当前打卡数
var cash: Int? = null//可提现金额 单位:分 var cash: Int? = 0//可提现金额 单位:分
var cashStr: String? = null//可提现金额 字符串 var cashStr: String? = ""//可提现金额 字符串
var status: Int? = null//红包状态 1 已提现 2 可提现 0 未完成 var status: Int? = 0//红包状态 1 已提现 2 可提现 0 未完成
var desc: String? = null//文案 var desc: String? = ""//文案
var isToday: Int? = 0 //是否是今天 1是 0不是 var isToday: Int? = 0 //是否是今天 1是 0不是
var special: Int? = 1//1 普通打卡 2 提现打卡 3 手机 var special: Int? = 1//1 普通打卡 2 提现打卡 3 手机
var needClockNum = 0 //打卡天数 var needClockNum = 0 //打卡天数
var type: Int? = 0 //是否隔断展示文案 0不展示 1展示 var type: Int? = 0 //是否隔断展示文案 0不展示 1展示
var firstDesc:String? = "" //标题的头文案
var middleDesc:String? = ""//标题的中间文案
var endDesc:String? = ""//标题的尾文案
} }
/** /**
......
...@@ -4,4 +4,5 @@ class DiamondEntity { ...@@ -4,4 +4,5 @@ class DiamondEntity {
var max: Int? = 0 var max: Int? = 0
var coins: Int? = 0 var coins: Int? = 0
var show: Int? = 0 var show: Int? = 0
var display: Int? = 0 //1宝箱 不等于1 红包
} }
\ No newline at end of file
...@@ -296,11 +296,17 @@ interface IGameApi { ...@@ -296,11 +296,17 @@ interface IGameApi {
fun getWelfareVideoReport(@Query("sid") sid: Int): Observable<Response<NewsEntity>> fun getWelfareVideoReport(@Query("sid") sid: Int): Observable<Response<NewsEntity>>
/** /**
* 福利提现 * 福利开宝箱
*/ */
@POST(NetConfig.Game.URL_GAME_WELFARE_TASK_BOX) @POST(NetConfig.Game.URL_GAME_WELFARE_TASK_BOX)
fun getWelfareTaskBox(): Observable<Response<List<FlyBoxEntity>>> fun getWelfareTaskBox(): Observable<Response<List<FlyBoxEntity>>>
/**
* 福利提现
*/
@POST(NetConfig.Game.URL_GAME_WELFARE_TASK_CASH)
fun getWelfareTaskCash(): Observable<Response<ExchangeEntity>>
@GET(NetConfig.Game.URL_COLLECT_CARD) @GET(NetConfig.Game.URL_COLLECT_CARD)
fun getCollectCard(): Observable<Response<PuzzleEntity?>> fun getCollectCard(): Observable<Response<PuzzleEntity?>>
......
...@@ -260,6 +260,7 @@ public class NetConfig { ...@@ -260,6 +260,7 @@ public class NetConfig {
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_WELFARE_TASK_BOX = "app/v1/game/farm/welfare_task_box";//福利中心宝箱领取 public static final String URL_GAME_WELFARE_TASK_BOX = "app/v1/game/farm/welfare_task_box";//福利中心宝箱领取
public static final String URL_GAME_WELFARE_TASK_CASH = "app/v1/game/task_cash";//福利中心红包领取
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";//看广告一键拼图
......
...@@ -8,10 +8,38 @@ ...@@ -8,10 +8,38 @@
android:id="@+id/id_rl_toolbar" android:id="@+id/id_rl_toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="64dp" android:layout_height="64dp"
android:background="#FEFCCB"> android:background="#FF9E35">
<ImageView <ImageView
android:id="@+id/iv_user_toolbar_back" android:id="@+id/iv_user_toolbar_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:paddingBottom="12dp"
android:src="@drawable/arrow_left" />
<TextView
android:id="@+id/tv_user_toolbar_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:paddingBottom="8dp"
android:textColor="@color/color_333333"
android:textSize="20sp"
android:textStyle="bold" />
</RelativeLayout>
<RelativeLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="64dp"
android:background="#FEFCCB">
<ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
...@@ -22,7 +50,6 @@ ...@@ -22,7 +50,6 @@
android:src="@drawable/icon_user_back" /> android:src="@drawable/icon_user_back" />
<TextView <TextView
android:id="@+id/tv_user_toolbar_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment