Commit 12be5d00 authored by 王雪伟's avatar 王雪伟

[提交人]:王雪伟

[提交简述] :幸运农田
[实现方案] :1.0.1
parent e779ca1a
...@@ -265,19 +265,19 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra ...@@ -265,19 +265,19 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra
} }
} }
/** // /**
* 幸运转盘 // * 幸运转盘
*/ // */
fun luckyTurntable() { // fun luckyTurntable() {
this.runOnUiThread(object : Runnable { // this.runOnUiThread(object : Runnable {
override fun run() { // override fun run() {
if (Utils.isFastClick()) { // if (Utils.isFastClick()) {
TurntableDialog.showTurntable(this@GameActivity, this@GameActivity) // TurntableDialog.showTurntable(this@GameActivity, this@GameActivity)
} // }
} // }
}) // })
//
} // }
/** /**
* 领金币 * 领金币
...@@ -322,60 +322,6 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra ...@@ -322,60 +322,6 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra
}) })
} }
/**
* 点击底部拆红包看视频
*/
var flyBoxIsClick2 = true
fun adRedPackPlan() {
if (flyBoxIsClick2) {
flyBoxIsClick2 = false
AdUtils.playRewardAd(this, "bottom_open_red_envelope_click", object : IAdVideoListener {
override fun onAdClose() {
flyBoxIsClick2 = true
getRedPackPlanReceive();
}
override fun onError(errorMsg: String?) {
flyBoxIsClick2 = true
}
})
}
}
fun getRedPackPlanReceive() {
GameApiClient.gameApi.getOpenPlantBox()
.compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<FlyBoxEntity>() {
override fun onSuccess(result: FlyBoxEntity?) {
Log.d("wxw", "底部拆红包" + Utils.obj2Str(result))
if (result != null) {
var type = result.type
if (type != null) {
MainDialog.showopenBox(
this@GameActivity, type,
"拆红包",
result.awardNum ?: 0,
result,
this@GameActivity
)
}
}
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
Log.d("wxw", "底部拆红包 error")
}
})
}
fun GameEvent(keyName: String, valueName: String) { fun GameEvent(keyName: String, valueName: String) {
EventUtils.onEvent(keyName, valueName); EventUtils.onEvent(keyName, valueName);
} }
...@@ -383,6 +329,8 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra ...@@ -383,6 +329,8 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra
override fun onCloseViewSuccess(isSuccess: Boolean) { override fun onCloseViewSuccess(isSuccess: Boolean) {
//关闭view //关闭view
Log.e("MXL", "CLOSE") Log.e("MXL", "CLOSE")
getHomeInfo()
getOrderList()
// callUnity("TitleView", "getHomeInfo", "") // callUnity("TitleView", "getHomeInfo", "")
// callUnity("GameManager", "getCardList", "") // callUnity("GameManager", "getCardList", "")
} }
...@@ -420,6 +368,7 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra ...@@ -420,6 +368,7 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra
result?.title ?: "", result?.title ?: "",
result?.reason ?: "", result?.reason ?: "",
result?.buttonText ?: "", result?.buttonText ?: "",
result?.cashText ?: "",
result?.buttonStatus ?: 0, result?.buttonStatus ?: 0,
id, id,
result?.type, result?.type,
...@@ -437,45 +386,6 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra ...@@ -437,45 +386,6 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra
}) })
} }
fun showCloudDialog(speedtime: Int, sppedtimes: Int) {
MainLooper.get()?.post(Runnable {
// CashExchangeDialog.showCashExchage(this, this)
MainDialog.showDialogCloud(this, speedtime, sppedtimes, View.OnClickListener {
AdUtils.playRewardAd(
this@GameActivity,
"cloud_acceleration_click",
object : IAdVideoListener {
override fun onAdClose() {
GameApiClient.gameApi.getCloudSpeed()
.compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<StatusEntity>() {
override fun onSuccess(result: StatusEntity?) {
Log.d("wxw", "云朵加速" + Utils.obj2Str(result))
// callback?.onCloudSpeedSuccess(true, Utils.obj2Str(result))
callUnity("Form_land", "showCloudSpeedAnim", "")
getListLandNew(2)
}
override fun onFailure(
e: Throwable?,
code: String?,
errorMsg: String?
) {
Log.d("wxw", "云朵加速 error")
//callback?.onCloudSpeedSuccess(false, errorMsg + "")
}
})
}
override fun onError(errorMsg: String?) {
}
})
})
})
}
//展示仓库弹窗 //展示仓库弹窗
fun showWareHouseDialog() { fun showWareHouseDialog() {
MainLooper.get()?.post(Runnable { MainLooper.get()?.post(Runnable {
...@@ -501,6 +411,7 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra ...@@ -501,6 +411,7 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra
* 点击飞行宝箱看视频 1 花仙 2 宝箱 * 点击飞行宝箱看视频 1 花仙 2 宝箱
*/ */
fun clickOpenBox(type:Int) { fun clickOpenBox(type:Int) {
mPresenter?.getFlyBox(type) mPresenter?.getFlyBox(type)
} }
...@@ -549,8 +460,8 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra ...@@ -549,8 +460,8 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra
mPresenter?.getCleanBug(landId) mPresenter?.getCleanBug(landId)
} }
fun getRewardFruit(landId: Int) { fun getRewardFruit(landId: Int, plantId: Int) {
mPresenter?.getRewardLand(landId) mPresenter?.getRewardLand(landId,plantId)
} }
fun getPlantFruit(landId: Int, plantId: Int) { fun getPlantFruit(landId: Int, plantId: Int) {
...@@ -595,35 +506,28 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra ...@@ -595,35 +506,28 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra
} }
override fun gameCleanBugResult(result: String) { override fun gameCleanBugResult(result: String) {
Log.d("wxw", "gameCleanBugResult" + result)
callUnity("LandList", "OnCleanBugSuccess", result) callUnity("LandList", "OnCleanBugSuccess", result)
} }
override fun gameRewardLandResult(result: String) { override fun gameRewardLandResult(result: String) {
Log.d("wxw", "gameRewardLandResult" + result)
callUnity("LandList", "OnRewardSuccess", result) callUnity("LandList", "OnRewardSuccess", result)
getOrderList() getOrderList()
} }
override fun gamePlantLandResult(result: String) { override fun gamePlantLandResult(result: String) {
Log.d("wxw", "gamePlantLandResult" + result)
callUnity("LandList", "OnPlantSuccess", result) callUnity("LandList", "OnPlantSuccess", result)
} }
override fun gameLockLandResult(result: String) { override fun gameLockLandResult(result: String) {
Log.d("wxw", "gameLockLandResult" + result)
// callUnity("LandList", "OnLockLandSuccess", result)
getListLandNew(2); getListLandNew(2);
} }
override fun gameUseAcceleratorsResult(result: String) { override fun gameUseAcceleratorsResult(result: String) {
Log.d("wxw", "gameUseAcceleratorsResult" + result)
callUnity("LandList", "OnUseWaterSuccess", result) callUnity("LandList", "OnUseWaterSuccess", result)
getHomeInfo() getHomeInfo()
} }
override fun gameUseFertilizeResult(result: String) { override fun gameUseFertilizeResult(result: String) {
Log.d("wxw", "gameUseFertilizeResult" + result)
callUnity("LandList", "OnUseFoodSuccess","") callUnity("LandList", "OnUseFoodSuccess","")
callUnity("LandList", "ResetGameData", result) callUnity("LandList", "ResetGameData", result)
getHomeInfo() getHomeInfo()
...@@ -635,7 +539,6 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra ...@@ -635,7 +539,6 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra
config?.gameValue?.rewardAcceleratorsByVideo!!, config?.gameValue?.rewardAcceleratorsByVideo!!,
playNum, playNum,
View.OnClickListener { View.OnClickListener {
// callUnity("Form_land", "onVideoAcceleratorReceive", "")
AdUtils.playRewardAd(act,"ACCELERATORS_REWARD",object :IAdVideoListener{ AdUtils.playRewardAd(act,"ACCELERATORS_REWARD",object :IAdVideoListener{
override fun onAdClose() { override fun onAdClose() {
mPresenter?.videoByAccelerator(landId) mPresenter?.videoByAccelerator(landId)
...@@ -653,10 +556,8 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra ...@@ -653,10 +556,8 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra
config?.gameValue?.rewardClearBugByVideo!!, config?.gameValue?.rewardClearBugByVideo!!,
playNum, playNum,
View.OnClickListener { View.OnClickListener {
// callUnity("Form_land", "onVideoAcceleratorReceive", "")
AdUtils.playRewardAd(act,"CLEAR_BUG_REWARD",object :IAdVideoListener{ AdUtils.playRewardAd(act,"CLEAR_BUG_REWARD",object :IAdVideoListener{
override fun onAdClose() { override fun onAdClose() {
// callUnity("Form_land", "onVideoAcceleratorReceive", "")
mPresenter?.videoByCleanBug(landId) mPresenter?.videoByCleanBug(landId)
} }
...@@ -667,28 +568,27 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra ...@@ -667,28 +568,27 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback, GameContra
} }
override fun gameCurrentOrderResult(result: String) { override fun gameCurrentOrderResult(result: String) {
Log.d("wxw", "gameCurrentOrderResult" + result)
callUnity("Order", "SetOrderListData", result) callUnity("Order", "SetOrderListData", result)
} }
override fun gameFlyBoxResult(result: FlyBoxEntity) { // override fun gameFlyBoxResult(result: FlyBoxEntity) {
MainLooper.get()?.post(Runnable { // MainLooper.get()?.post(Runnable {
MainDialog.showGetBox(this, 1, View.OnClickListener { // MainDialog.showGetBox(this, 1, View.OnClickListener {
// if (flyBoxIsClick) { //// if (flyBoxIsClick) {
// flyBoxIsClick = false //// flyBoxIsClick = false
// AdUtils.playRewardAd(this, "box_click", object : IAdVideoListener { //// AdUtils.playRewardAd(this, "box_click", object : IAdVideoListener {
// override fun onAdClose() { //// override fun onAdClose() {
// flyBoxIsClick = true //// flyBoxIsClick = true
// getFlyBoxReceive() //// getFlyBoxReceive()
// } //// }
// ////
// override fun onError(errorMsg: String?) { //// override fun onError(errorMsg: String?) {
// flyBoxIsClick = true //// flyBoxIsClick = true
// } //// }
// }) //// })
// } //// }
// Utils.showToast(AppliContext.get(), "今日次数已用完,明天再来吧~") //// Utils.showToast(AppliContext.get(), "今日次数已用完,明天再来吧~")
}) // })
}) // })
} // }
} }
\ No newline at end of file
...@@ -31,7 +31,7 @@ class ClockInWithdrawActitivy : MyBaseActivity(), ClockInWithdrawContract.View, ...@@ -31,7 +31,7 @@ class ClockInWithdrawActitivy : MyBaseActivity(), ClockInWithdrawContract.View,
} }
override fun init() { override fun init() {
EventUtils.onEvent("daka_show") EventUtils.onEvent("checkin_show")
mPresenter = ClockInWithdrawPresenter(this) mPresenter = ClockInWithdrawPresenter(this)
iv_clock_in_close?.setOnClickListener { iv_clock_in_close?.setOnClickListener {
finish() finish()
...@@ -55,19 +55,21 @@ class ClockInWithdrawActitivy : MyBaseActivity(), ClockInWithdrawContract.View, ...@@ -55,19 +55,21 @@ class ClockInWithdrawActitivy : MyBaseActivity(), ClockInWithdrawContract.View,
mData = data mData = data
if (!isClick) { if (!isClick) {
isClick = true isClick = true
if (data.special == 1) { EventUtils.onEvent("checkin_cashout_click")
EventUtils.onEvent("daka_hongbao_click") mPresenter?.getDoWd(data.id!!)
mPresenter?.getFlyBoxReceive(this) // if (data.special == 1) {
} else if (data.special == 2) { //// EventUtils.onEvent("daka_hongbao_click")
EventUtils.onEvent("daka_tixian_click") // mPresenter?.getFlyBoxReceive(this)
mPresenter?.getDoWd(data.id!!) // } else if (data.special == 2) {
} //// EventUtils.onEvent("daka_tixian_click")
// EventUtils.onEvent("checkin_cashout_click")
// mPresenter?.getDoWd(data.id!!)
// }
view?.postDelayed({ view?.postDelayed({
isClick = false isClick = false
},1000) }, 1000)
} }
} }
//任务列表结果 //任务列表结果
...@@ -82,6 +84,7 @@ class ClockInWithdrawActitivy : MyBaseActivity(), ClockInWithdrawContract.View, ...@@ -82,6 +84,7 @@ class ClockInWithdrawActitivy : MyBaseActivity(), ClockInWithdrawContract.View,
tv_clock_in_info?.text = "${result?.todayTitle}" tv_clock_in_info?.text = "${result?.todayTitle}"
mAdapter?.clear() mAdapter?.clear()
mAdapter?.SetCurrentNum(result?.clockNum)
mAdapter?.appendToList(result?.clockData) mAdapter?.appendToList(result?.clockData)
mAdapter?.notifyDataSetChanged() mAdapter?.notifyDataSetChanged()
} }
...@@ -93,11 +96,12 @@ class ClockInWithdrawActitivy : MyBaseActivity(), ClockInWithdrawContract.View, ...@@ -93,11 +96,12 @@ class ClockInWithdrawActitivy : MyBaseActivity(), ClockInWithdrawContract.View,
if (result != null) { if (result != null) {
MainDialog?.showWithDraw( MainDialog?.showWithDraw(
this, this,
result?.status?:0, result?.status ?: 0,
result?.title?:"", result?.title ?: "",
result?.reason?:"", result?.reason ?: "",
result?.buttonText?:"", result?.buttonText ?: "",
result?.buttonStatus?:0, result?.cashText ?: "",
result?.buttonStatus ?: 0,
null, null,
8, 8,
null, null,
......
...@@ -24,7 +24,7 @@ class SettingActivity : MyBaseActivity() { ...@@ -24,7 +24,7 @@ class SettingActivity : MyBaseActivity() {
} }
override fun init() { override fun init() {
EventUtils.onEvent("setting_on", "设置页面曝光") EventUtils.onEvent("settings_show", "设置页面曝光")
if (SettingPreference.getUserInfoData() != null) { if (SettingPreference.getUserInfoData() != null) {
id_tv_id.text = "ID: ${SettingPreference.getUserInfoData().uid}" id_tv_id.text = "ID: ${SettingPreference.getUserInfoData().uid}"
} }
...@@ -56,6 +56,7 @@ class SettingActivity : MyBaseActivity() { ...@@ -56,6 +56,7 @@ class SettingActivity : MyBaseActivity() {
// tv_user_toolbar_title.text = "设置" // tv_user_toolbar_title.text = "设置"
//提现记录 //提现记录
ll_setting_withdraw_record.setOnClickListener { ll_setting_withdraw_record.setOnClickListener {
EventUtils.onEvent("cashout_record_click", "提现记录入口点击")
JumpUtils.jumpWithdrawalsRecordActivity() JumpUtils.jumpWithdrawalsRecordActivity()
} }
//用户协议 //用户协议
......
...@@ -344,6 +344,7 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener, ...@@ -344,6 +344,7 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener,
result?.title?:"", result?.title?:"",
result?.reason?:"", result?.reason?:"",
result?.buttonText?:"", result?.buttonText?:"",
result?.cashText ?: "",
result?.buttonStatus?:0, result?.buttonStatus?:0,
result.id, result.id,
result. type, result. type,
......
...@@ -57,6 +57,7 @@ class WelfareActivity : MyBaseActivity(), WelfareContract.View, ...@@ -57,6 +57,7 @@ class WelfareActivity : MyBaseActivity(), WelfareContract.View,
"", "",
"需要钻石${mDiamondEntity?.max}颗,还差${lack}颗,快去做任务领钻石吧", "需要钻石${mDiamondEntity?.max}颗,还差${lack}颗,快去做任务领钻石吧",
"", "",
"",
0, 0,
null, null,
0, 0,
...@@ -245,6 +246,7 @@ class WelfareActivity : MyBaseActivity(), WelfareContract.View, ...@@ -245,6 +246,7 @@ class WelfareActivity : MyBaseActivity(), WelfareContract.View,
result?.title ?: "", result?.title ?: "",
result?.reason ?: "", result?.reason ?: "",
result?.buttonText ?: "", result?.buttonText ?: "",
result?.cashText ?: "",
result?.buttonStatus ?: 0, result?.buttonStatus ?: 0,
null, null,
7, 7,
......
...@@ -7,6 +7,7 @@ import com.ym.xynt.R ...@@ -7,6 +7,7 @@ import com.ym.xynt.R
import com.ym.game.adapter.WithdrawalsRecordAdapter import com.ym.game.adapter.WithdrawalsRecordAdapter
import com.ym.library.module.WithdrawEntity import com.ym.library.module.WithdrawEntity
import com.ym.library.net.MyBaseActivity import com.ym.library.net.MyBaseActivity
import com.ym.library.utils.EventUtils
import com.ym.library.utils.StatusBarUtil import com.ym.library.utils.StatusBarUtil
import com.ym.userinfo.module.contract.WithdrawalsRecordContract import com.ym.userinfo.module.contract.WithdrawalsRecordContract
import com.ym.userinfo.module.presenter.WithdrawalsRecordPresenter import com.ym.userinfo.module.presenter.WithdrawalsRecordPresenter
...@@ -29,7 +30,7 @@ class WithdrawalsRecordActivity : MyBaseActivity(), WithdrawalsRecordContract.Vi ...@@ -29,7 +30,7 @@ class WithdrawalsRecordActivity : MyBaseActivity(), WithdrawalsRecordContract.Vi
override fun init() { override fun init() {
mPresenter = WithdrawalsRecordPresenter(this) mPresenter = WithdrawalsRecordPresenter(this)
mPresenter?.requestWithdrawalsRecord() mPresenter?.requestWithdrawalsRecord()
EventUtils.onEvent("cashout_record_show")
// tv_user_toolbar_title.text = "提现记录" // tv_user_toolbar_title.text = "提现记录"
// iv_user_toolbar_back.setOnClickListener { finish() } // iv_user_toolbar_back.setOnClickListener { finish() }
iv_welfare_close.setOnClickListener { iv_welfare_close.setOnClickListener {
......
...@@ -22,10 +22,6 @@ class WxLoginActivity : MyBaseActivity(), WxImplUtils.IWxLoginCallback { ...@@ -22,10 +22,6 @@ class WxLoginActivity : MyBaseActivity(), WxImplUtils.IWxLoginCallback {
} }
override fun init() { override fun init() {
// startActivity(
// Intent(this@WxLoginActivity, GameActivity::class.java)
// )
// finish()
onEvent("login_show", "登录页") onEvent("login_show", "登录页")
if (SettingPreference.getIsShowGuide()) { if (SettingPreference.getIsShowGuide()) {
SettingPreference.setIsShowGuide(false) SettingPreference.setIsShowGuide(false)
......
...@@ -3,12 +3,14 @@ import android.app.Dialog ...@@ -3,12 +3,14 @@ import android.app.Dialog
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.ImageView
import android.widget.LinearLayout import android.widget.LinearLayout
import android.widget.TextView import android.widget.TextView
import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.ym.game.view.MainDialog import com.ym.game.view.MainDialog
import com.ym.game.view.MainDialog.addClickScale
import com.ym.library.module.ExchangeEntity import com.ym.library.module.ExchangeEntity
import com.ym.library.module.GameDuiHuanShopEntity import com.ym.library.module.GameDuiHuanShopEntity
import com.ym.library.net.BaseObserver import com.ym.library.net.BaseObserver
...@@ -16,6 +18,8 @@ import com.ym.library.net.GameApiClient ...@@ -16,6 +18,8 @@ import com.ym.library.net.GameApiClient
import com.ym.library.net.RxSchedulers import com.ym.library.net.RxSchedulers
import com.ym.library.rxbus.RxBusConstant import com.ym.library.rxbus.RxBusConstant
import com.ym.library.rxbus.RxBusUtil import com.ym.library.rxbus.RxBusUtil
import com.ym.library.utils.EventUtils
import com.ym.library.utils.FilterUtils
import com.ym.library.utils.Utils import com.ym.library.utils.Utils
import com.ym.modulecommon.base.BaseRecyclerAdapter import com.ym.modulecommon.base.BaseRecyclerAdapter
import com.ym.modulecommon.base.NoDoubleClickListener import com.ym.modulecommon.base.NoDoubleClickListener
...@@ -44,10 +48,18 @@ class AllOrderAdapter : BaseRecyclerAdapter<GameDuiHuanShopEntity, RecyclerView. ...@@ -44,10 +48,18 @@ class AllOrderAdapter : BaseRecyclerAdapter<GameDuiHuanShopEntity, RecyclerView.
mAdapter?.appendToList(order?.needPlantList) mAdapter?.appendToList(order?.needPlantList)
holder?.itemView?.item_recycler_fruit_list?.adapter = mAdapter holder?.itemView?.item_recycler_fruit_list?.adapter = mAdapter
if(order.wdCount>0){
holder.itemView.cash_item_duihuan_img.setImageResource(R.drawable.game_shop_btn_un_duihuan)
}else{
holder.itemView.cash_item_duihuan_img.setImageResource(R.drawable.game_shop_btn_duihuan)
}
// holder.itemView.item_click_duihuan?.addClickScale() holder.itemView.item_click_duihuan?.addClickScale()
// FilterUtils.addClickAlpha(holder.itemView.item_click_duihuan)
// FilterUtils.addClickAlpha(holder.itemView.cash_item_duihuan_img)
holder.itemView.item_click_duihuan?.setOnClickListener(object : NoDoubleClickListener() { holder.itemView.item_click_duihuan?.setOnClickListener(object : NoDoubleClickListener() {
override fun onNoDoubleClick(view: View?) { override fun onNoDoubleClick(view: View?) {
EventUtils.onEvent("exchange_btn_click", "售卖果实弹窗兑换按钮点击")
duihuan(order.id, order.type!!, order.cashStr) duihuan(order.id, order.type!!, order.cashStr)
} }
}) })
...@@ -69,11 +81,13 @@ class AllOrderAdapter : BaseRecyclerAdapter<GameDuiHuanShopEntity, RecyclerView. ...@@ -69,11 +81,13 @@ class AllOrderAdapter : BaseRecyclerAdapter<GameDuiHuanShopEntity, RecyclerView.
var item_list: RecyclerView? var item_list: RecyclerView?
var item_duihuan: LinearLayout? var item_duihuan: LinearLayout?
var item_money_tv: TextView? var item_money_tv: TextView?
var img_duihuan: ImageView?
init { init {
item_list = itemView.findViewById<RecyclerView>(R.id.item_recycler_fruit_list) item_list = itemView.findViewById<RecyclerView>(R.id.item_recycler_fruit_list)
item_duihuan = itemView.findViewById<LinearLayout>(R.id.item_click_duihuan) item_duihuan = itemView.findViewById<LinearLayout>(R.id.item_click_duihuan)
item_money_tv = itemView.findViewById<TextView>(R.id.cash_item_money_tv) item_money_tv = itemView.findViewById<TextView>(R.id.cash_item_money_tv)
img_duihuan = itemView.findViewById<ImageView>(R.id.cash_item_duihuan_img)
// val linearLayoutManager: LinearLayoutManager = object : LinearLayoutManager(activity) { // val linearLayoutManager: LinearLayoutManager = object : LinearLayoutManager(activity) {
// override fun canScrollVertically(): Boolean { // override fun canScrollVertically(): Boolean {
...@@ -106,8 +120,8 @@ class AllOrderAdapter : BaseRecyclerAdapter<GameDuiHuanShopEntity, RecyclerView. ...@@ -106,8 +120,8 @@ class AllOrderAdapter : BaseRecyclerAdapter<GameDuiHuanShopEntity, RecyclerView.
result?.status ?: 0, result?.status ?: 0,
result?.title ?: "", result?.title ?: "",
result?.reason ?: "", result?.reason ?: "",
// result?.buttonText ?: "", result?.buttonText ?: "",
result?.CashText ?: "", result?.cashText ?: "",
result?.buttonStatus ?: 0, result?.buttonStatus ?: 0,
id, id,
type, type,
......
...@@ -127,6 +127,7 @@ class CashExchangeAdapter : ...@@ -127,6 +127,7 @@ class CashExchangeAdapter :
result?.title ?: "", result?.title ?: "",
result?.reason ?: "", result?.reason ?: "",
result?.buttonText ?: "", result?.buttonText ?: "",
result?.cashText ?: "",
result?.buttonStatus ?: 0, result?.buttonStatus ?: 0,
id, id,
type, type,
......
...@@ -23,6 +23,7 @@ import com.ym.library.utils.Utils ...@@ -23,6 +23,7 @@ import com.ym.library.utils.Utils
class ClockInWithdrawAdpater : class ClockInWithdrawAdpater :
BaseRecyclerAdapter<ClockInWithdrawEntity.ClockInItemEntity, RecyclerView.ViewHolder> { BaseRecyclerAdapter<ClockInWithdrawEntity.ClockInItemEntity, RecyclerView.ViewHolder> {
private var currentNum:Int?=0;
private var mContext: Activity? = null private var mContext: Activity? = null
private val listener: OnRecycleItemClickListener<ClockInWithdrawEntity.ClockInItemEntity> private val listener: OnRecycleItemClickListener<ClockInWithdrawEntity.ClockInItemEntity>
...@@ -34,6 +35,9 @@ class ClockInWithdrawAdpater : ...@@ -34,6 +35,9 @@ class ClockInWithdrawAdpater :
mContext = content mContext = content
} }
fun SetCurrentNum(num:Int?){
currentNum = num;
}
override fun getItemCount(): Int { override fun getItemCount(): Int {
return mList.size return mList.size
} }
...@@ -53,29 +57,41 @@ class ClockInWithdrawAdpater : ...@@ -53,29 +57,41 @@ class ClockInWithdrawAdpater :
holder.item_title.text = Html.fromHtml(data.title) holder.item_title.text = Html.fromHtml(data.title)
holder.item_desc.text = Html.fromHtml(data.endDesc) holder.item_desc.text = Html.fromHtml(data.endDesc)
holder.item_cash_tv.text = data.cashStr + "元"; holder.item_cash_tv.text = data.cashStr + "元";
holder.item_progress_tv.text = "${data.currentNum}/${data.targetNum}" holder.item_progress_tv.text = "${currentNum}/${data.needClockNum}"
holder?.item_progress_bar.max = data?.targetNum ?: 10 holder?.item_progress_bar.max = data?.needClockNum ?: 10
holder?.item_progress_bar.progress = data?.currentNum ?: 0 holder?.item_progress_bar.progress = currentNum ?: 0
if (data?.status == 2) { if (data?.status == 1) {
holder.item_redpack_img.setImageResource(R.mipmap.clock_in_red_pack)
} else {
holder.item_redpack_img.setImageResource(R.mipmap.clock_in_gray_red_pack) holder.item_redpack_img.setImageResource(R.mipmap.clock_in_gray_red_pack)
} else {
holder.item_redpack_img.setImageResource(R.mipmap.clock_in_red_pack)
} }
//红包状态 1 已提现 2 可提现 0 未完成
holder?.item.setOnClickListener { holder?.item.setOnClickListener{
if (data?.status == 3 || data?.status == 4) { listener?.onItemClick(it, position, mList[position])
if (data?.special == 1) { // if (data?.status == 1){
Utils.showToast(mContext, "完成打卡可领取奖励") // Utils.showToast(mContext, "已领取")
} else if (data?.special == 2) { // }
Utils.showToast(mContext, "完成打卡可提现") // if (data?.status == 2 ){
} // listener?.onItemClick(it, position, mList[position])
} else if (data.status == 6 || data.status == 2) { // }
Utils.showToast(mContext, "已领取") // if (data?.status == 0 ){
} // Utils.showToast(mContext, "完成打卡可提现")
if (data.status == 1 || data?.status == 8) { // }
listener?.onItemClick(it, position, mList[position])
}
} }
// holder?.item.setOnClickListener {
// if (data?.status == 3 || data?.status == 4) {
// if (data?.special == 1) {
// Utils.showToast(mContext, "完成打卡可领取奖励")
// } else if (data?.special == 2) {
// Utils.showToast(mContext, "完成打卡可提现")
// }
// } else if (data.status == 6 || data.status == 2) {
// Utils.showToast(mContext, "已领取")
// }
// if (data.status == 1 || data?.status == 8) {
// listener?.onItemClick(it, position, mList[position])
// }
// }
// holder?.layoutRedPg?.setOnClickListener { // holder?.layoutRedPg?.setOnClickListener {
// if (data.status == 1 || data?.status == 8) { // if (data.status == 1 || data?.status == 8) {
......
...@@ -3,27 +3,34 @@ package com.ym.game.adapter ...@@ -3,27 +3,34 @@ package com.ym.game.adapter
import android.animation.ObjectAnimator import android.animation.ObjectAnimator
import android.animation.ValueAnimator import android.animation.ValueAnimator
import android.app.Activity import android.app.Activity
import android.os.CountDownTimer
import android.text.Html import android.text.Html
import android.text.TextUtils import android.text.TextUtils
import android.util.Log import android.view.LayoutInflater
import android.view.* import android.view.MotionEvent
import android.view.View
import android.view.ViewGroup
import android.widget.* import android.widget.*
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.ym.library.listener.OnRecycleItemClickListener import com.ym.game.presenter.WateringRewardPresenter
import com.ym.game.view.MainDialog import com.ym.game.view.MainDialog
import com.ym.library.base.BaseRecyclerAdapter import com.ym.library.base.BaseRecyclerAdapter
import com.ym.library.listener.OnRecycleItemClickListener
import com.ym.library.module.NewsEntity
import com.ym.library.module.TaskCompleteEntity
import com.ym.library.net.BaseObserver import com.ym.library.net.BaseObserver
import com.ym.library.net.GameApiClient
import com.ym.library.net.RxSchedulers import com.ym.library.net.RxSchedulers
import com.ym.library.rxbus.RxBusConstant import com.ym.library.rxbus.RxBusConstant
import com.ym.library.rxbus.RxBusUtil import com.ym.library.rxbus.RxBusUtil
import com.ym.library.utils.EventUtils
import com.ym.library.utils.LogUtils import com.ym.library.utils.LogUtils
import com.ym.library.utils.Utils import com.ym.library.utils.Utils
import com.ym.xynt.R import com.ym.xynt.R
import com.ym.library.module.NewsEntity import org.apache.poi.hslf.model.Line
import com.ym.library.module.TaskCompleteEntity import java.text.SimpleDateFormat
import com.ym.library.module.WateringTaskEntity import java.util.*
import com.ym.library.net.GameApiClient import kotlin.collections.ArrayList
import com.ym.library.utils.EventUtils
/** /**
*Craeted by ${junqi.li} *Craeted by ${junqi.li}
...@@ -36,7 +43,6 @@ class WateringTaskAdpater : ...@@ -36,7 +43,6 @@ class WateringTaskAdpater :
private var mContext: Activity? = null private var mContext: Activity? = null
private val listener: OnRecycleItemClickListener<NewsEntity> private val listener: OnRecycleItemClickListener<NewsEntity>
private var isClick = false private var isClick = false
constructor( constructor(
content: Activity?, content: Activity?,
type: Int, type: Int,
...@@ -115,15 +121,14 @@ class WateringTaskAdpater : ...@@ -115,15 +121,14 @@ class WateringTaskAdpater :
// holder.btnProgess.setProgress(data.current_nums!!) // holder.btnProgess.setProgress(data.current_nums!!)
// holder.tvProgess.text = "${data.current_nums}/${data.awardLimit}" // holder.tvProgess.text = "${data.current_nums}/${data.awardLimit}"
// } // }
holder.ivStatus.addClickScale() holder.ivStatus.addClickScale()
holder.ivStatus.setOnClickListener { holder.ivStatus.setOnClickListener {
if (!isClick) { if (!isClick) {
isClick = true isClick = true
listener.onItemClick(it, position, mList[position])
when (data.status) { when (data.status) {
0 -> { 0 -> {
EventUtils.onEvent("renwu_go_click_" + mList[position].sid, "金币任务去完成点击") // EventUtils.onEvent("renwu_go_click_" + mList[position].sid, "金币任务去完成点击")
listener.onItemClick(it, position, mList[position])
} }
1 -> { 1 -> {
...@@ -131,13 +136,13 @@ class WateringTaskAdpater : ...@@ -131,13 +136,13 @@ class WateringTaskAdpater :
} }
//领取 //领取
2 -> { 2 -> {
if (mList[position].opentype == 1) { // if (mList[position].opentype == 1) {
EventUtils.onEvent("renwu_done_click_total") // EventUtils.onEvent("renwu_done_click_total")
} // }
EventUtils.onEvent( // EventUtils.onEvent(
"renwu_done_click_" + mList[position].sid, // "renwu_done_click_" + mList[position].sid,
"金币任务领取点击" // "金币任务领取点击"
) // )
getDripTaskReceive(type, data.sid!!) getDripTaskReceive(type, data.sid!!)
} }
} }
...@@ -148,17 +153,37 @@ class WateringTaskAdpater : ...@@ -148,17 +153,37 @@ class WateringTaskAdpater :
} }
} }
// 0未完成 1已领取 2可领取
when (data.status) { holder.ivStatus.visibility = View.VISIBLE
0 -> { holder.timer.visibility = View.GONE
holder.ivStatus.setImageResource(R.mipmap.icon_mian_popup_complete) if (data.sid == 2565) {
if (data.opentype == 1) { if (data.status == 0) {
holder.ivStatus.setImageResource(R.mipmap.icon_main_popup_receive) holder.ivStatus.setImageResource(R.mipmap.icon_main_popup_receive)
} else {
if (data.countdownSecond == 0) {
holder.ivStatus.setImageResource(R.mipmap.icon_main_popup_receiveed)
} else {
holder.ivStatus.visibility = View.GONE
holder.timer.visibility = View.VISIBLE
holder.ivStatus.setImageResource(R.mipmap.icon_mian_popup_complete)
if (data.countdownSecond != null && data.countdownSecond!! > 0) {
setTimer(data.countdownSecond!!, holder.timer)
}
} }
} }
1 -> holder.ivStatus.setImageResource(R.mipmap.icon_main_popup_receiveed) } else {
2 -> holder.ivStatus.setImageResource(R.mipmap.icon_main_popup_receive) // 0未完成 1已领取 2可领取
when (data.status) {
0 -> {
holder.ivStatus.setImageResource(R.mipmap.icon_mian_popup_complete)
if (data.opentype == 1) {
holder.ivStatus.setImageResource(R.mipmap.icon_main_popup_receive)
}
}
1 -> holder.ivStatus.setImageResource(R.mipmap.icon_main_popup_receiveed)
2 -> holder.ivStatus.setImageResource(R.mipmap.icon_main_popup_receive)
}
} }
val layoutParams = RelativeLayout.LayoutParams( val layoutParams = RelativeLayout.LayoutParams(
...@@ -194,7 +219,7 @@ class WateringTaskAdpater : ...@@ -194,7 +219,7 @@ class WateringTaskAdpater :
val llprogesbg: RelativeLayout = itemView.findViewById(R.id.layout_watering_progress) val llprogesbg: RelativeLayout = itemView.findViewById(R.id.layout_watering_progress)
val rlbg: RelativeLayout = itemView.findViewById(R.id.ll_one) val rlbg: RelativeLayout = itemView.findViewById(R.id.ll_one)
val imglucky: TextView = itemView.findViewById(R.id.id_img_lucy) val imglucky: TextView = itemView.findViewById(R.id.id_img_lucy)
val timer: TextView = itemView.findViewById(R.id.tv_watering_item_timer)
} }
// 领取水滴 type:1每日领水 2高额领水 // 领取水滴 type:1每日领水 2高额领水
...@@ -284,4 +309,37 @@ class WateringTaskAdpater : ...@@ -284,4 +309,37 @@ class WateringTaskAdpater :
this.onTouchEvent(event) this.onTouchEvent(event)
} }
} }
private var countTime: CountDownTimer? = null;
fun setTimer(time: Int, tv: TextView?) {
if (countTime != null) {
return
}
countTime = object : CountDownTimer((time * 1000).toLong(), 1000) {
override fun onTick(millisUntilFinished: Long) {
tv?.text = getTime(millisUntilFinished)
}
override fun onFinish() {
countTime?.cancel()
countTime=null
RxBusUtil.getDefault()
.send(RxBusConstant.RX_MAIN_WATER_DROP_UPDATE)
}
}.start()
}
fun getTime(second: Long): String? {
val formatter = SimpleDateFormat("HH:mm:ss")
formatter.setTimeZone(TimeZone.getTimeZone("GMT+00:00"))
return formatter.format(second)
}
fun closeTimer(){
if(countTime!=null){
countTime?.cancel()
countTime=null
}
}
} }
\ No newline at end of file
...@@ -11,6 +11,7 @@ import android.view.ViewGroup ...@@ -11,6 +11,7 @@ import android.view.ViewGroup
import android.widget.* import android.widget.*
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.ym.game.view.MainDialog.addClickScale
import com.ym.library.listener.OnRecycleItemClickListener import com.ym.library.listener.OnRecycleItemClickListener
import com.ym.library.base.BaseRecyclerAdapter import com.ym.library.base.BaseRecyclerAdapter
import com.ym.library.utils.Utils import com.ym.library.utils.Utils
...@@ -75,7 +76,7 @@ class WelfareTaskAdpater : ...@@ -75,7 +76,7 @@ class WelfareTaskAdpater :
} else { } else {
holder?.ivTitle?.visibility = View.GONE holder?.ivTitle?.visibility = View.GONE
} }
holder.ivStatus.addClickScale()
holder.ivStatus.setOnClickListener { holder.ivStatus.setOnClickListener {
if (Utils.isFastClick()) { if (Utils.isFastClick()) {
listener.onItemClick(it, position, mList[position]) listener.onItemClick(it, position, mList[position])
......
...@@ -53,7 +53,7 @@ class BaseApplication : BaseApplication() { ...@@ -53,7 +53,7 @@ class BaseApplication : BaseApplication() {
private var backToFrontTime: Long = 0 private var backToFrontTime: Long = 0
override fun onCreate() { override fun onCreate() {
super.onCreate() super.onCreate()
NetConfig.setBase_Url(NetConfig.Environment.DEV)// TODO 上线之后提成成 NetConfig.Environment.PRODUCT NetConfig.setBase_Url(NetConfig.Environment.PRODUCT)// TODO 上线之后提成成 NetConfig.Environment.PRODUCT
var isDebug = true var isDebug = true
if (NetConfig.sEnvironment == NetConfig.Environment.PRODUCT) { if (NetConfig.sEnvironment == NetConfig.Environment.PRODUCT) {
...@@ -71,7 +71,7 @@ class BaseApplication : BaseApplication() { ...@@ -71,7 +71,7 @@ class BaseApplication : BaseApplication() {
AdManager.init(this, "1d8a0d53c33a9b95") AdManager.init(this, "1d8a0d53c33a9b95")
LogUtils.getConfig().logSwitch = isDebug LogUtils.getConfig().logSwitch = isDebug
UMConfigure.setLogEnabled(false) UMConfigure.setLogEnabled(false)
UMConfigure.init(this, "5fe446a944bb94418a636569", "", UMConfigure.DEVICE_TYPE_PHONE, "") UMConfigure.init(this, "602f890b668f9e17b8b31413", "", UMConfigure.DEVICE_TYPE_PHONE, "")
PlatformConfig.setWeixin(MyConstant.WX_APPID, MyConstant.WX_APPKEY) PlatformConfig.setWeixin(MyConstant.WX_APPID, MyConstant.WX_APPKEY)
AppLibraryConfig.ActivityConfig.isProhibitScreenshot=false AppLibraryConfig.ActivityConfig.isProhibitScreenshot=false
...@@ -85,7 +85,7 @@ class BaseApplication : BaseApplication() { ...@@ -85,7 +85,7 @@ class BaseApplication : BaseApplication() {
// 设置是否为上报进程 // 设置是否为上报进程
strategy.isUploadProcess = processName == null || processName == packageName strategy.isUploadProcess = processName == null || processName == packageName
//Bugly初始化 //Bugly初始化
CrashReport.initCrashReport(this, "3bac59d22f", isDebug, strategy) CrashReport.initCrashReport(this, "b0489da05d", isDebug, strategy)
//========== Bugly ========== //========== Bugly ==========
//小满 //小满
......
...@@ -17,7 +17,7 @@ class GameContract { ...@@ -17,7 +17,7 @@ class GameContract {
fun gameWaterNotEnough(playNum:Int,landId: Int); fun gameWaterNotEnough(playNum:Int,landId: Int);
fun gameCleanBugNotEnough(playNum:Int,landId: Int); fun gameCleanBugNotEnough(playNum:Int,landId: Int);
fun gameCurrentOrderResult(result: String) fun gameCurrentOrderResult(result: String)
fun gameFlyBoxResult(result: FlyBoxEntity) // fun gameFlyBoxResult(result: FlyBoxEntity)
} }
interface Presenter { interface Presenter {
...@@ -27,7 +27,7 @@ class GameContract { ...@@ -27,7 +27,7 @@ class GameContract {
fun getLandList(from:Int) fun getLandList(from:Int)
fun getHomeInfo() fun getHomeInfo()
fun getCleanBug(landId:Int) fun getCleanBug(landId:Int)
fun getRewardLand(landId:Int) fun getRewardLand(landId:Int,plantId:Int)
fun getPlantLand(landId:Int,plantId:Int) fun getPlantLand(landId:Int,plantId:Int)
fun getLockLand(landId:Int) fun getLockLand(landId:Int)
fun getUseAccelerators(landId:Int) fun getUseAccelerators(landId:Int)
......
...@@ -11,6 +11,7 @@ import com.ym.library.net.BaseObserver ...@@ -11,6 +11,7 @@ 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.EventUtils import com.ym.library.utils.EventUtils
import com.ym.library.utils.Utils
class ClockInWithdrawPresenter : ClockInWithdrawContract.Presenter { class ClockInWithdrawPresenter : ClockInWithdrawContract.Presenter {
...@@ -44,7 +45,7 @@ class ClockInWithdrawPresenter : ClockInWithdrawContract.Presenter { ...@@ -44,7 +45,7 @@ class ClockInWithdrawPresenter : ClockInWithdrawContract.Presenter {
} }
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) { override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
mView?.dowdResult(null) // mView?.dowdResult(null)
} }
}) })
} }
......
...@@ -127,10 +127,11 @@ class GamePresenter : GameContract.Presenter { ...@@ -127,10 +127,11 @@ class GamePresenter : GameContract.Presenter {
}) })
} }
override fun getRewardLand(landId: Int) { override fun getRewardLand(landId: Int, plantId: Int) {
GameApiClient.gameApi.getRewardLand(landId).compose(RxSchedulers.observableIO2Main()) GameApiClient.gameApi.getRewardLand(landId).compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<LandListEntity>() { .subscribe(object : BaseObserver<LandListEntity>() {
override fun onSuccess(result: LandListEntity?) { override fun onSuccess(result: LandListEntity?) {
EventUtils.onEvent("reward${plantId-1}", "收获${plantId-1}")
mView.gameRewardLandResult(Utils.obj2Str(result)) mView.gameRewardLandResult(Utils.obj2Str(result))
} }
...@@ -158,6 +159,7 @@ class GamePresenter : GameContract.Presenter { ...@@ -158,6 +159,7 @@ class GamePresenter : GameContract.Presenter {
GameApiClient.gameApi.getUnLockLand(landId).compose(RxSchedulers.observableIO2Main()) GameApiClient.gameApi.getUnLockLand(landId).compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<LandListEntity>() { .subscribe(object : BaseObserver<LandListEntity>() {
override fun onSuccess(result: LandListEntity?) { override fun onSuccess(result: LandListEntity?) {
EventUtils.onEvent("unlock$landId", "解锁第${landId}块地")
mView.gameLockLandResult(Utils.obj2Str(result)) mView.gameLockLandResult(Utils.obj2Str(result))
} }
...@@ -212,10 +214,12 @@ class GamePresenter : GameContract.Presenter { ...@@ -212,10 +214,12 @@ class GamePresenter : GameContract.Presenter {
//1 花仙 //1 花仙
if (type == 1) { if (type == 1) {
checkVideoStatus(4, "VIDEO_FAIRY", 0, 0) checkVideoStatus(4, "VIDEO_FAIRY", 0, 0)
EventUtils.onEvent("flower_btn_click", "花仙弹窗按钮点击")
} }
//2 宝箱 //2 宝箱
if (type == 2) { if (type == 2) {
checkVideoStatus(3, "BOX_REWARD", 0, 0) checkVideoStatus(3, "BOX_REWARD", 0, 0)
EventUtils.onEvent("box_btn_click", "宝箱弹窗按钮点击")
} }
...@@ -253,7 +257,7 @@ class GamePresenter : GameContract.Presenter { ...@@ -253,7 +257,7 @@ class GamePresenter : GameContract.Presenter {
View.OnClickListener { View.OnClickListener {
AdUtils.playRewardAd( AdUtils.playRewardAd(
act, act,
"cloud_acceleration_click", slot,
object : IAdVideoListener { object : IAdVideoListener {
override fun onAdClose() { override fun onAdClose() {
getUseFertilize(); getUseFertilize();
......
...@@ -43,7 +43,7 @@ class WateringRewardPresenter : WateringRewardContract.Presenter { ...@@ -43,7 +43,7 @@ class WateringRewardPresenter : WateringRewardContract.Presenter {
} }
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) { override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
mView?.taskListResult(null) // mView?.taskListResult(null)
} }
}) })
......
...@@ -45,7 +45,7 @@ class WelfarePresenter : WelfareContract.Presenter { ...@@ -45,7 +45,7 @@ class WelfarePresenter : WelfareContract.Presenter {
} }
override fun getTaskReceiveList(sid: Int) { override fun getTaskReceiveList(sid: Int) {
GameApiClient.gameApi.getTaskComplete(sid).compose( GameApiClient.gameApi.getWelfareTaskComplete(sid).compose(
RxSchedulers.observableIO2Main() RxSchedulers.observableIO2Main()
).subscribe(object : BaseObserver<TaskCompleteEntity>() { ).subscribe(object : BaseObserver<TaskCompleteEntity>() {
override fun onSuccess(result: TaskCompleteEntity?) { override fun onSuccess(result: TaskCompleteEntity?) {
...@@ -95,7 +95,7 @@ class WelfarePresenter : WelfareContract.Presenter { ...@@ -95,7 +95,7 @@ class WelfarePresenter : WelfareContract.Presenter {
} }
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) { override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
mView?.welfareTaskCashResult(null) // mView?.welfareTaskCashResult(null)
} }
}) })
} }
......
...@@ -34,7 +34,7 @@ object CashExchangeDialog : CashExchangeContract.View { ...@@ -34,7 +34,7 @@ object CashExchangeDialog : CashExchangeContract.View {
return return
} }
this.context = context this.context = context
EventUtils.onEvent("duihuan_show", "兑换现金")
mPresenter = CashExchangePresenter(this) mPresenter = CashExchangePresenter(this)
mPresenter?.getWithDrawList() mPresenter?.getWithDrawList()
RxBusUtil.getDefault().register(this) RxBusUtil.getDefault().register(this)
...@@ -54,7 +54,6 @@ object CashExchangeDialog : CashExchangeContract.View { ...@@ -54,7 +54,6 @@ object CashExchangeDialog : CashExchangeContract.View {
recyclerexchange?.adapter = cashExchangeAdapter recyclerexchange?.adapter = cashExchangeAdapter
mDialogView?.findViewById<ImageView>(R.id.cash_shop_close).setOnClickListener { mDialogView?.findViewById<ImageView>(R.id.cash_shop_close).setOnClickListener {
mDialog?.dismiss() mDialog?.dismiss()
mListener.onCloseViewSuccess(true);
RxBusUtil.getDefault().unregister(this) RxBusUtil.getDefault().unregister(this)
} }
// mDialogView?.findViewById<ImageView>(R.id.id_mg_cash_recode).setOnClickListener { // mDialogView?.findViewById<ImageView>(R.id.id_mg_cash_recode).setOnClickListener {
...@@ -64,7 +63,13 @@ object CashExchangeDialog : CashExchangeContract.View { ...@@ -64,7 +63,13 @@ object CashExchangeDialog : CashExchangeContract.View {
// ExchangeRecordDialog.showRecord(context) // ExchangeRecordDialog.showRecord(context)
// } // }
mDialog?.setOnCancelListener { mDialog?.setOnCancelListener {
// RxBusUtil.getDefault().unregister(this)
// mListener.onCloseViewSuccess(true);
}
mDialog?.setOnDismissListener{
RxBusUtil.getDefault().unregister(this) RxBusUtil.getDefault().unregister(this)
mListener.onCloseViewSuccess(true);
} }
mDialog?.setCanceledOnTouchOutside(false) mDialog?.setCanceledOnTouchOutside(false)
...@@ -72,6 +77,7 @@ object CashExchangeDialog : CashExchangeContract.View { ...@@ -72,6 +77,7 @@ object CashExchangeDialog : CashExchangeContract.View {
if (context.isFinishing){ if (context.isFinishing){
return return
} }
EventUtils.onEvent("exchange_show", "售卖果实弹窗曝光")
mDialog?.show() mDialog?.show()
} }
......
...@@ -47,46 +47,6 @@ object MainDialog { ...@@ -47,46 +47,6 @@ object MainDialog {
return mDialogView return mDialogView
} }
/**
* 领取红包奖励
*/
fun getTaskRewardDialog(
activity: Activity,
reward: String,
withdrawClick: View.OnClickListener
) {
val mDialog = Dialog(activity, R.style.UpdateVersionCompatDialogTheme)
val mDialogView =
CenterDialog.showBottomDialog(
R.layout.dialog_get_water_drop2,
activity,
mDialog,
0,
Gravity.CENTER
)
val layoutAd = mDialogView?.findViewById<FrameLayout>(R.id.layout_feed_ad)
AdUtils.showFeedAd(activity, "receive_redPack_double_click", layoutAd)
mDialogView.findViewById<ImageView>(R.id.lv_get_drop_close2).setOnClickListener {
EventUtils.onEvent("click_close_receive_redPack_dialog", "点击关闭领取红包弹窗")
mDialog.dismiss()
}
mDialogView.findViewById<TextView>(R.id.tv_get_drop_count4)?.text = reward
mDialogView.findViewById<TextView>(R.id.btn_get_six_reward)?.setOnClickListener {
if (Utils.isFastClick()) {
withdrawClick.onClick(it)
mDialog.dismiss()
}
}
mDialog?.setCanceledOnTouchOutside(false)
mDialog?.setCancelable(false)
if (activity.isFinishing) {
return
}
mDialog?.show()
}
/** /**
* 转盘奖励 * 转盘奖励
* type: 奖励类型 * type: 奖励类型
...@@ -158,13 +118,13 @@ object MainDialog { ...@@ -158,13 +118,13 @@ object MainDialog {
4 -> { 4 -> {
// ivtitle.setImageResource(R.mipmap.icon_img_title_get_coin_) // ivtitle.setImageResource(R.mipmap.icon_img_title_get_coin_)
tvget.text = "恭喜获得" tvget.text = "恭喜获得"
ivGetDropBg.setImageResource(R.mipmap.icon_speed_water) ivGetDropBg.setImageResource(R.mipmap.icon_speed_water_big)
tvGetDropCount.text = "营养液x${rewardCount}" tvGetDropCount.text = "营养液x${rewardCount}"
} }
5 -> { 5 -> {
tvget.text = "恭喜获得" tvget.text = "恭喜获得"
// ivtitle.setImageResource(R.mipmap.icon_img_title_get_speed_water) // ivtitle.setImageResource(R.mipmap.icon_img_title_get_speed_water)
ivGetDropBg.setImageResource(R.mipmap.icon_speed_water) ivGetDropBg.setImageResource(R.mipmap.icon_speed_water_big)
tvGetDropCount.text = "+${rewardCount}" tvGetDropCount.text = "+${rewardCount}"
} }
} }
...@@ -256,7 +216,7 @@ object MainDialog { ...@@ -256,7 +216,7 @@ object MainDialog {
if (type == 1) { if (type == 1) {
ivGetDropBg.setImageResource(R.mipmap.img_jiasuji) ivGetDropBg.setImageResource(R.mipmap.img_jiasuji)
tvGetDropCount.text = "加速剂x${rewardCount}" tvGetDropCount.text = "营养液x${rewardCount}"
} }
if (type == 2) { if (type == 2) {
...@@ -404,6 +364,7 @@ object MainDialog { ...@@ -404,6 +364,7 @@ object MainDialog {
title: String, title: String,
reason: String, reason: String,
buttonText: String, buttonText: String,
cashText: String,
buttonStatus: Int, buttonStatus: Int,
id: Int?, id: Int?,
type: Int?, type: Int?,
...@@ -427,79 +388,19 @@ object MainDialog { ...@@ -427,79 +388,19 @@ object MainDialog {
val tvtitle = mDialogView?.findViewById<TextView>(R.id.id_img_title) val tvtitle = mDialogView?.findViewById<TextView>(R.id.id_img_title)
val tvcashcontent = mDialogView?.findViewById<TextView>(R.id.id_tv_cash_content) val tvcashcontent = mDialogView?.findViewById<TextView>(R.id.id_tv_cash_content)
val imggoon = mDialogView?.findViewById<ImageView>(R.id.id_tv_go_on_make_money) val imggoon = mDialogView?.findViewById<TextView>(R.id.id_tv_go_on_make_money)
val withLL = mDialogView?.findViewById<LinearLayout>(R.id.withdraw_success_ll) val withLL = mDialogView?.findViewById<LinearLayout>(R.id.withdraw_success_ll)
val with_money = mDialogView?.findViewById<TextView>(R.id.withdraw_success_tv) val with_money = mDialogView?.findViewById<TextView>(R.id.withdraw_success_tv)
tvtitle.text = title tvtitle.text = title
tvcashcontent.visibility = View.VISIBLE tvcashcontent.visibility = View.VISIBLE
imggoon.text=buttonText
when (status) { when (status) {
1 -> { 1 -> {
EventUtils.onEvent("cashout_suc_show", "提现成功弹窗曝光(作物兑换、钻石提现、打卡提现)")
tvcashcontent.visibility = View.GONE tvcashcontent.visibility = View.GONE
withLL.visibility = View.VISIBLE withLL.visibility = View.VISIBLE
with_money.text = buttonText + "元"; with_money.text = cashText + "元";
// imgtitle.setImageResource(R.mipmap.img_duihuan_success)
tvtitle.text = title
imggoon.setImageResource(R.mipmap.img_go_zhongcai)
/*if (type == 1) {
EventUtils.onEvent("xinshou0.3_show", "新手0.3")
} else if (type == 4) {
EventUtils.onEvent("show_fuli0.3", "福利0.3")
} else if (type == 7) {
EventUtils.onEvent("welfare_withdraw_success_dialog_show")
} else if (type == 8) {
EventUtils.onEvent("attendance_withdraw_success_dialog_show")
} else if (type == 10) {
EventUtils.onEvent("tixian_success_dfw_show", "大富翁提现成功")
} else if (type == 11) {
EventUtils.onEvent("tixian_success_guaka_show", "刮卡提现成功")
} else {
if (id != null) {
when (id) {
1 -> {
EventUtils.onEvent("show_hongmeigui", "番茄" + jine)
}
2 -> {
EventUtils.onEvent("show_zimeigui", "南瓜" + jine)
}
3 -> {
EventUtils.onEvent("show_linglan", "萝卜" + jine)
}
4 -> {
EventUtils.onEvent("show_juhua", "玉米" + jine)
}
}
}
}*/
}
2 -> {
// imgtitle.setImageResource(R.mipmap.img_duihuan_success)
imggoon.setImageResource(R.mipmap.img_go_zhongcai)
// tvtitle.text = title
}
3 -> {
// imgtitle.setImageResource(R.mipmap.img_wenxin_trip)
imggoon.setImageResource(R.mipmap.img_i_konw)
// tvtitle.text = title
}
4 -> {
// imgtitle.setImageResource(R.mipmap.img_wenxin_trip)
imggoon.setImageResource(R.mipmap.icon_go_shaizi)
}
5 -> {
// imgtitle.setImageResource(R.mipmap.img_wenxin_trip)
imggoon.setImageResource(R.mipmap.icon_go_guajiang)
}
6 -> {
// imgtitle.setImageResource(R.mipmap.img_wenxin_trip)
imggoon.setImageResource(R.mipmap.img_go_zhongcai)
}
7 -> {
// imgtitle.setImageResource(R.mipmap.img_wenxin_trip)
imggoon.setImageResource(R.mipmap.img_go_invite_friend)
}
8 -> {
// imgtitle.setImageResource(R.mipmap.img_wenxin_trip)
imggoon.setImageResource(R.mipmap.img_go_get_diamand)
} }
} }
...@@ -512,7 +413,7 @@ object MainDialog { ...@@ -512,7 +413,7 @@ object MainDialog {
} else if (buttonStatus == 1) { } else if (buttonStatus == 1) {
mDialog.dismiss() mDialog.dismiss()
dialog.dismiss() dialog.dismiss()
JumpUtils.jumpWelfareActivity() // JumpUtils.jumpWelfareActivity()
// JumpUtils.h5Jump("每日福利", Constant.Param.WelfareCenter, false, context as Activity) // JumpUtils.h5Jump("每日福利", Constant.Param.WelfareCenter, false, context as Activity)
} else if (buttonStatus == 2) { } else if (buttonStatus == 2) {
if (isWelfarePage) { if (isWelfarePage) {
...@@ -566,63 +467,6 @@ object MainDialog { ...@@ -566,63 +467,6 @@ object MainDialog {
mDialog?.show() mDialog?.show()
} }
fun showActivityDesc(activity: Activity) {
if (activity == null) return
val mDialog = Dialog(activity, R.style.UpdateVersionCompatDialogTheme)
val mDialogView = showBottomDialog(
R.layout.dialog_activity_desc,
activity,
mDialog,
0,
Gravity.CENTER
)
mDialogView.findViewById<ImageView>(R.id.id_img_dialog_activity_desc).setOnClickListener {
mDialog.dismiss()
}
mDialog?.setCanceledOnTouchOutside(false)
mDialog?.setCancelable(false)
if (activity.isFinishing) {
return
}
mDialog?.show()
}
// 获取碎片红包时的弹窗
fun showDialoggetPuzzle(
activity: Activity?,
diffCardsNum: Int,
onClickListener: View.OnClickListener
) {
if (activity == null) return
val mDialog = Dialog(activity, R.style.UpdateVersionCompatDialogTheme)
val mDialogView = showBottomDialog(
R.layout.dialog_get_puzzle,
activity,
mDialog,
0,
Gravity.CENTER
)
EventUtils.onEvent("show_suipianbuzu_dialog", "碎片不足弹窗曝光")
mDialogView.findViewById<TextView>(R.id.id_tv_num_puzzle)?.text = "${diffCardsNum}"
mDialogView.findViewById<ImageView>(R.id.id_img_close_get_puzzle).setOnClickListener {
mDialog.dismiss()
}
mDialogView.findViewById<ImageView>(R.id.id_img_canle).setOnClickListener {
mDialog.dismiss()
}
mDialogView.findViewById<ImageView>(R.id.id_img_sure).setOnClickListener {
mDialog.dismiss()
EventUtils.onEvent("click_pintu_quhuode_video", "去获得视频按钮点击")
onClickListener.onClick(it)
}
mDialog?.setCanceledOnTouchOutside(false)
mDialog?.setCancelable(false)
if (activity.isFinishing) {
return
}
mDialog?.show()
}
// 云朵加速的弹窗 // 云朵加速的弹窗
fun showDialogCloud( fun showDialogCloud(
activity: Activity?, activity: Activity?,
...@@ -639,10 +483,9 @@ object MainDialog { ...@@ -639,10 +483,9 @@ object MainDialog {
0, 0,
Gravity.CENTER Gravity.CENTER
) )
EventUtils.onEvent("show_cloud_speed_up_dialog", "云朵加速弹窗")
val layoutAd = mDialogView?.findViewById<FrameLayout>(R.id.layout_feed_ad) val layoutAd = mDialogView?.findViewById<FrameLayout>(R.id.layout_feed_ad)
val id_img_all_speed = mDialogView?.findViewById<ImageView>(R.id.id_img_all_speed) val id_img_all_speed = mDialogView?.findViewById<ImageView>(R.id.id_img_all_speed)
//AdUtils.showFeedAd(activity, "cloud_speed_bigimage", layoutAd) AdUtils.showFeedAd(activity, "allspeedup", layoutAd)
mDialogView.findViewById<TextView>(R.id.id_tv_speed_time)?.text = "所有土地获得${speedtime}分钟加速" mDialogView.findViewById<TextView>(R.id.id_tv_speed_time)?.text = "所有土地获得${speedtime}分钟加速"
mDialogView.findViewById<TextView>(R.id.id_cloud_speed_num)?.text = mDialogView.findViewById<TextView>(R.id.id_cloud_speed_num)?.text =
"今天剩余${speedtimes}次" "今天剩余${speedtimes}次"
...@@ -651,7 +494,7 @@ object MainDialog { ...@@ -651,7 +494,7 @@ object MainDialog {
} }
FilterUtils.addClickAlpha(id_img_all_speed) FilterUtils.addClickAlpha(id_img_all_speed)
id_img_all_speed.setOnClickListener { id_img_all_speed.setOnClickListener {
EventUtils.onEvent("alljiasu_video_btn_click", "云朵加速视频点击") EventUtils.onEvent("allspeedup_btn_click", "施肥弹窗施肥按钮点击")
onClickListener.onClick(it) onClickListener.onClick(it)
mDialog.dismiss() mDialog.dismiss()
} }
...@@ -661,6 +504,7 @@ object MainDialog { ...@@ -661,6 +504,7 @@ object MainDialog {
if (activity.isFinishing) { if (activity.isFinishing) {
return return
} }
EventUtils.onEvent("allspeedup_show", "施肥弹窗曝光")
mDialog?.show() mDialog?.show()
} }
...@@ -726,11 +570,10 @@ object MainDialog { ...@@ -726,11 +570,10 @@ object MainDialog {
} }
/** /**
* 加速器不足 * 营养液不足
*/ */
fun showAccelerator(activity: Activity, getnum: Int, num: Int, listener: View.OnClickListener) { fun showAccelerator(activity: Activity, getnum: Int, num: Int, listener: View.OnClickListener) {
if (activity == null) return if (activity == null) return
EventUtils.onEvent("jiasu_show")
val mDialog = Dialog(activity, R.style.UpdateVersionCompatDialogTheme) val mDialog = Dialog(activity, R.style.UpdateVersionCompatDialogTheme)
val mDialogView = val mDialogView =
showBottomDialog( showBottomDialog(
...@@ -754,7 +597,7 @@ object MainDialog { ...@@ -754,7 +597,7 @@ object MainDialog {
btn_accelerator_btn.setOnClickListener { btn_accelerator_btn.setOnClickListener {
mDialog?.dismiss() mDialog?.dismiss()
EventUtils.onEvent("jiasu_video_btn_click", "营养液视频按钮点击") EventUtils.onEvent("speedup_btn_click", "免费获得营养液按钮点击")
listener.onClick(it) listener.onClick(it)
} }
...@@ -770,17 +613,16 @@ object MainDialog { ...@@ -770,17 +613,16 @@ object MainDialog {
if (activity.isFinishing) { if (activity.isFinishing) {
return return
} }
EventUtils.onEvent("speedup_show", "营养液不足弹窗曝光");
mDialog?.show() mDialog?.show()
} }
/** /**
* 加速器不足 * 杀虫剂不足
*/ */
fun showCleanBug(activity: Activity, getnum: Int, num: Int, listener: View.OnClickListener) { fun showCleanBug(activity: Activity, getnum: Int, num: Int, listener: View.OnClickListener) {
if (activity == null) return if (activity == null) return
EventUtils.onEvent("jiasu_show")
val mDialog = Dialog(activity, R.style.UpdateVersionCompatDialogTheme) val mDialog = Dialog(activity, R.style.UpdateVersionCompatDialogTheme)
val mDialogView = val mDialogView =
showBottomDialog( showBottomDialog(
...@@ -804,7 +646,7 @@ object MainDialog { ...@@ -804,7 +646,7 @@ object MainDialog {
btn_accelerator_btn.setOnClickListener { btn_accelerator_btn.setOnClickListener {
mDialog?.dismiss() mDialog?.dismiss()
EventUtils.onEvent("jiasu_video_btn_click", "营养液视频按钮点击") EventUtils.onEvent("stop_btn_click", "免费获得杀虫剂按钮点击")
listener.onClick(it) listener.onClick(it)
} }
...@@ -820,6 +662,7 @@ object MainDialog { ...@@ -820,6 +662,7 @@ object MainDialog {
if (activity.isFinishing) { if (activity.isFinishing) {
return return
} }
EventUtils.onEvent("stop_show", "杀虫剂不足弹窗曝光");
mDialog?.show() mDialog?.show()
} }
......
...@@ -23,6 +23,9 @@ import com.ym.library.rxbus.ThreadMode ...@@ -23,6 +23,9 @@ import com.ym.library.rxbus.ThreadMode
import com.ym.xynt.R import com.ym.xynt.R
import com.ym.library.listener.IAdVideoListener import com.ym.library.listener.IAdVideoListener
import com.ym.library.module.* import com.ym.library.module.*
import com.ym.library.net.BaseObserver
import com.ym.library.net.GameApiClient
import com.ym.library.net.RxSchedulers
import com.ym.library.utils.* import com.ym.library.utils.*
/** /**
...@@ -41,14 +44,14 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View, ...@@ -41,14 +44,14 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View,
private var singinDropsAdapter: SigninDropsAdapter? = null private var singinDropsAdapter: SigninDropsAdapter? = null
private var wateringTaskAdpater: WateringTaskAdpater? = null private var wateringTaskAdpater: WateringTaskAdpater? = null
var tv_tomAwardNum:TextView?=null var tv_tomAwardNum: TextView? = null
fun init(mContext: Activity?, mListener: IDialogViewCloseCallback) { fun init(mContext: Activity?, mListener: IDialogViewCloseCallback) {
this.mListener = mListener this.mListener = mListener
this.mContext = mContext this.mContext = mContext
if (mContext==null){ if (mContext == null) {
return return
} }
if (mContext.isFinishing){ if (mContext.isFinishing) {
return return
} }
// ToponManager.initNativeAd((mContext as Activity), AdID.AD_DAILY_DRIP_BIGIMAGE) // ToponManager.initNativeAd((mContext as Activity), AdID.AD_DAILY_DRIP_BIGIMAGE)
...@@ -57,7 +60,7 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View, ...@@ -57,7 +60,7 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View,
RxBusUtil.getDefault().register(this) RxBusUtil.getDefault().register(this)
mPresenter = WateringRewardPresenter(this) mPresenter = WateringRewardPresenter(this)
view = LayoutInflater.from(mContext).inflate(R.layout.layout_popup_drops, null) view = LayoutInflater.from(mContext).inflate(R.layout.layout_popup_drops, null)
EventUtils.onEvent("renwu_show", "任务弹窗曝光") EventUtils.onEvent("task_daily_show", "领加速剂任务弹窗曝光")
init(view) init(view)
initView() initView()
// mPresenter?.getOrchardSignTask() // mPresenter?.getOrchardSignTask()
...@@ -73,7 +76,7 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View, ...@@ -73,7 +76,7 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View,
private fun initView() { private fun initView() {
tvPopupSigninDrops = view?.findViewById<TextView>(R.id.tv_popup_signin_drops) tvPopupSigninDrops = view?.findViewById<TextView>(R.id.tv_popup_signin_drops)
tv_tomAwardNum=view?.findViewById(R.id.id_tv_reward_coin) tv_tomAwardNum = view?.findViewById(R.id.id_tv_reward_coin)
val recyclerSigninDrops = val recyclerSigninDrops =
view?.findViewById<RecyclerView>(R.id.recycler_popup_signin_drops) view?.findViewById<RecyclerView>(R.id.recycler_popup_signin_drops)
val recyclerWatering = val recyclerWatering =
...@@ -83,7 +86,7 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View, ...@@ -83,7 +86,7 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View,
singinDropsAdapter = SigninDropsAdapter(mContext) singinDropsAdapter = SigninDropsAdapter(mContext)
recyclerSigninDrops?.layoutManager = recyclerSigninDrops?.layoutManager =
GridLayoutManager(mContext,7) GridLayoutManager(mContext, 7)
// recyclerSigninDrops?.layoutManager = CardLayoutManager() // recyclerSigninDrops?.layoutManager = CardLayoutManager()
recyclerSigninDrops?.adapter = singinDropsAdapter recyclerSigninDrops?.adapter = singinDropsAdapter
...@@ -101,93 +104,101 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View, ...@@ -101,93 +104,101 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View,
override fun onItemClick(view: View, position: Int, data: NewsEntity) { override fun onItemClick(view: View, position: Int, data: NewsEntity) {
// 0未完成 1已领取 2可领取 // 0未完成 1已领取 2可领取
when (data.status) { //三餐任务 status==0?立即领取:countdownSecond=0?明日再来:显示倒计时
0 -> {
if (data.sid == 2565) {
// 跳转页面 1转盘 2高额水滴任务 3首页 4激励视频 直客任务链接" if (data.status == 0) {
// if() wateringTaskAdpater?.getDripTaskReceive(1, data.sid)
// appmodel_id EventUtils.onEvent("task_daily_id_go_${data.sid}", "领加速剂任务去完成按钮点击${data.sid}")
// 应用类模块跳转 跳转到幸运农田首页 65 }else{
//应用类模块跳转到幸运农田转盘抽奖 63 if (data.countdownSecond!! > 0) {
//应用类模块跳转到幸运农田开宝箱 64 EventUtils.onEvent("task_daily_id_receive_${data.sid}", "领加速剂任务领奖按钮点击${data.sid}")
//应用类模块跳转到幸运农田福利中心 66 }
if (data.opentype == 7) { }
if (data.appmodel_id == 65) { } else {
dismiss() if (data.status == 0) {
} else if (data.appmodel_id == 63) { EventUtils.onEvent("task_daily_id_go_${data.sid}", "领加速剂任务去完成按钮点击${data.sid}")
dismiss() }
TurntableDialog.showTurntable(mContext, mListener!!) if (data.status == 2) {
} else if (data.appmodel_id == 64) { EventUtils.onEvent("task_daily_id_receive_${data.sid}", "领加速剂任务领奖按钮点击${data.sid}")
dismiss() }
} else if (data.appmodel_id == 66) { when (data.status) {
0 -> {
// 跳转页面 1转盘 2高额水滴任务 3首页 4激励视频 直客任务链接"
// if()
// appmodel_id
// 应用类模块跳转 跳转到幸运农田首页 65
//应用类模块跳转到幸运农田转盘抽奖 63
//应用类模块跳转到幸运农田开宝箱 64
//应用类模块跳转到幸运农田福利中心 66
if (data.opentype == 7) {
if (data.appmodel_id == 65) {
dismiss()
} else if (data.appmodel_id == 63) {
dismiss()
TurntableDialog.showTurntable(mContext, mListener!!)
} else if (data.appmodel_id == 64) {
dismiss()
} else if (data.appmodel_id == 66) {
dismiss()
// JumpUtils.jumpWelfareActivity()
}
} else if (data.opentype == 1) {
if (data.sid != null) {
// EventUtils.onEvent("welfare_task_undone_click", "${data.sid}")
showAd(data.sid)
} else {
JumpUtils.adJump(data, mContext)
}
} else if (data.opentype == 2) {
dismiss() dismiss()
JumpUtils.jumpWelfareActivity() //直客链接
JumpUtils.adJump(data, (mContext as Activity))
} }
} else if (data.opentype == 1) {
if (data.sid != null) {
// EventUtils.onEvent("welfare_task_undone_click", "${data.sid}")
showAd(data.sid)
EventUtils.onEvent("renwu_undone_click_total")
}
else {
JumpUtils.adJump(data, mContext)
}
}else if(data.opentype==2){
dismiss()
//直客链接
JumpUtils.adJump(data, (mContext as Activity))
} }
// when (data.opentype) {
//
// 1 -> {
//
// }
// 2 -> {
// dismiss()
// // WateringTaskPopupwindow().init(mContext)
// }
// 3 -> dismiss()
// 6 -> {
//
//// JumpUtils.h5Jump(
//// "每日福利",
//// Constant.Param.WelfareCenter,
//// false,
//// mContext as Activity
//// )
// }
// 4 -> {
// EventUtils.onEvent("click_receive_coin_task_video_btn", "领金币任务视频")
//
// AdUtils.playRewardAd((mContext as Activity),"receive_coin_task",object : IAdVideoListener {
// override fun onAdClose() {
//
// }
//
// override fun onError(errorMsg: String?) {
//
// }
// })
// }
//
// }
} }
} }
} }
fun showAd(sId: Int) {
AdUtils.playRewardAd(mContext as Activity, "home_task", object : IAdVideoListener {
override fun onAdClose() {
// mPresenter?.getTaskComplete(sId)
wateringTaskAdpater?.getDripTaskReceive(1,sId)
}
override fun onError(errorMsg: String?) { fun showAd(sId: Int) {
GameApiClient.gameApi.getVideoStatus("ACCELERATORS_TASK")
.compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<StatusEntity>() {
override fun onSuccess(result: StatusEntity?) {
if (result != null) {
if (result.status == 1) {
AdUtils.playRewardAd(
mContext as Activity,
"ACCELERATORS_TASK",
object : IAdVideoListener {
override fun onAdClose() {
// mPresenter?.getTaskComplete(sId)
wateringTaskAdpater?.getDripTaskReceive(1, sId)
}
} override fun onError(errorMsg: String?) {
})
} }
})
} else {
ToastUtils.showTextToast("${result?.msg}");
}
}
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
if (code.equals("105")) {
ToastUtils.showTextToast("$errorMsg");
}
}
})
}
//签到 //签到
...@@ -199,7 +210,7 @@ fun showAd(sId: Int) { ...@@ -199,7 +210,7 @@ fun showAd(sId: Int) {
singinDropsAdapter?.clear() singinDropsAdapter?.clear()
singinDropsAdapter?.appendToList(data.signInfoList) singinDropsAdapter?.appendToList(data.signInfoList)
singinDropsAdapter?.notifyDataSetChanged() singinDropsAdapter?.notifyDataSetChanged()
tv_tomAwardNum?.text=" ${data.tomAwardNum} " tv_tomAwardNum?.text = " ${data.tomAwardNum} "
if (data.isPop == 1) { if (data.isPop == 1) {
//首次签到弹窗 //首次签到弹窗
MainDialog.showgetWaterDrop(mContext, 4, "singin", data.awardNum, null) MainDialog.showgetWaterDrop(mContext, 4, "singin", data.awardNum, null)
...@@ -227,6 +238,7 @@ fun showAd(sId: Int) { ...@@ -227,6 +238,7 @@ fun showAd(sId: Int) {
override fun dismiss() { override fun dismiss() {
mListener?.onCloseViewSuccess(true) mListener?.onCloseViewSuccess(true)
super.dismiss() super.dismiss()
wateringTaskAdpater?.closeTimer()
RxBusUtil.getDefault().unregister(this) RxBusUtil.getDefault().unregister(this)
LogUtils.i(TAG, "dismiss") LogUtils.i(TAG, "dismiss")
} }
......
...@@ -33,7 +33,6 @@ object WareHouseDialog : WareHouseContract.View { ...@@ -33,7 +33,6 @@ object WareHouseDialog : WareHouseContract.View {
return return
} }
this.context = context this.context = context
EventUtils.onEvent("cangku_show", "仓库弹窗曝光")
mPresenter = WareHousePresenter(this) mPresenter = WareHousePresenter(this)
mPresenter?.getwarehouseData() mPresenter?.getwarehouseData()
RxBusUtil.getDefault().register(this) RxBusUtil.getDefault().register(this)
...@@ -68,6 +67,7 @@ object WareHouseDialog : WareHouseContract.View { ...@@ -68,6 +67,7 @@ object WareHouseDialog : WareHouseContract.View {
mDialog?.setCanceledOnTouchOutside(false) mDialog?.setCanceledOnTouchOutside(false)
mDialog?.setCancelable(false) mDialog?.setCancelable(false)
EventUtils.onEvent("store_show", "仓库弹窗曝光")
mDialog?.show() mDialog?.show()
} }
......
...@@ -11,26 +11,22 @@ import android.graphics.drawable.ColorDrawable ...@@ -11,26 +11,22 @@ import android.graphics.drawable.ColorDrawable
import android.view.* import android.view.*
import android.view.animation.AnimationUtils import android.view.animation.AnimationUtils
import android.widget.* import android.widget.*
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.ym.library.listener.OnRecycleItemClickListener import com.ym.library.listener.OnRecycleItemClickListener
import com.ym.game.listener.IDialogViewCloseCallback import com.ym.game.listener.IDialogViewCloseCallback
import com.ym.game.adapter.SigninDropsAdapter
import com.ym.game.adapter.WateringTaskAdpater
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.presenter.WateringRewardPresenter
import com.ym.game.presenter.WelfarePresenter import com.ym.game.presenter.WelfarePresenter
import com.ym.library.rxbus.RxBusConstant
import com.ym.library.rxbus.Subscribe
import com.ym.library.rxbus.ThreadMode
import com.ym.xynt.R import com.ym.xynt.R
import com.ym.library.listener.IAdVideoListener import com.ym.library.listener.IAdVideoListener
import com.ym.library.module.* import com.ym.library.module.*
import com.ym.library.rxbus.RxBusConstant
import com.ym.library.rxbus.RxBusUtil
import com.ym.library.rxbus.Subscribe
import com.ym.library.rxbus.ThreadMode
import com.ym.library.utils.* import com.ym.library.utils.*
import kotlinx.android.synthetic.main.activity_welfare.*
class WelfarePopupwindow : PopupWindow(), WelfareContract.View, class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
OnRecycleItemClickListener<NewsEntity> { OnRecycleItemClickListener<NewsEntity> {
...@@ -58,12 +54,10 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View, ...@@ -58,12 +54,10 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
return return
} }
view = LayoutInflater.from(mContext).inflate(R.layout.layout_popup_welfare, null) view = LayoutInflater.from(mContext).inflate(R.layout.layout_popup_welfare, null)
EventUtils.onEvent("fuli_show", "福利弹窗曝光") EventUtils.onEvent("task_senior_show", "福利任务弹窗曝光")
init(view) init(view)
initView() initView()
RxBusUtil.getDefault().register(this)
showAtLocation( showAtLocation(
view, view,
Gravity.CENTER, Gravity.CENTER,
...@@ -89,33 +83,31 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View, ...@@ -89,33 +83,31 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
progess_watering_bar = view?.findViewById<ProgressBar>(R.id.progess_watering_bar) progess_watering_bar = view?.findViewById<ProgressBar>(R.id.progess_watering_bar)
tv_welfare_diamond_conut = view?.findViewById<TextView>(R.id.tv_welfare_diamond_conut) tv_welfare_diamond_conut = view?.findViewById<TextView>(R.id.tv_welfare_diamond_conut)
EventUtils.onEvent("fuli_show")
mPresenter = WelfarePresenter(this) mPresenter = WelfarePresenter(this)
iv_welfare_reward_box?.setOnClickListener { iv_welfare_reward_box?.setOnClickListener {
EventUtils.onEvent("welfare_task_reward_box_click") EventUtils.onEvent("welfare_task_reward_box_click")
if (mDiamondEntity?.coins != null && mDiamondEntity?.max != null) { if (mDiamondEntity?.coins != null && mDiamondEntity?.max != null) {
if (mDiamondEntity?.coins!! >= mDiamondEntity?.max!!) { mPresenter?.getWelfareTaskBox()
mPresenter?.getWelfareTaskBox() // if (mDiamondEntity?.coins!! >= mDiamondEntity?.max!!) {
} else { // mPresenter?.getWelfareTaskBox()
var lack = mDiamondEntity?.max!! - mDiamondEntity?.coins!! // } else {
MainDialog?.showWithDraw( // var lack = mDiamondEntity?.max!! - mDiamondEntity?.coins!!
mContext, // MainDialog?.showWithDraw(
3, // mContext,
"", // 3,
"需要钻石${mDiamondEntity?.max}颗,还差${lack}颗,快去做任务领钻石吧", // "",
"", // "需要钻石${mDiamondEntity?.max}颗,还差${lack}颗,快去做任务领钻石吧",
0, // result?.buttonText?:"",,
null, // 0,
0, // null,
null, // 0,
true, // null,
Dialog(mContext as Context) // true,
) // Dialog(mContext as Context)
} // )
// }
} }
...@@ -138,6 +130,12 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View, ...@@ -138,6 +130,12 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
mPresenter?.getTaskList() mPresenter?.getTaskList()
} }
@SuppressLint()
@Subscribe(code = RxBusConstant.RX_MAIN_WELFARE_UPDATE, threadMode = ThreadMode.MAIN)
fun updateList() {
mPresenter?.getTaskList()
}
override fun diamondListResult(result: DiamondEntity?) { override fun diamondListResult(result: DiamondEntity?) {
if (result != null) { if (result != null) {
mDiamondEntity = result mDiamondEntity = result
...@@ -169,7 +167,7 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View, ...@@ -169,7 +167,7 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
} else { } else {
iv_welfare_reward_red_pg?.visibility = View.VISIBLE iv_welfare_reward_red_pg?.visibility = View.VISIBLE
iv_welfare_reward_box?.visibility = View.GONE iv_welfare_reward_box?.visibility = View.GONE
tv_welfare_diamond_conut?.text = "集齐${result?.max}颗钻石可提现" tv_welfare_diamond_conut?.text = "集齐${result?.max}颗钻石兑换微信红包"
// iv_welfare_reward_red_pg?.animation = // iv_welfare_reward_red_pg?.animation =
// AnimationUtils.loadAnimation(mContext, R.anim.scale_anim) // AnimationUtils.loadAnimation(mContext, R.anim.scale_anim)
...@@ -206,11 +204,11 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View, ...@@ -206,11 +204,11 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
override fun taskCashResult(result: List<FlyBoxEntity>?) { override fun taskCashResult(result: List<FlyBoxEntity>?) {
if (result != null && result.isNotEmpty()) { if (result != null && result.isNotEmpty()) {
mPresenter?.getDiamondList() mPresenter?.getDiamondList()
MainDialog.showWelfareOpenBox(mContext, result, object : IDialogViewCloseCallback { // MainDialog.showWelfareOpenBox(mContext, result, object : IDialogViewCloseCallback {
override fun onCloseViewSuccess(isSuccess: Boolean) { // override fun onCloseViewSuccess(isSuccess: Boolean) {
//
} // }
}) // })
} }
} }
...@@ -223,6 +221,7 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View, ...@@ -223,6 +221,7 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
result?.title ?: "", result?.title ?: "",
result?.reason ?: "", result?.reason ?: "",
result?.buttonText ?: "", result?.buttonText ?: "",
result?.cashText ?: "",
result?.buttonStatus ?: 0, result?.buttonStatus ?: 0,
null, null,
7, 7,
...@@ -230,6 +229,7 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View, ...@@ -230,6 +229,7 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
true, true,
Dialog(mContext as Context) Dialog(mContext as Context)
) )
} }
} }
...@@ -244,12 +244,14 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View, ...@@ -244,12 +244,14 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
private var mSid: Int? = 0 private var mSid: Int? = 0
override fun onItemClick(view: View, position: Int, data: NewsEntity) { override fun onItemClick(view: View, position: Int, data: NewsEntity) {
mData = data mData = data
mSid = data.sid
if (!isClick) { if (!isClick) {
isClick = true isClick = true
//0未完成 1已领取 2可领取 //0未完成 1已领取 2可领取
when (data.status) { when (data.status) {
0 -> { 0 -> {
EventUtils.onEvent("fuli_go_click_${data.sid}") EventUtils.onEvent("task_senior_id_go_${data.sid}", "福利任务去完成按钮点击${data.sid}")
if (data.opentype == NewsEntity.AD_TYPE_SDK) { if (data.opentype == NewsEntity.AD_TYPE_SDK) {
if (data.sid != null) { if (data.sid != null) {
...@@ -266,13 +268,17 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View, ...@@ -266,13 +268,17 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
Utils.showToast(mContext, "已领取") Utils.showToast(mContext, "已领取")
} }
2 -> { 2 -> {
EventUtils.onEvent(
"task_senior_id_receive_${data.sid}",
"福利任务领奖按钮点击${data.sid}"
)
if (data.opentype == NewsEntity.AD_TYPE_SDK) { if (data.opentype == NewsEntity.AD_TYPE_SDK) {
EventUtils.onEvent("welfare_task_done_click_total") EventUtils.onEvent("welfare_task_done_click_total")
} }
EventUtils.onEvent("fuli_done_click_${data.sid}")
mPresenter?.getTaskReceiveList(data?.sid) mPresenter?.getTaskReceiveList(data?.sid)
} }
} }
view?.postDelayed({ view?.postDelayed({
isClick = false isClick = false
}, 1000) }, 1000)
...@@ -303,6 +309,7 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View, ...@@ -303,6 +309,7 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
taskAdapter?.clearAnimation() taskAdapter?.clearAnimation()
super.dismiss() super.dismiss()
LogUtils.i(TAG, "dismiss") LogUtils.i(TAG, "dismiss")
RxBusUtil.getDefault().unregister(this)
} }
private fun init(view: View?) { private fun init(view: View?) {
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="370dp"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginRight="@dimen/dp_15">
<ImageView
android:layout_width="match_parent"
android:layout_height="313dp"
android:layout_alignParentBottom="true"
android:scaleType="fitXY"
android:src="@mipmap/icon_main_dialog_get_drops_bg" />
<ImageView
android:id="@+id/id_img_close_get_puzzle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="65dp"
android:src="@mipmap/icon_new_close" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="350dp"
android:layout_alignParentBottom="true"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:layout_marginBottom="20dp"
android:background="@mipmap/icon_content_bg">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="35dp"
android:src="@drawable/icon_puzzle_title" />
<LinearLayout
android:id="@+id/id_ll_content"
android:layout_width="wrap_content"
android:layout_height="150dp"
android:layout_below="@+id/id_tv_gongxi_get"
android:layout_centerHorizontal="true"
android:layout_marginLeft="28dp"
android:layout_marginTop="@dimen/dp_121"
android:layout_marginRight="@dimen/dp_26"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:text="还差"
android:textColor="#6A231A"
android:textSize="17sp" />
<TextView
android:id="@+id/id_tv_num_puzzle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:text=" 6 "
android:textColor="#E85740"
android:textSize="17sp"
android:textStyle="bold"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:text="个碎片就完成拼图了"
android:textColor="#6A231A"
android:textSize="17sp" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="看视频可以获得碎片哦!"
android:textColor="#6A231A"
android:textSize="17sp" />
</LinearLayout>
<ImageView
android:id="@+id/id_img_sure"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/dp_20"
android:src="@drawable/icon_sure"/>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="290dp"
android:layout_height="290dp"
android:background="@drawable/icon_dialog_bg"
android:visibility="gone">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="8dp"
android:layout_marginRight="8dp"
android:src="@drawable/icon_close_dialog" />
<TextView
android:id="@+id/id_tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="15dp"
android:includeFontPadding="false"
android:text="碎片红包"
android:textColor="#A26A3B"
android:textSize="20sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/id_tv_title"
android:layout_centerHorizontal="true"
android:layout_marginTop="46dp"
android:background="@drawable/icon_white_bg"
android:gravity="center"
android:orientation="vertical">
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="24dp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center">
<ImageView
android:id="@+id/id_img_canle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_canle" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center">
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
<RelativeLayout <RelativeLayout
android:layout_width="332dp" android:layout_width="332dp"
android:layout_height="@dimen/dp_279" android:layout_height="@dimen/dp_302"
android:background="@mipmap/icon_bg_jiangli"> android:background="@mipmap/icon_bg_jiangli_2">
<ImageView <ImageView
...@@ -58,9 +58,9 @@ ...@@ -58,9 +58,9 @@
<ImageView <ImageView
android:id="@+id/iv_get_drop_bg" android:id="@+id/iv_get_drop_bg"
android:layout_width="@dimen/dp_55" android:layout_width="wrap_content"
android:layout_height="@dimen/dp_66" android:layout_height="wrap_content"
android:src="@mipmap/icon_coin" /> android:src="@mipmap/icon_speed_water_big" />
<com.ym.game.wedget.FontTextView <com.ym.game.wedget.FontTextView
android:id="@+id/tv_get_drop_count" android:id="@+id/tv_get_drop_count"
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
android:gravity="center" android:gravity="center"
android:includeFontPadding="false" android:includeFontPadding="false"
android:textColor="#FF04437F" android:textColor="#FF04437F"
android:textSize="18sp" android:textSize="20sp"
android:textStyle="bold" android:textStyle="bold"
tools:text="+40g" /> tools:text="+40g" />
</LinearLayout> </LinearLayout>
......
<?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_close2"
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_img_title_get_coin_" />
<TextView
android:id="@+id/id_tv_gongxi_get2"
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"
android:visibility="invisible" />
<LinearLayout
android:id="@+id/id_ll_content"
android:layout_width="wrap_content"
android:layout_height="150dp"
android:layout_below="@+id/id_tv_gongxi_get2"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_60"
android:orientation="horizontal"
android:visibility="visible">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_get_drop_bg"
android:layout_width="@dimen/dp_60"
android:layout_height="@dimen/dp_60"
android:src="@mipmap/icon_coin" />
<TextView
android:id="@+id/tv_get_drop_count4"
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>
<TextView
android:id="@+id/btn_get_six_reward"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/id_ll_content"
android:layout_centerHorizontal="true"
android:background="@mipmap/img_receive_three_reward" />
</RelativeLayout>
</RelativeLayout>
<include layout="@layout/layout_base_feed_ad"/>
</LinearLayout>
</FrameLayout>
\ No newline at end of file
...@@ -19,9 +19,7 @@ ...@@ -19,9 +19,7 @@
<RelativeLayout <RelativeLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true">
android:layout_marginTop="-2dp"
android:background="@mipmap/icon_title_bg_188">
<com.ym.game.wedget.FontTextView <com.ym.game.wedget.FontTextView
android:id="@+id/id_tv_worm_title" android:id="@+id/id_tv_worm_title"
...@@ -30,7 +28,6 @@ ...@@ -30,7 +28,6 @@
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:gravity="center" android:gravity="center"
android:includeFontPadding="false" android:includeFontPadding="false"
android:text="我的仓库"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:textSize="22sp" android:textSize="22sp"
android:textStyle="bold" /> android:textStyle="bold" />
......
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
android:visibility="gone" android:orientation="vertical"
android:orientation="vertical"> android:visibility="gone">
<TextView <TextView
android:id="@+id/withdraw_success_tv" android:id="@+id/withdraw_success_tv"
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
android:gravity="center|bottom" android:gravity="center|bottom"
android:paddingRight="@dimen/dp_5" android:paddingRight="@dimen/dp_5"
android:paddingBottom="@dimen/dp_25" android:paddingBottom="@dimen/dp_25"
android:text="0.33元" android:text="0.3元"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="@dimen/sp_18" android:textSize="@dimen/sp_18"
android:textStyle="bold" /> android:textStyle="bold" />
...@@ -98,13 +98,20 @@ ...@@ -98,13 +98,20 @@
</LinearLayout> </LinearLayout>
<ImageView <com.ym.game.wedget.FontTextView
android:id="@+id/id_tv_go_on_make_money" android:id="@+id/id_tv_go_on_make_money"
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"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/dp_30" /> android:layout_marginBottom="@dimen/dp_30"
android:background="@mipmap/dialog_btn_desc_bg"
android:gravity="center"
android:includeFontPadding="false"
android:text="恭喜获得"
android:textColor="@color/white"
android:textSize="20sp"
android:textStyle="bold" />
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<RelativeLayout
android:layout_width="332dp"
android:layout_height="343dp"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginRight="@dimen/dp_15">
<ImageView
android:id="@+id/id_seed_bg_img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@mipmap/icon_bg_332" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="-2dp"
android:background="@mipmap/icon_title_bg_188">
<com.ym.game.wedget.FontTextView
android:id="@+id/id_tv_worm_title"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_centerHorizontal="true"
android:gravity="center"
android:includeFontPadding="false"
android:text="种子不足"
android:textColor="#722E01"
android:textSize="22sp" />
</RelativeLayout>
<ImageView
android:id="@+id/id_img_close_seed_dialog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="-4dp"
android:layout_marginRight="-4dp"
android:src="@mipmap/icon_new_close" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/id_img_close_seed_dialog"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/id_seed_not_enough_img"
android:layout_width="52dp"
android:layout_height="88dp"
android:layout_marginTop="@dimen/dp_20"
android:layout_marginBottom="@dimen/dp_23"
android:src="@mipmap/icon_zhongzi_one" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_10">
<ImageView
android:id="@+id/id_img_bug_seed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/icon_buy" />
<ImageView
android:id="@+id/img_coin"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_45"
android:src="@mipmap/icon_coin" />
<com.ym.game.wedget.FontTextView
android:id="@+id/id_tv_seed_price"
android:layout_width="@dimen/dp_50"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_6"
android:layout_marginRight="@dimen/dp_12"
android:layout_toRightOf="@+id/img_coin"
android:drawablePadding="4dp"
android:gravity="center"
android:includeFontPadding="false"
android:text="9999"
android:textColor="@color/white"
android:textSize="22sp" />
</RelativeLayout>
<ImageView
android:id="@+id/id_img_receive_seed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_10"
android:src="@mipmap/icon_free_get" />
<TextView
android:id="@+id/id_tv_seed_video_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:text="今天还剩1次"
android:textColor="#9C5900"
android:textSize="@dimen/sp_13" />
</LinearLayout>
</RelativeLayout>
<include layout="@layout/layout_base_feed_ad" />
</LinearLayout>
...@@ -9,10 +9,12 @@ ...@@ -9,10 +9,12 @@
android:paddingRight="@dimen/dp_25" android:paddingRight="@dimen/dp_25"
android:paddingBottom="@dimen/dp_21"> android:paddingBottom="@dimen/dp_21">
<TextView <com.ym.game.wedget.FontTextView
android:id="@+id/clock_in_item_title" android:id="@+id/clock_in_item_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textStyle="bold"
android:textColor="#04437F"
android:text="打卡满 打卡满 打卡满 " android:text="打卡满 打卡满 打卡满 "
android:textSize="16sp" /> android:textSize="16sp" />
...@@ -51,6 +53,8 @@ ...@@ -51,6 +53,8 @@
android:id="@+id/clock_in_item_desc" android:id="@+id/clock_in_item_desc"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="#666666"
android:textStyle="bold"
android:layout_below="@id/clock_in_item_progress_rl" android:layout_below="@id/clock_in_item_progress_rl"
android:text="打卡满 打卡满 打卡满 " android:text="打卡满 打卡满 打卡满 "
android:textSize="12sp" /> android:textSize="12sp" />
...@@ -75,7 +79,7 @@ ...@@ -75,7 +79,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignBottom="@id/clock_in_item_red_pack_img" android:layout_alignBottom="@id/clock_in_item_red_pack_img"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/dp_15" android:layout_marginBottom="@dimen/dp_12"
android:paddingRight="5dp" android:paddingRight="5dp"
android:text="100元" android:text="100元"
android:textColor="@color/white" android:textColor="@color/white"
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
<ImageView <ImageView
android:id="@+id/id_fruit_image" android:id="@+id/id_fruit_image"
android:layout_width="@dimen/dp_35" android:layout_width="@dimen/dp_40"
android:layout_height="@dimen/dp_35" android:layout_height="@dimen/dp_40"
android:layout_marginBottom="2dp" android:layout_marginBottom="2dp"
android:src="@mipmap/icon_flower_eight" /> android:src="@mipmap/icon_flower_eight" />
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
android:paddingTop="1dp" android:paddingTop="1dp"
android:paddingBottom="1dp" android:paddingBottom="1dp"
android:text="1/20" android:text="1/20"
android:textColor="#FFA33C0E" android:textColor="#A33C0E"
android:textSize="12sp" android:textSize="12.5sp"
android:textStyle="bold" /> android:textStyle="bold" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll_one" android:id="@+id/ll_one"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="76dp" android:layout_height="82dp"
android:background="@drawable/icon_luck_task"> android:background="@drawable/icon_luck_task">
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_15" android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_20" android:layout_marginTop="@dimen/dp_20"
android:orientation="vertical"> android:orientation="vertical">
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:includeFontPadding="false" android:includeFontPadding="false"
android:text="浇水10次" android:text="浇水10次"
android:textColor="#FF04437F" android:textColor="#04437F"
android:textSize="17sp" android:textSize="16sp"
android:textStyle="bold" /> android:textStyle="bold" />
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
android:id="@+id/progess_watering_item" android:id="@+id/progess_watering_item"
style="?android:attr/progressBarStyleHorizontal" style="?android:attr/progressBarStyleHorizontal"
android:layout_width="168dp" android:layout_width="168dp"
android:layout_height="wrap_content" android:layout_height="12dp"
android:layout_marginRight="3dp" android:layout_marginRight="3dp"
android:progressDrawable="@drawable/game_clock_in_item_progress_bg" /> android:progressDrawable="@drawable/game_clock_in_item_progress_bg" />
...@@ -77,8 +77,8 @@ ...@@ -77,8 +77,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_7" android:layout_marginTop="@dimen/dp_7"
android:text="浏览4篇资讯可领奖" android:text="浏览4篇资讯可领奖"
android:textColor="#FF02457F" android:textColor="#02457F"
android:textSize="@dimen/sp_12" /> android:textSize="@dimen/sp_14" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
...@@ -86,15 +86,15 @@ ...@@ -86,15 +86,15 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/dp_12" android:gravity="center_vertical"
android:layout_marginRight="@dimen/dp_20" android:layout_marginTop="@dimen/dp_8"
android:layout_marginBottom="@dimen/dp_7"> android:layout_marginRight="@dimen/dp_20">
<ImageView <ImageView
android:id="@+id/img_icon_item" android:id="@+id/img_icon_item"
android:layout_width="@dimen/dp_16" android:layout_width="@dimen/dp_20"
android:layout_height="@dimen/dp_16" android:layout_height="@dimen/dp_23"
android:layout_marginRight="@dimen/dp_3" android:layout_marginRight="@dimen/dp_1"
android:src="@drawable/icon_coin" /> android:src="@drawable/icon_coin" />
<TextView <TextView
...@@ -103,8 +103,8 @@ ...@@ -103,8 +103,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:includeFontPadding="false" android:includeFontPadding="false"
android:text="+100" android:text="+100"
android:textColor="#FC6002" android:textColor="#E52A12"
android:textSize="@dimen/sp_13" android:textSize="@dimen/sp_14"
android:textStyle="bold" /> android:textStyle="bold" />
</LinearLayout> </LinearLayout>
...@@ -114,7 +114,28 @@ ...@@ -114,7 +114,28 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_marginRight="20dp"
android:layout_marginBottom="12dp"
android:src="@mipmap/icon_mian_popup_complete"
android:visibility="visible" />
<TextView
android:id="@+id/tv_watering_item_timer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="16dp" android:layout_marginRight="16dp"
android:layout_marginBottom="12dp" android:layout_marginBottom="12dp"
android:src="@mipmap/icon_mian_popup_complete" /> android:background="@mipmap/task_timer_bg"
android:gravity="center"
android:visibility="gone"
android:includeFontPadding="false"
android:text="00:00:00"
android:textColor="@color/white"
android:textSize="@dimen/sp_14"
android:textStyle="bold" />
</RelativeLayout> </RelativeLayout>
...@@ -2,38 +2,37 @@ ...@@ -2,38 +2,37 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_welfare_item_bg" android:id="@+id/layout_welfare_item_bg"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_92" android:layout_height="82dp"
android:layout_marginBottom="@dimen/dp_10" android:layout_marginBottom="@dimen/dp_10"
android:background="@drawable/withdraw_bg" android:background="@drawable/withdraw_bg">
android:paddingLeft="@dimen/dp_11">
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="vertical" android:layout_marginLeft="@dimen/dp_20"
android:padding="@dimen/dp_10"> android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical"> android:gravity="center_vertical">
<com.ym.game.wedget.FontTextView <TextView
android:id="@+id/tv_welfare_item_title" android:id="@+id/tv_welfare_item_title"
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="浇水10次" android:text="浇水10次"
android:textColor="#FF04437F" android:textColor="#04437F"
android:textSize="17sp" android:textSize="16sp"
android:textStyle="bold"/> android:textStyle="bold"/>
<ImageView <ImageView
android:id="@+id/iv_welfare_item_title" android:id="@+id/iv_welfare_item_title"
android:layout_width="62dp" android:layout_width="62dp"
android:layout_height="17dp" android:layout_height="17dp"
android:layout_marginLeft="8dp" android:layout_marginLeft="4dp"
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>
...@@ -47,12 +46,11 @@ ...@@ -47,12 +46,11 @@
android:layout_marginTop="9dp" android:layout_marginTop="9dp"
android:includeFontPadding="false" android:includeFontPadding="false"
android:text="浏览60秒领取奖励" android:text="浏览60秒领取奖励"
android:textColor="#FF04437F" android:textColor="#02457F"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
...@@ -69,9 +67,9 @@ ...@@ -69,9 +67,9 @@
<ImageView <ImageView
android:id="@+id/img_icon_item" android:id="@+id/img_icon_item"
android:layout_width="wrap_content" android:layout_width="@dimen/dp_20"
android:layout_height="wrap_content" android:layout_height="@dimen/sp_17"
android:layout_marginRight="@dimen/dp_3" android:layout_marginRight="@dimen/dp_1"
android:src="@drawable/icon_welfare_diamond" /> android:src="@drawable/icon_welfare_diamond" />
<TextView <TextView
...@@ -79,8 +77,8 @@ ...@@ -79,8 +77,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="+0g" android:text="+0g"
android:textColor="#FF5A44" android:textColor="#E52A12"
android:textSize="15sp" android:textSize="14sp"
android:textStyle="bold" /> android:textStyle="bold" />
</LinearLayout> </LinearLayout>
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/item_recycler_fruit_list" android:id="@+id/item_recycler_fruit_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_marginLeft="@dimen/dp_20" android:layout_marginLeft="@dimen/dp_8"
android:layout_marginRight="@dimen/dp_20" android:layout_marginRight="@dimen/dp_8"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1" />
......
...@@ -7,26 +7,32 @@ ...@@ -7,26 +7,32 @@
android:background="@mipmap/icon_bg_jilu" android:background="@mipmap/icon_bg_jilu"
android:paddingLeft="20dp"> android:paddingLeft="20dp">
<com.ym.game.wedget.FontTextView <LinearLayout
android:id="@+id/tv_record_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="13dp"
android:textColor="#04437F"
android:textStyle="bold"
android:textSize="16sp"
tools:text="新手专享提现" />
<TextView
android:id="@+id/tv_record_time"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tv_record_title" android:layout_centerVertical="true"
android:layout_marginTop="11dp" android:orientation="vertical">
android:layout_marginBottom="13dp"
android:textColor="#006EC7" <com.ym.game.wedget.FontTextView
android:textSize="14sp" android:id="@+id/tv_record_title"
tools:text="2020-8-27" /> android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#04437F"
android:textSize="16sp"
android:textStyle="bold"
tools:text="新手专享提现" />
<TextView
android:id="@+id/tv_record_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_record_title"
android:layout_marginTop="11dp"
android:textColor="#006EC7"
android:textSize="14sp"
tools:text="2020-8-27" />
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -41,21 +47,21 @@ ...@@ -41,21 +47,21 @@
android:id="@+id/tv_record_money" android:id="@+id/tv_record_money"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_8"
android:includeFontPadding="false" android:includeFontPadding="false"
android:textStyle="bold"
android:textColor="#E54D24" android:textColor="#E54D24"
android:textSize="22sp" android:textSize="22sp"
android:layout_marginBottom="@dimen/dp_8" android:textStyle="bold"
tools:text="0.3元" /> tools:text="0.3元" />
<com.ym.game.wedget.FontTextView <com.ym.game.wedget.FontTextView
android:id="@+id/tv_record_status" android:id="@+id/tv_record_status"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textStyle="bold"
android:includeFontPadding="false" android:includeFontPadding="false"
android:textColor="#2CB531" android:textColor="#2CB531"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold"
tools:text="0.3元" /> tools:text="0.3元" />
</LinearLayout> </LinearLayout>
......
...@@ -105,11 +105,11 @@ ...@@ -105,11 +105,11 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tv_task_title" android:layout_below="@+id/tv_task_title"
android:layout_marginTop="@dimen/dp_33" android:layout_marginTop="@dimen/dp_28"
android:layout_marginBottom="@dimen/dp_15" android:layout_marginBottom="@dimen/dp_15"
android:orientation="vertical" android:orientation="vertical"
android:paddingLeft="@dimen/dp_16" android:paddingLeft="@dimen/dp_26"
android:paddingRight="@dimen/dp_16"> android:paddingRight="@dimen/dp_26">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -47,14 +47,16 @@ ...@@ -47,14 +47,16 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tv_task_title" android:layout_below="@+id/tv_task_title"
android:layout_marginTop="@dimen/dp_28"
android:layout_marginBottom="@dimen/dp_15" android:layout_marginBottom="@dimen/dp_15"
android:orientation="vertical" android:orientation="vertical"
android:padding="@dimen/dp_10"> android:paddingLeft="@dimen/dp_26"
android:paddingRight="@dimen/dp_26">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="85dp" android:layout_height="82dp"
android:layout_margin="@dimen/dp_10" android:layout_marginBottom="@dimen/dp_10"
android:background="@drawable/background_border_pop_item" android:background="@drawable/background_border_pop_item"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
...@@ -64,7 +66,7 @@ ...@@ -64,7 +66,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="14dp" android:layout_marginLeft="12dp"
android:layout_marginRight="8dp" android:layout_marginRight="8dp"
android:src="@drawable/icon_welfare_diamond_big" /> android:src="@drawable/icon_welfare_diamond_big" />
...@@ -84,8 +86,8 @@ ...@@ -84,8 +86,8 @@
android:layout_marginBottom="12dp" android:layout_marginBottom="12dp"
android:includeFontPadding="false" android:includeFontPadding="false"
android:text="集齐20颗钻石可获得宝箱" android:text="集齐20颗钻石可获得宝箱"
android:textColor="#663408" android:textColor="#04437F"
android:textSize="16sp" /> android:textSize="14sp" />
<RelativeLayout <RelativeLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -127,8 +129,8 @@ ...@@ -127,8 +129,8 @@
android:id="@+id/iv_welfare_reward_red_pg" android:id="@+id/iv_welfare_reward_red_pg"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_20" android:layout_marginLeft="@dimen/dp_15"
android:layout_marginRight="@dimen/dp_15" android:layout_marginRight="@dimen/dp_10"
android:layout_toRightOf="@+id/layout_welfare_progress" android:layout_toRightOf="@+id/layout_welfare_progress"
android:background="@mipmap/clock_in_red_pack" android:background="@mipmap/clock_in_red_pack"
android:gravity="center|bottom" android:gravity="center|bottom"
...@@ -145,10 +147,7 @@ ...@@ -145,10 +147,7 @@
<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_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_10" />
</LinearLayout> </LinearLayout>
......
PACKAGE_NAME=com.ym.xynt PACKAGE_NAME=com.ym.xynt
VERSION_CODE=1 VERSION_CODE=2
VERSION_NAME=1.0.0 VERSION_NAME=1.0.1
\ No newline at end of file \ No newline at end of file
...@@ -67,7 +67,7 @@ dependencies { ...@@ -67,7 +67,7 @@ dependencies {
// api ("com.bx:adsdk:1.3.3"){ // api ("com.bx:adsdk:1.3.3"){
// exclude group: 'com.google.code.gson' // exclude group: 'com.google.code.gson'
// } // }
api 'com.ym.admodule:admodule:1.0.3.28' api 'com.ym.admodule:admodule:1.0.3.40'
api 'com.airbnb.android:lottie:3.1.0' api 'com.airbnb.android:lottie:3.1.0'
api 'com.google.zxing:core:3.2.1' //zxing核心依赖 api 'com.google.zxing:core:3.2.1' //zxing核心依赖
api 'com.journeyapps:zxing-android-embedded:3.3.0' //生成二维码依赖 api 'com.journeyapps:zxing-android-embedded:3.3.0' //生成二维码依赖
......
...@@ -23,9 +23,9 @@ public class MyConstant { ...@@ -23,9 +23,9 @@ public class MyConstant {
// public static final String WX_APPID = "wx4d3a3aa6fb634c17";//1.0.0版本使用的微信appid // public static final String WX_APPID = "wx4d3a3aa6fb634c17";//1.0.0版本使用的微信appid
// public static final String WX_APPKEY = "7c98910f81dc3cec4b992d722bdcbaf3";//1.0.0版本使用的微信key // public static final String WX_APPKEY = "7c98910f81dc3cec4b992d722bdcbaf3";//1.0.0版本使用的微信key
public static String WX_APPID = "wx807bc179331f37a6"; public static String WX_APPID = "wx21eef1b1b33e2ccd";
// public static String WX_APPID = "wxcd4157d1e36f5cd8"; // public static String WX_APPID = "wxcd4157d1e36f5cd8";
public static String WX_APPKEY = "7a9ab9dbc24a03504030762b91e833b8"; public static String WX_APPKEY = "dff00145f278fc1b808197a68e8cb5db";
public static String WX_SHARE_APPID = "34fd25bb46e96eb3de04bd0c0e031e22"; public static String WX_SHARE_APPID = "34fd25bb46e96eb3de04bd0c0e031e22";
public static String WX_SHARE_APPKEY = "34fd25bb46e96eb3de04bd0c0e031e22"; public static String WX_SHARE_APPKEY = "34fd25bb46e96eb3de04bd0c0e031e22";
public static final String SHANYAN_KEY = "7QciptTf"; public static final String SHANYAN_KEY = "7QciptTf";
......
...@@ -140,6 +140,7 @@ class NewWebActivity : MyBaseActivity(), NewWebContract.View, ScrollWebView.OnSc ...@@ -140,6 +140,7 @@ class NewWebActivity : MyBaseActivity(), NewWebContract.View, ScrollWebView.OnSc
private var isOpen = true private var isOpen = true
private var showNewCoinsDialog: Dialog? = null private var showNewCoinsDialog: Dialog? = null
@RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1) @RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
override fun showCoinsDialog(coins: Int, value: String) { override fun showCoinsDialog(coins: Int, value: String) {
// showCoins(coins) // showCoins(coins)
...@@ -185,7 +186,7 @@ class NewWebActivity : MyBaseActivity(), NewWebContract.View, ScrollWebView.OnSc ...@@ -185,7 +186,7 @@ class NewWebActivity : MyBaseActivity(), NewWebContract.View, ScrollWebView.OnSc
id_activity_web_bottom_progress?.visibility = View.VISIBLE id_activity_web_bottom_progress?.visibility = View.VISIBLE
} }
override fun setCurrentNum(award: Int,num: Int,title: String) { override fun setCurrentNum(award: Int, num: Int, title: String) {
if (award > 0 && num >= award) {//奖励目标数大于0 且 已看数量大于目标数量,不展示退出挽留弹窗 if (award > 0 && num >= award) {//奖励目标数大于0 且 已看数量大于目标数量,不展示退出挽留弹窗
isAdds = true isAdds = true
} }
...@@ -374,7 +375,9 @@ class NewWebActivity : MyBaseActivity(), NewWebContract.View, ScrollWebView.OnSc ...@@ -374,7 +375,9 @@ class NewWebActivity : MyBaseActivity(), NewWebContract.View, ScrollWebView.OnSc
RxBusUtil.getDefault() RxBusUtil.getDefault()
.send(RxBusConstant.RX_SPEED_WATER_TASK_LIST) .send(RxBusConstant.RX_SPEED_WATER_TASK_LIST)
RxBusUtil.getDefault() RxBusUtil.getDefault()
.send( RX_MAIN_WATER_DROP_UPDATE) .send(RX_MAIN_WATER_DROP_UPDATE)
RxBusUtil.getDefault()
.send(RxBusConstant.RX_MAIN_WELFARE_UPDATE)
MobclickAgent.onPause(this) MobclickAgent.onPause(this)
// EventUtils.onEvent("page_status", Utils.obj2Str(ReportEntity(Constant.ReportSessionId, "NewWebActivity", "onPause"))) // EventUtils.onEvent("page_status", Utils.obj2Str(ReportEntity(Constant.ReportSessionId, "NewWebActivity", "onPause")))
if (webview != null) { if (webview != null) {
......
...@@ -441,6 +441,8 @@ class WebActivity : MyBaseActivity(), View.OnClickListener { ...@@ -441,6 +441,8 @@ class WebActivity : MyBaseActivity(), View.OnClickListener {
.send(RxBusConstant.RX_SPEED_WATER_TASK_LIST) .send(RxBusConstant.RX_SPEED_WATER_TASK_LIST)
RxBusUtil.getDefault() RxBusUtil.getDefault()
.send(RxBusConstant.RX_MAIN_WATER_DROP_UPDATE) .send(RxBusConstant.RX_MAIN_WATER_DROP_UPDATE)
RxBusUtil.getDefault()
.send(RxBusConstant.RX_MAIN_WELFARE_UPDATE)
} }
private fun queryTask() { private fun queryTask() {
......
...@@ -5,7 +5,7 @@ class ExchangeEntity { ...@@ -5,7 +5,7 @@ class ExchangeEntity {
var status: Int? = 0 var status: Int? = 0
var reason: String? = "" var reason: String? = ""
var buttonText: String? = "" var buttonText: String? = ""
var CashText: String? = "" var cashText: String? = ""
var buttonStatus: Int? = 0 var buttonStatus: Int? = 0
var title: String? = "" var title: String? = ""
var type: Int? = 0 var type: Int? = 0
......
...@@ -42,8 +42,17 @@ public class GameDuiHuanShopEntity { ...@@ -42,8 +42,17 @@ public class GameDuiHuanShopEntity {
private Object targetNum; private Object targetNum;
private int completeNum; private int completeNum;
private int currentNum; private int currentNum;
private int wdCount;
private List<NeedPlantListBean> needPlantList; private List<NeedPlantListBean> needPlantList;
public int getWdCount() {
return wdCount;
}
public void setWdCount(int wdCount) {
this.wdCount = wdCount;
}
public int getId() { public int getId() {
return id; return id;
} }
......
...@@ -14,10 +14,27 @@ public class HomeInfoEntity { ...@@ -14,10 +14,27 @@ public class HomeInfoEntity {
*/ */
private int acceleratorsNum; private int acceleratorsNum;
private int isNewUser;
private int useFertilizeCountdownSecond; private int useFertilizeCountdownSecond;
private String headImageUrl; private String headImageUrl;
private String clockInText; private String clockInText;
public int getIsNewUser() {
return isNewUser;
}
public void setIsNewUser(int isNewUser) {
this.isNewUser = isNewUser;
}
public int getUseFertilizeCountdownSecond() {
return useFertilizeCountdownSecond;
}
public void setUseFertilizeCountdownSecond(int useFertilizeCountdownSecond) {
this.useFertilizeCountdownSecond = useFertilizeCountdownSecond;
}
public int getAcceleratorsNum() { public int getAcceleratorsNum() {
return acceleratorsNum; return acceleratorsNum;
} }
......
...@@ -33,6 +33,7 @@ class WithdrawEntity { ...@@ -33,6 +33,7 @@ class WithdrawEntity {
var buttonStatus: Int? = 0 //按钮跳转 0 不跳转 1 福利页 2 首页 var buttonStatus: Int? = 0 //按钮跳转 0 不跳转 1 福利页 2 首页
var ext: Ext? = null var ext: Ext? = null
var buttonText: String? = "" var buttonText: String? = ""
var cashText: String? = ""
var isWelfarePage = false var isWelfarePage = false
var isHomePage = false var isHomePage = false
var awardNum:String = "" var awardNum:String = ""
......
...@@ -246,6 +246,11 @@ interface IGameApi { ...@@ -246,6 +246,11 @@ interface IGameApi {
*/ */
@POST(NetConfig.Task.TASK_COMPLETE_TASK) @POST(NetConfig.Task.TASK_COMPLETE_TASK)
fun getTaskComplete(@Query("id") sid: Int): Observable<Response<TaskCompleteEntity>> fun getTaskComplete(@Query("id") sid: Int): Observable<Response<TaskCompleteEntity>>
/**
* 福利任务页列表
*/
@POST(NetConfig.Task.WELFARE_TASK_COMPLETE_TASK)
fun getWelfareTaskComplete(@Query("id") sid: Int): Observable<Response<TaskCompleteEntity>>
/** /**
* 任务页列表 * 任务页列表
......
...@@ -92,6 +92,7 @@ public class NetConfig { ...@@ -92,6 +92,7 @@ public class NetConfig {
public static final String URL_TASK_QUERYTASK = "api/v1/userTask/getAdStatus"; public static final String URL_TASK_QUERYTASK = "api/v1/userTask/getAdStatus";
public static final String TASK_URL = "app/v2/novel/taskListWithStat";//任务列表 public static final String TASK_URL = "app/v2/novel/taskListWithStat";//任务列表
public static final String TASK_COMPLETE_TASK = "app/v1/game/complete-task";//任务领取 public static final String TASK_COMPLETE_TASK = "app/v1/game/complete-task";//任务领取
public static final String WELFARE_TASK_COMPLETE_TASK = "app/v1/game/xynt/task/complete_welfare_task";//福利任务领取
public static final String DAILY_CASH_WD_LIST = "app/v1/game/bbnc/day_wd_list";//任务领取 public static final String DAILY_CASH_WD_LIST = "app/v1/game/bbnc/day_wd_list";//任务领取
} }
...@@ -147,7 +148,7 @@ public class NetConfig { ...@@ -147,7 +148,7 @@ public class NetConfig {
public static final String URL_USER_GS_PAGE_INFO = "app/v1/gs/gs_page_info";//用户剩余货币 public static final String URL_USER_GS_PAGE_INFO = "app/v1/gs/gs_page_info";//用户剩余货币
public static final String URL_USER_GS_DO_WD = "app/v1/game/bbnc/do_wd";//提现 public static final String URL_USER_GS_DO_WD = "app/v1/game/bbnc/do_wd";//提现
public static final String URL_USER_GS_COIN2CASH = "app/v1/gs/coin2cash";//金币兑换现金 public static final String URL_USER_GS_COIN2CASH = "app/v1/gs/coin2cash";//金币兑换现金
public static final String URL_USER_WD_HISTORY = "app/v1/game/bbnc/wd_history";//提现记录 public static final String URL_USER_WD_HISTORY = "app/v1/game/xynt/wd_history";//提现记录
public static final String URL_USER_GS_DO_LOTTERY_WD = "app/v2/game/lottery_wd";//我的抽奖提现 public static final String URL_USER_GS_DO_LOTTERY_WD = "app/v2/game/lottery_wd";//我的抽奖提现
} }
...@@ -160,15 +161,8 @@ public class NetConfig { ...@@ -160,15 +161,8 @@ public class NetConfig {
public static final String URL_GET_ADS_V3 = "v4/ads"; public static final String URL_GET_ADS_V3 = "v4/ads";
public static class Game { public static class Game {
public static final String URL_GAME_BUY_SEED = "app/v1/game/farm/buy_seed";//金币购买种子
public static final String URL_GAME_CLOUD_SPEED = "app/v1/game/farm/cloud_speed";//云朵加速 public static final String URL_GAME_CLOUD_SPEED = "app/v1/game/farm/cloud_speed";//云朵加速
// public static final String URL_GAME_LIST_LAND = "app/v1/game/farm/list_land";//菜园地块列表
public static final String URL_GAME_ORDER_RECEIVE = "app/v1/game/farm/order_receive";//订单领取 public static final String URL_GAME_ORDER_RECEIVE = "app/v1/game/farm/order_receive";//订单领取
// public static final String URL_GAME_UNLOCK_LAND = "app/v1/game/farm/unlock_land";//解锁地块/种植种子/收获果实
public static final String URL_GAME_WAREHOUSE_DATA = "app/v1/game/farm/warehouseData";//仓库列表 public static final String URL_GAME_WAREHOUSE_DATA = "app/v1/game/farm/warehouseData";//仓库列表
public static final String URL_GAME_TURNTABLE_LIST = "app/v1/game/farm/turntable_list";//转盘列表 public static final String URL_GAME_TURNTABLE_LIST = "app/v1/game/farm/turntable_list";//转盘列表
public static final String URL_GAME_FARM_LOTTERY = "app/v1/game/ddcy/lottery";//转盘抽奖 public static final String URL_GAME_FARM_LOTTERY = "app/v1/game/ddcy/lottery";//转盘抽奖
...@@ -182,8 +176,6 @@ public class NetConfig { ...@@ -182,8 +176,6 @@ public class NetConfig {
public static final String URL_GAME_FARM_RANK_RECEIVE = "app/v1/game/farm/rank_receive";//排行榜领取 public static final String URL_GAME_FARM_RANK_RECEIVE = "app/v1/game/farm/rank_receive";//排行榜领取
public static final String URL_GAME_THIRD_PARTY = "app/v1/game/third_party";//加速剂任务看视频 public static final String URL_GAME_THIRD_PARTY = "app/v1/game/third_party";//加速剂任务看视频
// public static final String URL_GAME_WITHDRAW_LIST = "app/v1/game/ddcy/withdraw_list";//兑换列表
// public static final String URL_GAME_DOWD = "app/v1/game/ddcy/do_wd";//兑换接口
public static final String URL_GAME_WD_HISTORY = "app/v1/game/ddcy/wd_history";//兑换记录 public static final String URL_GAME_WD_HISTORY = "app/v1/game/ddcy/wd_history";//兑换记录
public static final String URL_GAME_ACCELERATORS_TASK_RECEIVE = "app/v1/game/ddcy/accelerators_task_receiveV2";//加速剂任务领取 public static final String URL_GAME_ACCELERATORS_TASK_RECEIVE = "app/v1/game/ddcy/accelerators_task_receiveV2";//加速剂任务领取
public static final String URL_GAME_USER_GUIDE = "app/v1/game/ddcy/user_guide"; public static final String URL_GAME_USER_GUIDE = "app/v1/game/ddcy/user_guide";
...@@ -191,36 +183,17 @@ public class NetConfig { ...@@ -191,36 +183,17 @@ public class NetConfig {
public static final String URL_GAME_RED_PACK_LIST="app/v1/game/farm/rp_list";//红包列表 public static final String URL_GAME_RED_PACK_LIST="app/v1/game/farm/rp_list";//红包列表
public static final String URL_GAME_RED_PACK_RECEIVE="app/v1/game/farm/rp/receive";//拆红包 参数传红包id public static final String URL_GAME_RED_PACK_RECEIVE="app/v1/game/farm/rp/receive";//拆红包 参数传红包id
public static final String URL_GAME_RED_PACK_AWARD_RECEIVE="app/v3/common/award/multiple";//翻倍领取接口 public static final String URL_GAME_RED_PACK_AWARD_RECEIVE="app/v3/common/award/multiple";//翻倍领取接口
public static final String URL_GAME_CLOUD_CHECK = "app/v1/game/farm/cloud_check";//云朵加速判断
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_DO_WD = "app/v1/game/ddcy/clock_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_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_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_AUTOMATIC = "app/v1/collect-card/automatic";//已有的卡片自动拼接到宝箱上
public static final String URL_COLLECT_CARD_OPEN = "app/v1/collect-card/open";//开宝箱 public static final String URL_COLLECT_CARD_OPEN = "app/v1/collect-card/open";//开宝箱
// public static final String URL_COLLECT_CARD_ADV_PUT_OR_ADD = "app/v1/collect-card/advPutOrAdd";//看广告单个图片获取或者拼图
// public static final String URL_COLLECT_CARD_ADD_CARD = "app/v1/collect-card/addCard";//收金币获得卡片
// public static final String URL_GAME_HOME_WD_LIST = "app/v1/game/ddcy/home_wd_list";//首页展示果实列表
public static final String URL_CLOCK_BOX_RECEIVE = "app/v1/game/ddcy/clock_box_receive";//打卡普通打卡任务领取 public static final String URL_CLOCK_BOX_RECEIVE = "app/v1/game/ddcy/clock_box_receive";//打卡普通打卡任务领取
public static final String URL_GAME_VIDEO_TASK_COMPLETE = "app/v1/game/video_task_complete";//看领金币视频任务 public static final String URL_GAME_VIDEO_TASK_COMPLETE = "app/v1/game/video_task_complete";//看领金币视频任务
//=========================================花园========================================= //=========================================花园=========================================
// public static final String URL_GAME_LIST_LAND = "app/v1/game/ddhy/list_land";//花园地块列表
// public static final String URL_GAME_UNLOCK_LAND = "app/v1/game/ddhy/unlock_land";//花园 解锁地块/种植种子/收获果实
public static final String URL_GAME_UNLOCK_LAND = "app/v1/game/ddhy/unlock_land_V2";//花园 解锁地块/种植种子/收获果实/解锁倒计时
public static final String URL_GAME_ORDER_LIST = "app/v1/game/msdh/list_order";//花园 订单列表 public static final String URL_GAME_ORDER_LIST = "app/v1/game/msdh/list_order";//花园 订单列表
public static final String URL_GAME_WITHDRAW_LIST = "app/v1/game/bbnc/exchange_list";//兑换列表 public static final String URL_GAME_WITHDRAW_LIST = "app/v1/game/bbnc/exchange_list";//兑换列表
...@@ -246,13 +219,12 @@ public class NetConfig { ...@@ -246,13 +219,12 @@ public class NetConfig {
public static final String URL_GAME_USE_ACCELERATORS = "app/v1/game/xynt/use_accelerators";//加速剂 public static final String URL_GAME_USE_ACCELERATORS = "app/v1/game/xynt/use_accelerators";//加速剂
public static final String URL_GAME_USE_FERTILIZE = "app/v1/game/xynt/use_fertilize";//肥料 public static final String URL_GAME_USE_FERTILIZE = "app/v1/game/xynt/use_fertilize";//肥料
public static final String URL_GAME_VIDEO_STATUS = "app/v1/game/reward_video/status";//视频状态 public static final String URL_GAME_VIDEO_STATUS = "app/v1/game/reward_video/status";//视频状态
public static final String URL_GAME_AD_VIDEO_REPORT = "app/v2/game/report";//看视频上报 public static final String URL_GAME_AD_VIDEO_REPORT = "app/v1/game/report";//看视频上报
public static final String URL_GAME_OPEN_BOX = "app/v1/game/xynt/box_reward";//开宝箱 public static final String URL_GAME_OPEN_BOX = "app/v1/game/xynt/box_reward";//开宝箱
public static final String URL_GAME_INCR_ACCELERATORS = "app/v1/game/xynt/receive_accelerators_by_video";//看视频获得加速剂 public static final String URL_GAME_INCR_ACCELERATORS = "app/v1/game/xynt/receive_accelerators_by_video";//看视频获得加速剂
public static final String URL_GAME_INCR_CLEAN_BUG = "app/v1/game/xynt/receive_clear_bug_by_video";//看视频领取杀虫剂接口 public static final String URL_GAME_INCR_CLEAN_BUG = "app/v1/game/xynt/receive_clear_bug_by_video";//看视频领取杀虫剂接口
public static final String URL_GAME_CAN_USE_FER = "app/v1/game/xynt/can_user_fertilize";//判断施肥可以使用化肥 public static final String URL_GAME_CAN_USE_FER = "app/v1/game/xynt/can_user_fertilize";//判断施肥可以使用化肥
public static final String URL_GAME_DOWD = "app/v1/game/xynt/wd/order_wd";//兑换接口 public static final String URL_GAME_DOWD = "app/v1/game/xynt/wd/order_wd";//兑换接口
//看广告间隔 public static final String URL_GAME_WELFARE_TASK_CASH = "app/v1/game/task_cash";//福利中心红包领取
public static final String URL_GAME_AD_TIME_CD = "app/v1/game/video_cd";
} }
} }
...@@ -357,9 +357,9 @@ class SplashPresenter : SplashContract.Presenter { ...@@ -357,9 +357,9 @@ class SplashPresenter : SplashContract.Presenter {
// Constant.Param.env = CesCore.getInstance().Ckwork(SettingPreference.getAndroidId()) // Constant.Param.env = CesCore.getInstance().Ckwork(SettingPreference.getAndroidId())
// } // }
// } // }
deviceLogin() // deviceLogin()
// getUserInfo() // getUserInfo()
// mView.jumpPage() mView.jumpPage()
} }
private fun deviceLogin() { private fun deviceLogin() {
......
...@@ -38,6 +38,8 @@ public class RxBusConstant { ...@@ -38,6 +38,8 @@ public class RxBusConstant {
public final static int RX_MAIN_UPDATE_HOME_INFO = 10005; public final static int RX_MAIN_UPDATE_HOME_INFO = 10005;
//MainFragment 每日水滴领取后刷新 //MainFragment 每日水滴领取后刷新
public final static int RX_MAIN_WATER_DROP_UPDATE = 10008; public final static int RX_MAIN_WATER_DROP_UPDATE = 10008;
//福利任务弹窗
public final static int RX_MAIN_WELFARE_UPDATE = 20001;
//MainFragment 高额水滴领取后刷新 //MainFragment 高额水滴领取后刷新
public final static int RX_MAIN_HIGH_WATER_DROP_UPDATE = 10004; public final static int RX_MAIN_HIGH_WATER_DROP_UPDATE = 10004;
......
...@@ -22,7 +22,7 @@ object AdUtils { ...@@ -22,7 +22,7 @@ object AdUtils {
var handler = object : Handler() { var handler = object : Handler() {
override fun handleMessage(msg: Message?) { override fun handleMessage(msg: Message?) {
super.handleMessage(msg) super.handleMessage(msg)
when(msg?.what) { when (msg?.what) {
0 -> { 0 -> {
if (activity != null) { if (activity != null) {
AdManager.loadNextCacheRewardVideoAd(ADConfig.AD_REWARD_VIDIO, activity!!) AdManager.loadNextCacheRewardVideoAd(ADConfig.AD_REWARD_VIDIO, activity!!)
...@@ -57,6 +57,7 @@ object AdUtils { ...@@ -57,6 +57,7 @@ object AdUtils {
} }
override fun onAdShow() { override fun onAdShow() {
EventRepore(actionName)
Utils.showToast(activity, "看完视频可获得奖励") Utils.showToast(activity, "看完视频可获得奖励")
handler?.sendEmptyMessageDelayed(0, 2000) handler?.sendEmptyMessageDelayed(0, 2000)
} }
...@@ -84,7 +85,7 @@ object AdUtils { ...@@ -84,7 +85,7 @@ object AdUtils {
view?.postDelayed({ view?.postDelayed({
loadFeedCacheAdToCache(activity) loadFeedCacheAdToCache(activity)
},1500) }, 1500)
} }
//预加载激励 //预加载激励
...@@ -96,26 +97,12 @@ object AdUtils { ...@@ -96,26 +97,12 @@ object AdUtils {
fun loadFeedCacheAdToCache(activity: Activity) { fun loadFeedCacheAdToCache(activity: Activity) {
AdManager.loadFeedAdToCache( AdManager.loadFeedAdToCache(
ADConfig.AD_IMG_FADE, activity, ZXADSizeConfig( ADConfig.AD_IMG_FADE, activity, ZXADSizeConfig(
Utils.px2dip(PhoneUtils.getScreenWidth(activity).toFloat()) - 10, 280) Utils.px2dip(PhoneUtils.getScreenWidth(activity).toFloat()) - 10, 280
)
) )
} }
//看视频领上报 //看视频上报
fun getVideoAcceleratorsReceive() {
GameApiClient.gameApi.adVideoReport()
.compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<StatusEntity>() {
override fun onSuccess(result: StatusEntity?) {
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
}
})
}
//看视频复活上报
fun getVideoAcceleratorsReceive(slot: String) { fun getVideoAcceleratorsReceive(slot: String) {
GameApiClient.gameApi.adVideoReport(slot) GameApiClient.gameApi.adVideoReport(slot)
.compose(RxSchedulers.observableIO2Main()) .compose(RxSchedulers.observableIO2Main())
...@@ -129,4 +116,33 @@ object AdUtils { ...@@ -129,4 +116,33 @@ object AdUtils {
} }
}) })
} }
fun EventRepore(actionName: String) {
EventUtils.onEvent("video_show","所有激励视频曝光")
//
if (actionName == "UNLOCK_LAND") {
EventUtils.onEvent("unlock_video_show","解锁土地视频曝光")
}
if (actionName == "FERTILIZE_REWARD") {
EventUtils.onEvent("allspeedup_video_show","施肥视频曝光")
}
if (actionName == "ACCELERATORS_REWARD") {
EventUtils.onEvent("speedup_video_show","获得营养液视频曝光")
}
if (actionName == "CLEAR_BUG_REWARD") {
EventUtils.onEvent("stop_video_show","获得杀虫剂视频曝光")
}
if (actionName == "VIDEO_FAIRY") {
EventUtils.onEvent("flower_video_show","花仙视频曝光")
}
if (actionName == "BOX_REWARD") {
EventUtils.onEvent("box_video_show","宝箱视频曝光")
}
if (actionName == "ACCELERATORS_TASK") {
EventUtils.onEvent("task_daily_video_show","领营养液任务视频曝光")
}
if (actionName == "WELFARE_TASK") {
EventUtils.onEvent("task_senior_video_show","福利任务视频曝光")
}
}
} }
\ No newline at end of file
...@@ -398,7 +398,7 @@ object CenterDialog : BaseDialog() { ...@@ -398,7 +398,7 @@ object CenterDialog : BaseDialog() {
val tvGetDropCount = mDialogView?.findViewById<TextView>(R.id.tv_get_count) val tvGetDropCount = mDialogView?.findViewById<TextView>(R.id.tv_get_count)
val layoutAd = mDialogView?.findViewById<FrameLayout>(R.id.layout_feed_ad) val layoutAd = mDialogView?.findViewById<FrameLayout>(R.id.layout_feed_ad)
tvGetDropCount.text = "+${rewardCount}" tvGetDropCount.text = "钻石x${rewardCount}"
AdUtils.showFeedAd(context,actionName,layoutAd) AdUtils.showFeedAd(context,actionName,layoutAd)
FilterUtils.addClickAlpha(btn_get_diamand) FilterUtils.addClickAlpha(btn_get_diamand)
......
...@@ -4,14 +4,14 @@ import android.graphics.Color ...@@ -4,14 +4,14 @@ import android.graphics.Color
import android.graphics.PorterDuff import android.graphics.PorterDuff
import android.graphics.drawable.Drawable import android.graphics.drawable.Drawable
import android.view.MotionEvent import android.view.MotionEvent
import android.view.View
import android.widget.ImageView import android.widget.ImageView
object FilterUtils { object FilterUtils {
/** /**
* 点击效果 * 点击效果
*/ */
fun addClickAlpha(view: ImageView) { fun addClickAlpha(view: View) {
view.setOnTouchListener { _, event -> view.setOnTouchListener { _, event ->
when (event.action) { when (event.action) {
MotionEvent.ACTION_DOWN -> { MotionEvent.ACTION_DOWN -> {
...@@ -30,25 +30,32 @@ object FilterUtils { ...@@ -30,25 +30,32 @@ object FilterUtils {
/** /**
* 设置滤镜 * 设置滤镜
*/ */
private fun setFilter(view: ImageView) { private fun setFilter(view: View) {
//先获取设置的src图片 var drawable: Drawable? = null
var drawable: Drawable? = view?.getDrawable() if (view is ImageView) {
//先获取设置的src图片
drawable = view?.getDrawable()
}
//当src图片为Null,获取背景图片 //当src图片为Null,获取背景图片
if (drawable == null) { if (drawable == null) {
drawable = view?.getBackground() drawable = view?.getBackground()
} }
if (drawable != null) { if (drawable != null) {
//设置滤镜 //设置滤镜
drawable.setColorFilter(Color.GRAY, PorterDuff.Mode.MULTIPLY) drawable?.setColorFilter(Color.GRAY, PorterDuff.Mode.MULTIPLY)
} }
} }
/** /**
* 清除滤镜 * 清除滤镜
*/ */
private fun removeFilter(view: ImageView) { private fun removeFilter(view: View) {
//先获取设置的src图片 var drawable: Drawable? = null
var drawable: Drawable? = view?.getDrawable() if (view is ImageView) {
//先获取设置的src图片
drawable = view?.getDrawable()
}
//当src图片为Null,获取背景图片 //当src图片为Null,获取背景图片
if (drawable == null) { if (drawable == null) {
drawable = view?.getBackground() drawable = view?.getBackground()
......
package com.ym.library.widget;
import android.content.Context;
import android.graphics.Typeface;
import android.util.AttributeSet;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatTextView;
/**
* Craeted by ${junqi.li}
* Craeted by 2020/9/4
* 带有“方正粗圆简体”的样式
*/
public class FontTextView extends AppCompatTextView {
public FontTextView(Context context) {
this(context, null);
}
public FontTextView(Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
public FontTextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
Typeface typeface = Typeface.createFromAsset(context.getAssets(), "fonts/founder_thick_round_simplified.ttf");
setTypeface(typeface);
}
}
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
android:layout_marginRight="-4dp" android:layout_marginRight="-4dp"
android:src="@drawable/icon_new_close" /> android:src="@drawable/icon_new_close" />
<TextView <com.ym.library.widget.FontTextView
android:id="@+id/id_tv_gongxi_get" android:id="@+id/id_tv_gongxi_get"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
android:background="@drawable/icon_tv_bg2" android:background="@drawable/icon_tv_bg2"
android:gravity="center" android:gravity="center"
android:textColor="#FF04437F" android:textColor="#FF04437F"
android:textSize="30sp" android:textSize="18sp"
android:textStyle="bold" android:textStyle="bold"
tools:text="+1" /> tools:text="+1" />
</LinearLayout> </LinearLayout>
......
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