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

[提交人]:王雪伟

[提交简述] :幸运农田
[实现方案] :1.0.1
parent e779ca1a
......@@ -31,7 +31,7 @@ class ClockInWithdrawActitivy : MyBaseActivity(), ClockInWithdrawContract.View,
}
override fun init() {
EventUtils.onEvent("daka_show")
EventUtils.onEvent("checkin_show")
mPresenter = ClockInWithdrawPresenter(this)
iv_clock_in_close?.setOnClickListener {
finish()
......@@ -55,19 +55,21 @@ class ClockInWithdrawActitivy : MyBaseActivity(), ClockInWithdrawContract.View,
mData = data
if (!isClick) {
isClick = true
if (data.special == 1) {
EventUtils.onEvent("daka_hongbao_click")
mPresenter?.getFlyBoxReceive(this)
} else if (data.special == 2) {
EventUtils.onEvent("daka_tixian_click")
mPresenter?.getDoWd(data.id!!)
}
EventUtils.onEvent("checkin_cashout_click")
mPresenter?.getDoWd(data.id!!)
// if (data.special == 1) {
//// EventUtils.onEvent("daka_hongbao_click")
// mPresenter?.getFlyBoxReceive(this)
// } else if (data.special == 2) {
//// EventUtils.onEvent("daka_tixian_click")
// EventUtils.onEvent("checkin_cashout_click")
// mPresenter?.getDoWd(data.id!!)
// }
view?.postDelayed({
isClick = false
},1000)
}, 1000)
}
}
//任务列表结果
......@@ -82,6 +84,7 @@ class ClockInWithdrawActitivy : MyBaseActivity(), ClockInWithdrawContract.View,
tv_clock_in_info?.text = "${result?.todayTitle}"
mAdapter?.clear()
mAdapter?.SetCurrentNum(result?.clockNum)
mAdapter?.appendToList(result?.clockData)
mAdapter?.notifyDataSetChanged()
}
......@@ -93,11 +96,12 @@ class ClockInWithdrawActitivy : MyBaseActivity(), ClockInWithdrawContract.View,
if (result != null) {
MainDialog?.showWithDraw(
this,
result?.status?:0,
result?.title?:"",
result?.reason?:"",
result?.buttonText?:"",
result?.buttonStatus?:0,
result?.status ?: 0,
result?.title ?: "",
result?.reason ?: "",
result?.buttonText ?: "",
result?.cashText ?: "",
result?.buttonStatus ?: 0,
null,
8,
null,
......
......@@ -24,7 +24,7 @@ class SettingActivity : MyBaseActivity() {
}
override fun init() {
EventUtils.onEvent("setting_on", "设置页面曝光")
EventUtils.onEvent("settings_show", "设置页面曝光")
if (SettingPreference.getUserInfoData() != null) {
id_tv_id.text = "ID: ${SettingPreference.getUserInfoData().uid}"
}
......@@ -56,6 +56,7 @@ class SettingActivity : MyBaseActivity() {
// tv_user_toolbar_title.text = "设置"
//提现记录
ll_setting_withdraw_record.setOnClickListener {
EventUtils.onEvent("cashout_record_click", "提现记录入口点击")
JumpUtils.jumpWithdrawalsRecordActivity()
}
//用户协议
......
......@@ -344,6 +344,7 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener,
result?.title?:"",
result?.reason?:"",
result?.buttonText?:"",
result?.cashText ?: "",
result?.buttonStatus?:0,
result.id,
result. type,
......
......@@ -57,6 +57,7 @@ class WelfareActivity : MyBaseActivity(), WelfareContract.View,
"",
"需要钻石${mDiamondEntity?.max}颗,还差${lack}颗,快去做任务领钻石吧",
"",
"",
0,
null,
0,
......@@ -245,6 +246,7 @@ class WelfareActivity : MyBaseActivity(), WelfareContract.View,
result?.title ?: "",
result?.reason ?: "",
result?.buttonText ?: "",
result?.cashText ?: "",
result?.buttonStatus ?: 0,
null,
7,
......
......@@ -7,6 +7,7 @@ import com.ym.xynt.R
import com.ym.game.adapter.WithdrawalsRecordAdapter
import com.ym.library.module.WithdrawEntity
import com.ym.library.net.MyBaseActivity
import com.ym.library.utils.EventUtils
import com.ym.library.utils.StatusBarUtil
import com.ym.userinfo.module.contract.WithdrawalsRecordContract
import com.ym.userinfo.module.presenter.WithdrawalsRecordPresenter
......@@ -29,7 +30,7 @@ class WithdrawalsRecordActivity : MyBaseActivity(), WithdrawalsRecordContract.Vi
override fun init() {
mPresenter = WithdrawalsRecordPresenter(this)
mPresenter?.requestWithdrawalsRecord()
EventUtils.onEvent("cashout_record_show")
// tv_user_toolbar_title.text = "提现记录"
// iv_user_toolbar_back.setOnClickListener { finish() }
iv_welfare_close.setOnClickListener {
......
......@@ -22,10 +22,6 @@ class WxLoginActivity : MyBaseActivity(), WxImplUtils.IWxLoginCallback {
}
override fun init() {
// startActivity(
// Intent(this@WxLoginActivity, GameActivity::class.java)
// )
// finish()
onEvent("login_show", "登录页")
if (SettingPreference.getIsShowGuide()) {
SettingPreference.setIsShowGuide(false)
......
......@@ -3,12 +3,14 @@ import android.app.Dialog
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.TextView
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.ym.game.view.MainDialog
import com.ym.game.view.MainDialog.addClickScale
import com.ym.library.module.ExchangeEntity
import com.ym.library.module.GameDuiHuanShopEntity
import com.ym.library.net.BaseObserver
......@@ -16,6 +18,8 @@ import com.ym.library.net.GameApiClient
import com.ym.library.net.RxSchedulers
import com.ym.library.rxbus.RxBusConstant
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.modulecommon.base.BaseRecyclerAdapter
import com.ym.modulecommon.base.NoDoubleClickListener
......@@ -44,10 +48,18 @@ class AllOrderAdapter : BaseRecyclerAdapter<GameDuiHuanShopEntity, RecyclerView.
mAdapter?.appendToList(order?.needPlantList)
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() {
override fun onNoDoubleClick(view: View?) {
EventUtils.onEvent("exchange_btn_click", "售卖果实弹窗兑换按钮点击")
duihuan(order.id, order.type!!, order.cashStr)
}
})
......@@ -69,11 +81,13 @@ class AllOrderAdapter : BaseRecyclerAdapter<GameDuiHuanShopEntity, RecyclerView.
var item_list: RecyclerView?
var item_duihuan: LinearLayout?
var item_money_tv: TextView?
var img_duihuan: ImageView?
init {
item_list = itemView.findViewById<RecyclerView>(R.id.item_recycler_fruit_list)
item_duihuan = itemView.findViewById<LinearLayout>(R.id.item_click_duihuan)
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) {
// override fun canScrollVertically(): Boolean {
......@@ -106,8 +120,8 @@ class AllOrderAdapter : BaseRecyclerAdapter<GameDuiHuanShopEntity, RecyclerView.
result?.status ?: 0,
result?.title ?: "",
result?.reason ?: "",
// result?.buttonText ?: "",
result?.CashText ?: "",
result?.buttonText ?: "",
result?.cashText ?: "",
result?.buttonStatus ?: 0,
id,
type,
......
......@@ -127,6 +127,7 @@ class CashExchangeAdapter :
result?.title ?: "",
result?.reason ?: "",
result?.buttonText ?: "",
result?.cashText ?: "",
result?.buttonStatus ?: 0,
id,
type,
......
......@@ -23,6 +23,7 @@ import com.ym.library.utils.Utils
class ClockInWithdrawAdpater :
BaseRecyclerAdapter<ClockInWithdrawEntity.ClockInItemEntity, RecyclerView.ViewHolder> {
private var currentNum:Int?=0;
private var mContext: Activity? = null
private val listener: OnRecycleItemClickListener<ClockInWithdrawEntity.ClockInItemEntity>
......@@ -34,6 +35,9 @@ class ClockInWithdrawAdpater :
mContext = content
}
fun SetCurrentNum(num:Int?){
currentNum = num;
}
override fun getItemCount(): Int {
return mList.size
}
......@@ -53,29 +57,41 @@ class ClockInWithdrawAdpater :
holder.item_title.text = Html.fromHtml(data.title)
holder.item_desc.text = Html.fromHtml(data.endDesc)
holder.item_cash_tv.text = data.cashStr + "元";
holder.item_progress_tv.text = "${data.currentNum}/${data.targetNum}"
holder?.item_progress_bar.max = data?.targetNum ?: 10
holder?.item_progress_bar.progress = data?.currentNum ?: 0
if (data?.status == 2) {
holder.item_redpack_img.setImageResource(R.mipmap.clock_in_red_pack)
} else {
holder.item_progress_tv.text = "${currentNum}/${data.needClockNum}"
holder?.item_progress_bar.max = data?.needClockNum ?: 10
holder?.item_progress_bar.progress = currentNum ?: 0
if (data?.status == 1) {
holder.item_redpack_img.setImageResource(R.mipmap.clock_in_gray_red_pack)
} else {
holder.item_redpack_img.setImageResource(R.mipmap.clock_in_red_pack)
}
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])
}
//红包状态 1 已提现 2 可提现 0 未完成
holder?.item.setOnClickListener{
listener?.onItemClick(it, position, mList[position])
// if (data?.status == 1){
// Utils.showToast(mContext, "已领取")
// }
// if (data?.status == 2 ){
// listener?.onItemClick(it, position, mList[position])
// }
// if (data?.status == 0 ){
// Utils.showToast(mContext, "完成打卡可提现")
// }
}
// 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 {
// if (data.status == 1 || data?.status == 8) {
......
......@@ -3,27 +3,34 @@ package com.ym.game.adapter
import android.animation.ObjectAnimator
import android.animation.ValueAnimator
import android.app.Activity
import android.os.CountDownTimer
import android.text.Html
import android.text.TextUtils
import android.util.Log
import android.view.*
import android.view.LayoutInflater
import android.view.MotionEvent
import android.view.View
import android.view.ViewGroup
import android.widget.*
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.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.GameApiClient
import com.ym.library.net.RxSchedulers
import com.ym.library.rxbus.RxBusConstant
import com.ym.library.rxbus.RxBusUtil
import com.ym.library.utils.EventUtils
import com.ym.library.utils.LogUtils
import com.ym.library.utils.Utils
import com.ym.xynt.R
import com.ym.library.module.NewsEntity
import com.ym.library.module.TaskCompleteEntity
import com.ym.library.module.WateringTaskEntity
import com.ym.library.net.GameApiClient
import com.ym.library.utils.EventUtils
import org.apache.poi.hslf.model.Line
import java.text.SimpleDateFormat
import java.util.*
import kotlin.collections.ArrayList
/**
*Craeted by ${junqi.li}
......@@ -36,7 +43,6 @@ class WateringTaskAdpater :
private var mContext: Activity? = null
private val listener: OnRecycleItemClickListener<NewsEntity>
private var isClick = false
constructor(
content: Activity?,
type: Int,
......@@ -115,15 +121,14 @@ class WateringTaskAdpater :
// holder.btnProgess.setProgress(data.current_nums!!)
// holder.tvProgess.text = "${data.current_nums}/${data.awardLimit}"
// }
holder.ivStatus.addClickScale()
holder.ivStatus.setOnClickListener {
if (!isClick) {
isClick = true
listener.onItemClick(it, position, mList[position])
when (data.status) {
0 -> {
EventUtils.onEvent("renwu_go_click_" + mList[position].sid, "金币任务去完成点击")
listener.onItemClick(it, position, mList[position])
// EventUtils.onEvent("renwu_go_click_" + mList[position].sid, "金币任务去完成点击")
}
1 -> {
......@@ -131,13 +136,13 @@ class WateringTaskAdpater :
}
//领取
2 -> {
if (mList[position].opentype == 1) {
EventUtils.onEvent("renwu_done_click_total")
}
EventUtils.onEvent(
"renwu_done_click_" + mList[position].sid,
"金币任务领取点击"
)
// if (mList[position].opentype == 1) {
// EventUtils.onEvent("renwu_done_click_total")
// }
// EventUtils.onEvent(
// "renwu_done_click_" + mList[position].sid,
// "金币任务领取点击"
// )
getDripTaskReceive(type, data.sid!!)
}
}
......@@ -148,17 +153,37 @@ class WateringTaskAdpater :
}
}
// 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)
holder.ivStatus.visibility = View.VISIBLE
holder.timer.visibility = View.GONE
if (data.sid == 2565) {
if (data.status == 0) {
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)
2 -> holder.ivStatus.setImageResource(R.mipmap.icon_main_popup_receive)
} else {
// 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(
......@@ -194,7 +219,7 @@ class WateringTaskAdpater :
val llprogesbg: RelativeLayout = itemView.findViewById(R.id.layout_watering_progress)
val rlbg: RelativeLayout = itemView.findViewById(R.id.ll_one)
val imglucky: TextView = itemView.findViewById(R.id.id_img_lucy)
val timer: TextView = itemView.findViewById(R.id.tv_watering_item_timer)
}
// 领取水滴 type:1每日领水 2高额领水
......@@ -284,4 +309,37 @@ class WateringTaskAdpater :
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
import android.widget.*
import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
import com.ym.game.view.MainDialog.addClickScale
import com.ym.library.listener.OnRecycleItemClickListener
import com.ym.library.base.BaseRecyclerAdapter
import com.ym.library.utils.Utils
......@@ -75,7 +76,7 @@ class WelfareTaskAdpater :
} else {
holder?.ivTitle?.visibility = View.GONE
}
holder.ivStatus.addClickScale()
holder.ivStatus.setOnClickListener {
if (Utils.isFastClick()) {
listener.onItemClick(it, position, mList[position])
......
......@@ -53,7 +53,7 @@ class BaseApplication : BaseApplication() {
private var backToFrontTime: Long = 0
override fun 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
if (NetConfig.sEnvironment == NetConfig.Environment.PRODUCT) {
......@@ -71,7 +71,7 @@ class BaseApplication : BaseApplication() {
AdManager.init(this, "1d8a0d53c33a9b95")
LogUtils.getConfig().logSwitch = isDebug
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)
AppLibraryConfig.ActivityConfig.isProhibitScreenshot=false
......@@ -85,7 +85,7 @@ class BaseApplication : BaseApplication() {
// 设置是否为上报进程
strategy.isUploadProcess = processName == null || processName == packageName
//Bugly初始化
CrashReport.initCrashReport(this, "3bac59d22f", isDebug, strategy)
CrashReport.initCrashReport(this, "b0489da05d", isDebug, strategy)
//========== Bugly ==========
//小满
......
......@@ -17,7 +17,7 @@ class GameContract {
fun gameWaterNotEnough(playNum:Int,landId: Int);
fun gameCleanBugNotEnough(playNum:Int,landId: Int);
fun gameCurrentOrderResult(result: String)
fun gameFlyBoxResult(result: FlyBoxEntity)
// fun gameFlyBoxResult(result: FlyBoxEntity)
}
interface Presenter {
......@@ -27,7 +27,7 @@ class GameContract {
fun getLandList(from:Int)
fun getHomeInfo()
fun getCleanBug(landId:Int)
fun getRewardLand(landId:Int)
fun getRewardLand(landId:Int,plantId:Int)
fun getPlantLand(landId:Int,plantId:Int)
fun getLockLand(landId:Int)
fun getUseAccelerators(landId:Int)
......
......@@ -11,6 +11,7 @@ import com.ym.library.net.BaseObserver
import com.ym.library.net.GameApiClient
import com.ym.library.net.RxSchedulers
import com.ym.library.utils.EventUtils
import com.ym.library.utils.Utils
class ClockInWithdrawPresenter : ClockInWithdrawContract.Presenter {
......@@ -44,7 +45,7 @@ class ClockInWithdrawPresenter : ClockInWithdrawContract.Presenter {
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
mView?.dowdResult(null)
// mView?.dowdResult(null)
}
})
}
......
......@@ -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())
.subscribe(object : BaseObserver<LandListEntity>() {
override fun onSuccess(result: LandListEntity?) {
EventUtils.onEvent("reward${plantId-1}", "收获${plantId-1}")
mView.gameRewardLandResult(Utils.obj2Str(result))
}
......@@ -158,6 +159,7 @@ class GamePresenter : GameContract.Presenter {
GameApiClient.gameApi.getUnLockLand(landId).compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<LandListEntity>() {
override fun onSuccess(result: LandListEntity?) {
EventUtils.onEvent("unlock$landId", "解锁第${landId}块地")
mView.gameLockLandResult(Utils.obj2Str(result))
}
......@@ -212,10 +214,12 @@ class GamePresenter : GameContract.Presenter {
//1 花仙
if (type == 1) {
checkVideoStatus(4, "VIDEO_FAIRY", 0, 0)
EventUtils.onEvent("flower_btn_click", "花仙弹窗按钮点击")
}
//2 宝箱
if (type == 2) {
checkVideoStatus(3, "BOX_REWARD", 0, 0)
EventUtils.onEvent("box_btn_click", "宝箱弹窗按钮点击")
}
......@@ -253,7 +257,7 @@ class GamePresenter : GameContract.Presenter {
View.OnClickListener {
AdUtils.playRewardAd(
act,
"cloud_acceleration_click",
slot,
object : IAdVideoListener {
override fun onAdClose() {
getUseFertilize();
......
......@@ -43,7 +43,7 @@ class WateringRewardPresenter : WateringRewardContract.Presenter {
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
mView?.taskListResult(null)
// mView?.taskListResult(null)
}
})
......
......@@ -45,7 +45,7 @@ class WelfarePresenter : WelfareContract.Presenter {
}
override fun getTaskReceiveList(sid: Int) {
GameApiClient.gameApi.getTaskComplete(sid).compose(
GameApiClient.gameApi.getWelfareTaskComplete(sid).compose(
RxSchedulers.observableIO2Main()
).subscribe(object : BaseObserver<TaskCompleteEntity>() {
override fun onSuccess(result: TaskCompleteEntity?) {
......@@ -95,7 +95,7 @@ class WelfarePresenter : WelfareContract.Presenter {
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
mView?.welfareTaskCashResult(null)
// mView?.welfareTaskCashResult(null)
}
})
}
......
......@@ -34,7 +34,7 @@ object CashExchangeDialog : CashExchangeContract.View {
return
}
this.context = context
EventUtils.onEvent("duihuan_show", "兑换现金")
mPresenter = CashExchangePresenter(this)
mPresenter?.getWithDrawList()
RxBusUtil.getDefault().register(this)
......@@ -54,7 +54,6 @@ object CashExchangeDialog : CashExchangeContract.View {
recyclerexchange?.adapter = cashExchangeAdapter
mDialogView?.findViewById<ImageView>(R.id.cash_shop_close).setOnClickListener {
mDialog?.dismiss()
mListener.onCloseViewSuccess(true);
RxBusUtil.getDefault().unregister(this)
}
// mDialogView?.findViewById<ImageView>(R.id.id_mg_cash_recode).setOnClickListener {
......@@ -64,7 +63,13 @@ object CashExchangeDialog : CashExchangeContract.View {
// ExchangeRecordDialog.showRecord(context)
// }
mDialog?.setOnCancelListener {
// RxBusUtil.getDefault().unregister(this)
// mListener.onCloseViewSuccess(true);
}
mDialog?.setOnDismissListener{
RxBusUtil.getDefault().unregister(this)
mListener.onCloseViewSuccess(true);
}
mDialog?.setCanceledOnTouchOutside(false)
......@@ -72,6 +77,7 @@ object CashExchangeDialog : CashExchangeContract.View {
if (context.isFinishing){
return
}
EventUtils.onEvent("exchange_show", "售卖果实弹窗曝光")
mDialog?.show()
}
......
......@@ -33,7 +33,6 @@ object WareHouseDialog : WareHouseContract.View {
return
}
this.context = context
EventUtils.onEvent("cangku_show", "仓库弹窗曝光")
mPresenter = WareHousePresenter(this)
mPresenter?.getwarehouseData()
RxBusUtil.getDefault().register(this)
......@@ -68,6 +67,7 @@ object WareHouseDialog : WareHouseContract.View {
mDialog?.setCanceledOnTouchOutside(false)
mDialog?.setCancelable(false)
EventUtils.onEvent("store_show", "仓库弹窗曝光")
mDialog?.show()
}
......
......@@ -11,26 +11,22 @@ import android.graphics.drawable.ColorDrawable
import android.view.*
import android.view.animation.AnimationUtils
import android.widget.*
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.ym.library.listener.OnRecycleItemClickListener
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.WelfareTaskAdpater
import com.ym.game.contract.WelfareContract
import com.ym.game.presenter.WateringRewardPresenter
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.library.listener.IAdVideoListener
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 kotlinx.android.synthetic.main.activity_welfare.*
class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
OnRecycleItemClickListener<NewsEntity> {
......@@ -58,12 +54,10 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
return
}
view = LayoutInflater.from(mContext).inflate(R.layout.layout_popup_welfare, null)
EventUtils.onEvent("fuli_show", "福利弹窗曝光")
EventUtils.onEvent("task_senior_show", "福利任务弹窗曝光")
init(view)
initView()
RxBusUtil.getDefault().register(this)
showAtLocation(
view,
Gravity.CENTER,
......@@ -89,33 +83,31 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
progess_watering_bar = view?.findViewById<ProgressBar>(R.id.progess_watering_bar)
tv_welfare_diamond_conut = view?.findViewById<TextView>(R.id.tv_welfare_diamond_conut)
EventUtils.onEvent("fuli_show")
mPresenter = WelfarePresenter(this)
iv_welfare_reward_box?.setOnClickListener {
EventUtils.onEvent("welfare_task_reward_box_click")
if (mDiamondEntity?.coins != null && mDiamondEntity?.max != null) {
if (mDiamondEntity?.coins!! >= mDiamondEntity?.max!!) {
mPresenter?.getWelfareTaskBox()
} else {
var lack = mDiamondEntity?.max!! - mDiamondEntity?.coins!!
MainDialog?.showWithDraw(
mContext,
3,
"",
"需要钻石${mDiamondEntity?.max}颗,还差${lack}颗,快去做任务领钻石吧",
"",
0,
null,
0,
null,
true,
Dialog(mContext as Context)
)
}
mPresenter?.getWelfareTaskBox()
// if (mDiamondEntity?.coins!! >= mDiamondEntity?.max!!) {
// mPresenter?.getWelfareTaskBox()
// } else {
// var lack = mDiamondEntity?.max!! - mDiamondEntity?.coins!!
// MainDialog?.showWithDraw(
// mContext,
// 3,
// "",
// "需要钻石${mDiamondEntity?.max}颗,还差${lack}颗,快去做任务领钻石吧",
// result?.buttonText?:"",,
// 0,
// null,
// 0,
// null,
// true,
// Dialog(mContext as Context)
// )
// }
}
......@@ -138,6 +130,12 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
mPresenter?.getTaskList()
}
@SuppressLint()
@Subscribe(code = RxBusConstant.RX_MAIN_WELFARE_UPDATE, threadMode = ThreadMode.MAIN)
fun updateList() {
mPresenter?.getTaskList()
}
override fun diamondListResult(result: DiamondEntity?) {
if (result != null) {
mDiamondEntity = result
......@@ -169,7 +167,7 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
} else {
iv_welfare_reward_red_pg?.visibility = View.VISIBLE
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 =
// AnimationUtils.loadAnimation(mContext, R.anim.scale_anim)
......@@ -206,11 +204,11 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
override fun taskCashResult(result: List<FlyBoxEntity>?) {
if (result != null && result.isNotEmpty()) {
mPresenter?.getDiamondList()
MainDialog.showWelfareOpenBox(mContext, result, object : IDialogViewCloseCallback {
override fun onCloseViewSuccess(isSuccess: Boolean) {
}
})
// MainDialog.showWelfareOpenBox(mContext, result, object : IDialogViewCloseCallback {
// override fun onCloseViewSuccess(isSuccess: Boolean) {
//
// }
// })
}
}
......@@ -223,6 +221,7 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
result?.title ?: "",
result?.reason ?: "",
result?.buttonText ?: "",
result?.cashText ?: "",
result?.buttonStatus ?: 0,
null,
7,
......@@ -230,6 +229,7 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
true,
Dialog(mContext as Context)
)
}
}
......@@ -244,12 +244,14 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
private var mSid: Int? = 0
override fun onItemClick(view: View, position: Int, data: NewsEntity) {
mData = data
mSid = data.sid
if (!isClick) {
isClick = true
//0未完成 1已领取 2可领取
when (data.status) {
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.sid != null) {
......@@ -266,13 +268,17 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
Utils.showToast(mContext, "已领取")
}
2 -> {
EventUtils.onEvent(
"task_senior_id_receive_${data.sid}",
"福利任务领奖按钮点击${data.sid}"
)
if (data.opentype == NewsEntity.AD_TYPE_SDK) {
EventUtils.onEvent("welfare_task_done_click_total")
}
EventUtils.onEvent("fuli_done_click_${data.sid}")
mPresenter?.getTaskReceiveList(data?.sid)
}
}
view?.postDelayed({
isClick = false
}, 1000)
......@@ -303,6 +309,7 @@ class WelfarePopupwindow : PopupWindow(), WelfareContract.View,
taskAdapter?.clearAnimation()
super.dismiss()
LogUtils.i(TAG, "dismiss")
RxBusUtil.getDefault().unregister(this)
}
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 @@
<RelativeLayout
android:layout_width="332dp"
android:layout_height="@dimen/dp_279"
android:background="@mipmap/icon_bg_jiangli">
android:layout_height="@dimen/dp_302"
android:background="@mipmap/icon_bg_jiangli_2">
<ImageView
......@@ -58,9 +58,9 @@
<ImageView
android:id="@+id/iv_get_drop_bg"
android:layout_width="@dimen/dp_55"
android:layout_height="@dimen/dp_66"
android:src="@mipmap/icon_coin" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/icon_speed_water_big" />
<com.ym.game.wedget.FontTextView
android:id="@+id/tv_get_drop_count"
......@@ -71,7 +71,7 @@
android:gravity="center"
android:includeFontPadding="false"
android:textColor="#FF04437F"
android:textSize="18sp"
android:textSize="20sp"
android:textStyle="bold"
tools:text="+40g" />
</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 @@
<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">
android:layout_centerHorizontal="true">
<com.ym.game.wedget.FontTextView
android:id="@+id/id_tv_worm_title"
......@@ -30,7 +28,6 @@
android:layout_centerHorizontal="true"
android:gravity="center"
android:includeFontPadding="false"
android:text="我的仓库"
android:textColor="#FFFFFF"
android:textSize="22sp"
android:textStyle="bold" />
......
......@@ -55,8 +55,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:visibility="gone"
android:orientation="vertical">
android:orientation="vertical"
android:visibility="gone">
<TextView
android:id="@+id/withdraw_success_tv"
......@@ -67,7 +67,7 @@
android:gravity="center|bottom"
android:paddingRight="@dimen/dp_5"
android:paddingBottom="@dimen/dp_25"
android:text="0.33元"
android:text="0.3元"
android:textColor="@color/white"
android:textSize="@dimen/sp_18"
android:textStyle="bold" />
......@@ -98,13 +98,20 @@
</LinearLayout>
<ImageView
<com.ym.game.wedget.FontTextView
android:id="@+id/id_tv_go_on_make_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="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>
</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 @@
android:paddingRight="@dimen/dp_25"
android:paddingBottom="@dimen/dp_21">
<TextView
<com.ym.game.wedget.FontTextView
android:id="@+id/clock_in_item_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textColor="#04437F"
android:text="打卡满 打卡满 打卡满 "
android:textSize="16sp" />
......@@ -51,6 +53,8 @@
android:id="@+id/clock_in_item_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#666666"
android:textStyle="bold"
android:layout_below="@id/clock_in_item_progress_rl"
android:text="打卡满 打卡满 打卡满 "
android:textSize="12sp" />
......@@ -75,7 +79,7 @@
android:layout_height="wrap_content"
android:layout_alignBottom="@id/clock_in_item_red_pack_img"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/dp_15"
android:layout_marginBottom="@dimen/dp_12"
android:paddingRight="5dp"
android:text="100元"
android:textColor="@color/white"
......
......@@ -7,8 +7,8 @@
<ImageView
android:id="@+id/id_fruit_image"
android:layout_width="@dimen/dp_35"
android:layout_height="@dimen/dp_35"
android:layout_width="@dimen/dp_40"
android:layout_height="@dimen/dp_40"
android:layout_marginBottom="2dp"
android:src="@mipmap/icon_flower_eight" />
......@@ -28,7 +28,7 @@
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:text="1/20"
android:textColor="#FFA33C0E"
android:textSize="12sp"
android:textColor="#A33C0E"
android:textSize="12.5sp"
android:textStyle="bold" />
</LinearLayout>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll_one"
android:layout_width="match_parent"
android:layout_height="76dp"
android:layout_height="82dp"
android:background="@drawable/icon_luck_task">
......@@ -19,7 +19,7 @@
<LinearLayout
android:layout_width="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:orientation="vertical">
......@@ -29,8 +29,8 @@
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:text="浇水10次"
android:textColor="#FF04437F"
android:textSize="17sp"
android:textColor="#04437F"
android:textSize="16sp"
android:textStyle="bold" />
......@@ -55,7 +55,7 @@
android:id="@+id/progess_watering_item"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="168dp"
android:layout_height="wrap_content"
android:layout_height="12dp"
android:layout_marginRight="3dp"
android:progressDrawable="@drawable/game_clock_in_item_progress_bg" />
......@@ -77,8 +77,8 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_7"
android:text="浏览4篇资讯可领奖"
android:textColor="#FF02457F"
android:textSize="@dimen/sp_12" />
android:textColor="#02457F"
android:textSize="@dimen/sp_14" />
</LinearLayout>
<LinearLayout
......@@ -86,15 +86,15 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginRight="@dimen/dp_20"
android:layout_marginBottom="@dimen/dp_7">
android:gravity="center_vertical"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginRight="@dimen/dp_20">
<ImageView
android:id="@+id/img_icon_item"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_marginRight="@dimen/dp_3"
android:layout_width="@dimen/dp_20"
android:layout_height="@dimen/dp_23"
android:layout_marginRight="@dimen/dp_1"
android:src="@drawable/icon_coin" />
<TextView
......@@ -103,8 +103,8 @@
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:text="+100"
android:textColor="#FC6002"
android:textSize="@dimen/sp_13"
android:textColor="#E52A12"
android:textSize="@dimen/sp_14"
android:textStyle="bold" />
</LinearLayout>
......@@ -114,7 +114,28 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="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_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>
......@@ -2,38 +2,37 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_welfare_item_bg"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_92"
android:layout_height="82dp"
android:layout_marginBottom="@dimen/dp_10"
android:background="@drawable/withdraw_bg"
android:paddingLeft="@dimen/dp_11">
android:background="@drawable/withdraw_bg">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="vertical"
android:padding="@dimen/dp_10">
android:layout_marginLeft="@dimen/dp_20"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<com.ym.game.wedget.FontTextView
<TextView
android:id="@+id/tv_welfare_item_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:text="浇水10次"
android:textColor="#FF04437F"
android:textSize="17sp"
android:textColor="#04437F"
android:textSize="16sp"
android:textStyle="bold"/>
<ImageView
android:id="@+id/iv_welfare_item_title"
android:layout_width="62dp"
android:layout_height="17dp"
android:layout_marginLeft="8dp"
android:layout_marginLeft="4dp"
android:visibility="gone" />
</LinearLayout>
......@@ -47,12 +46,11 @@
android:layout_marginTop="9dp"
android:includeFontPadding="false"
android:text="浏览60秒领取奖励"
android:textColor="#FF04437F"
android:textColor="#02457F"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
......@@ -69,9 +67,9 @@
<ImageView
android:id="@+id/img_icon_item"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/dp_3"
android:layout_width="@dimen/dp_20"
android:layout_height="@dimen/sp_17"
android:layout_marginRight="@dimen/dp_1"
android:src="@drawable/icon_welfare_diamond" />
<TextView
......@@ -79,8 +77,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="+0g"
android:textColor="#FF5A44"
android:textSize="15sp"
android:textColor="#E52A12"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
......
......@@ -12,8 +12,8 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/item_recycler_fruit_list"
android:layout_width="match_parent"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginRight="@dimen/dp_20"
android:layout_marginLeft="@dimen/dp_8"
android:layout_marginRight="@dimen/dp_8"
android:layout_height="wrap_content"
android:layout_weight="1" />
......
......@@ -7,26 +7,32 @@
android:background="@mipmap/icon_bg_jilu"
android:paddingLeft="20dp">
<com.ym.game.wedget.FontTextView
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"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_record_title"
android:layout_marginTop="11dp"
android:layout_marginBottom="13dp"
android:textColor="#006EC7"
android:textSize="14sp"
tools:text="2020-8-27" />
android:layout_centerVertical="true"
android:orientation="vertical">
<com.ym.game.wedget.FontTextView
android:id="@+id/tv_record_title"
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
android:layout_width="wrap_content"
......@@ -41,21 +47,21 @@
android:id="@+id/tv_record_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_8"
android:includeFontPadding="false"
android:textStyle="bold"
android:textColor="#E54D24"
android:textSize="22sp"
android:layout_marginBottom="@dimen/dp_8"
android:textStyle="bold"
tools:text="0.3元" />
<com.ym.game.wedget.FontTextView
android:id="@+id/tv_record_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:includeFontPadding="false"
android:textColor="#2CB531"
android:textSize="14sp"
android:textStyle="bold"
tools:text="0.3元" />
</LinearLayout>
......
......@@ -105,11 +105,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
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:orientation="vertical"
android:paddingLeft="@dimen/dp_16"
android:paddingRight="@dimen/dp_16">
android:paddingLeft="@dimen/dp_26"
android:paddingRight="@dimen/dp_26">
<LinearLayout
android:layout_width="match_parent"
......
......@@ -47,14 +47,16 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_task_title"
android:layout_marginTop="@dimen/dp_28"
android:layout_marginBottom="@dimen/dp_15"
android:orientation="vertical"
android:padding="@dimen/dp_10">
android:paddingLeft="@dimen/dp_26"
android:paddingRight="@dimen/dp_26">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="85dp"
android:layout_margin="@dimen/dp_10"
android:layout_height="82dp"
android:layout_marginBottom="@dimen/dp_10"
android:background="@drawable/background_border_pop_item"
android:gravity="center_vertical"
android:orientation="horizontal">
......@@ -64,7 +66,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="14dp"
android:layout_marginLeft="12dp"
android:layout_marginRight="8dp"
android:src="@drawable/icon_welfare_diamond_big" />
......@@ -84,8 +86,8 @@
android:layout_marginBottom="12dp"
android:includeFontPadding="false"
android:text="集齐20颗钻石可获得宝箱"
android:textColor="#663408"
android:textSize="16sp" />
android:textColor="#04437F"
android:textSize="14sp" />
<RelativeLayout
android:layout_width="wrap_content"
......@@ -127,8 +129,8 @@
android:id="@+id/iv_welfare_reward_red_pg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginRight="@dimen/dp_15"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginRight="@dimen/dp_10"
android:layout_toRightOf="@+id/layout_welfare_progress"
android:background="@mipmap/clock_in_red_pack"
android:gravity="center|bottom"
......@@ -145,10 +147,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_welfare_task"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_10" />
android:layout_height="wrap_content" />
</LinearLayout>
......
PACKAGE_NAME=com.ym.xynt
VERSION_CODE=1
VERSION_NAME=1.0.0
\ No newline at end of file
VERSION_CODE=2
VERSION_NAME=1.0.1
\ No newline at end of file
......@@ -67,7 +67,7 @@ dependencies {
// api ("com.bx:adsdk:1.3.3"){
// 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.google.zxing:core:3.2.1' //zxing核心依赖
api 'com.journeyapps:zxing-android-embedded:3.3.0' //生成二维码依赖
......
......@@ -23,9 +23,9 @@ public class MyConstant {
// public static final String WX_APPID = "wx4d3a3aa6fb634c17";//1.0.0版本使用的微信appid
// 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_APPKEY = "7a9ab9dbc24a03504030762b91e833b8";
public static String WX_APPKEY = "dff00145f278fc1b808197a68e8cb5db";
public static String WX_SHARE_APPID = "34fd25bb46e96eb3de04bd0c0e031e22";
public static String WX_SHARE_APPKEY = "34fd25bb46e96eb3de04bd0c0e031e22";
public static final String SHANYAN_KEY = "7QciptTf";
......
......@@ -140,6 +140,7 @@ class NewWebActivity : MyBaseActivity(), NewWebContract.View, ScrollWebView.OnSc
private var isOpen = true
private var showNewCoinsDialog: Dialog? = null
@RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
override fun showCoinsDialog(coins: Int, value: String) {
// showCoins(coins)
......@@ -185,7 +186,7 @@ class NewWebActivity : MyBaseActivity(), NewWebContract.View, ScrollWebView.OnSc
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 且 已看数量大于目标数量,不展示退出挽留弹窗
isAdds = true
}
......@@ -374,7 +375,9 @@ class NewWebActivity : MyBaseActivity(), NewWebContract.View, ScrollWebView.OnSc
RxBusUtil.getDefault()
.send(RxBusConstant.RX_SPEED_WATER_TASK_LIST)
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)
// EventUtils.onEvent("page_status", Utils.obj2Str(ReportEntity(Constant.ReportSessionId, "NewWebActivity", "onPause")))
if (webview != null) {
......
......@@ -441,6 +441,8 @@ class WebActivity : MyBaseActivity(), View.OnClickListener {
.send(RxBusConstant.RX_SPEED_WATER_TASK_LIST)
RxBusUtil.getDefault()
.send(RxBusConstant.RX_MAIN_WATER_DROP_UPDATE)
RxBusUtil.getDefault()
.send(RxBusConstant.RX_MAIN_WELFARE_UPDATE)
}
private fun queryTask() {
......
......@@ -5,7 +5,7 @@ class ExchangeEntity {
var status: Int? = 0
var reason: String? = ""
var buttonText: String? = ""
var CashText: String? = ""
var cashText: String? = ""
var buttonStatus: Int? = 0
var title: String? = ""
var type: Int? = 0
......
......@@ -42,8 +42,17 @@ public class GameDuiHuanShopEntity {
private Object targetNum;
private int completeNum;
private int currentNum;
private int wdCount;
private List<NeedPlantListBean> needPlantList;
public int getWdCount() {
return wdCount;
}
public void setWdCount(int wdCount) {
this.wdCount = wdCount;
}
public int getId() {
return id;
}
......
......@@ -14,10 +14,27 @@ public class HomeInfoEntity {
*/
private int acceleratorsNum;
private int isNewUser;
private int useFertilizeCountdownSecond;
private String headImageUrl;
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() {
return acceleratorsNum;
}
......
......@@ -33,6 +33,7 @@ class WithdrawEntity {
var buttonStatus: Int? = 0 //按钮跳转 0 不跳转 1 福利页 2 首页
var ext: Ext? = null
var buttonText: String? = ""
var cashText: String? = ""
var isWelfarePage = false
var isHomePage = false
var awardNum:String = ""
......
......@@ -246,6 +246,11 @@ interface IGameApi {
*/
@POST(NetConfig.Task.TASK_COMPLETE_TASK)
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 {
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_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";//任务领取
}
......@@ -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_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_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";//我的抽奖提现
}
......@@ -160,15 +161,8 @@ public class NetConfig {
public static final String URL_GET_ADS_V3 = "v4/ads";
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_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_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_TURNTABLE_LIST = "app/v1/game/farm/turntable_list";//转盘列表
public static final String URL_GAME_FARM_LOTTERY = "app/v1/game/ddcy/lottery";//转盘抽奖
......@@ -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_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_ACCELERATORS_TASK_RECEIVE = "app/v1/game/ddcy/accelerators_task_receiveV2";//加速剂任务领取
public static final String URL_GAME_USER_GUIDE = "app/v1/game/ddcy/user_guide";
......@@ -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_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_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_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_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_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_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_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_WITHDRAW_LIST = "app/v1/game/bbnc/exchange_list";//兑换列表
......@@ -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_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_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_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_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_AD_TIME_CD = "app/v1/game/video_cd";
public static final String URL_GAME_WELFARE_TASK_CASH = "app/v1/game/task_cash";//福利中心红包领取
}
}
......@@ -357,9 +357,9 @@ class SplashPresenter : SplashContract.Presenter {
// Constant.Param.env = CesCore.getInstance().Ckwork(SettingPreference.getAndroidId())
// }
// }
deviceLogin()
// deviceLogin()
// getUserInfo()
// mView.jumpPage()
mView.jumpPage()
}
private fun deviceLogin() {
......
......@@ -38,6 +38,8 @@ public class RxBusConstant {
public final static int RX_MAIN_UPDATE_HOME_INFO = 10005;
//MainFragment 每日水滴领取后刷新
public final static int RX_MAIN_WATER_DROP_UPDATE = 10008;
//福利任务弹窗
public final static int RX_MAIN_WELFARE_UPDATE = 20001;
//MainFragment 高额水滴领取后刷新
public final static int RX_MAIN_HIGH_WATER_DROP_UPDATE = 10004;
......
......@@ -22,7 +22,7 @@ object AdUtils {
var handler = object : Handler() {
override fun handleMessage(msg: Message?) {
super.handleMessage(msg)
when(msg?.what) {
when (msg?.what) {
0 -> {
if (activity != null) {
AdManager.loadNextCacheRewardVideoAd(ADConfig.AD_REWARD_VIDIO, activity!!)
......@@ -57,6 +57,7 @@ object AdUtils {
}
override fun onAdShow() {
EventRepore(actionName)
Utils.showToast(activity, "看完视频可获得奖励")
handler?.sendEmptyMessageDelayed(0, 2000)
}
......@@ -84,7 +85,7 @@ object AdUtils {
view?.postDelayed({
loadFeedCacheAdToCache(activity)
},1500)
}, 1500)
}
//预加载激励
......@@ -96,26 +97,12 @@ object AdUtils {
fun loadFeedCacheAdToCache(activity: Activity) {
AdManager.loadFeedAdToCache(
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) {
GameApiClient.gameApi.adVideoReport(slot)
.compose(RxSchedulers.observableIO2Main())
......@@ -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() {
val tvGetDropCount = mDialogView?.findViewById<TextView>(R.id.tv_get_count)
val layoutAd = mDialogView?.findViewById<FrameLayout>(R.id.layout_feed_ad)
tvGetDropCount.text = "+${rewardCount}"
tvGetDropCount.text = "钻石x${rewardCount}"
AdUtils.showFeedAd(context,actionName,layoutAd)
FilterUtils.addClickAlpha(btn_get_diamand)
......
......@@ -4,14 +4,14 @@ import android.graphics.Color
import android.graphics.PorterDuff
import android.graphics.drawable.Drawable
import android.view.MotionEvent
import android.view.View
import android.widget.ImageView
object FilterUtils {
/**
* 点击效果
*/
fun addClickAlpha(view: ImageView) {
fun addClickAlpha(view: View) {
view.setOnTouchListener { _, event ->
when (event.action) {
MotionEvent.ACTION_DOWN -> {
......@@ -30,25 +30,32 @@ object FilterUtils {
/**
* 设置滤镜
*/
private fun setFilter(view: ImageView) {
//先获取设置的src图片
var drawable: Drawable? = view?.getDrawable()
private fun setFilter(view: View) {
var drawable: Drawable? = null
if (view is ImageView) {
//先获取设置的src图片
drawable = view?.getDrawable()
}
//当src图片为Null,获取背景图片
if (drawable == null) {
drawable = view?.getBackground()
}
if (drawable != null) {
//设置滤镜
drawable.setColorFilter(Color.GRAY, PorterDuff.Mode.MULTIPLY)
drawable?.setColorFilter(Color.GRAY, PorterDuff.Mode.MULTIPLY)
}
}
/**
* 清除滤镜
*/
private fun removeFilter(view: ImageView) {
//先获取设置的src图片
var drawable: Drawable? = view?.getDrawable()
private fun removeFilter(view: View) {
var drawable: Drawable? = null
if (view is ImageView) {
//先获取设置的src图片
drawable = view?.getDrawable()
}
//当src图片为Null,获取背景图片
if (drawable == null) {
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 @@
android:layout_marginRight="-4dp"
android:src="@drawable/icon_new_close" />
<TextView
<com.ym.library.widget.FontTextView
android:id="@+id/id_tv_gongxi_get"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......@@ -70,7 +70,7 @@
android:background="@drawable/icon_tv_bg2"
android:gravity="center"
android:textColor="#FF04437F"
android:textSize="30sp"
android:textSize="18sp"
android:textStyle="bold"
tools:text="+1" />
</LinearLayout>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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