Commit 1dee3bfe authored by maxiaoliang's avatar maxiaoliang

111

parent a9f7fc28
package com.ym.game package com.ym.game
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.app.Dialog
import android.content.ComponentName import android.content.ComponentName
import android.content.Intent import android.content.Intent
import android.content.ServiceConnection import android.content.ServiceConnection
...@@ -983,7 +984,8 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback { ...@@ -983,7 +984,8 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
id, id,
2, 2,
jine, jine,
true true,
Dialog(this@GameActivity)
) )
} }
} }
......
package com.ym.game.activity package com.ym.game.activity
import android.app.Dialog
import android.text.Html import android.text.Html
import android.view.View import android.view.View
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
...@@ -91,7 +92,8 @@ class ClockInWithdrawActitivy : BaseActivity(), ClockInWithdrawContract.View, ...@@ -91,7 +92,8 @@ class ClockInWithdrawActitivy : BaseActivity(), ClockInWithdrawContract.View,
null, null,
8, 8,
null, null,
false false,
Dialog(this)
) )
} }
} }
......
...@@ -71,7 +71,7 @@ class SplashActivity : BaseActivity(), SplashContract.View { ...@@ -71,7 +71,7 @@ class SplashActivity : BaseActivity(), SplashContract.View {
if (!SettingPreference.getIsShowGuide()) { if (!SettingPreference.getIsShowGuide()) {
EventUtils.onEvent("SplashActivity_loadSplash") EventUtils.onEvent("SplashActivity_loadSplash")
AdManager.loadSplashAd(this, AdManager.loadSplashAd(this,
ADConfig.AD_SPLASH, tv_skipview, splash_container!!,object : ZXADSplashListener { ADConfig.AD_SPLASH, "splash",tv_skipview, splash_container!!,object : ZXADSplashListener {
override fun onAdShow() {} override fun onAdShow() {}
override fun onAdSkip() { override fun onAdSkip() {
......
...@@ -2,6 +2,7 @@ package com.ym.game.activity ...@@ -2,6 +2,7 @@ package com.ym.game.activity
import android.animation.ObjectAnimator import android.animation.ObjectAnimator
import android.animation.ValueAnimator import android.animation.ValueAnimator
import android.app.Dialog
import android.content.DialogInterface import android.content.DialogInterface
import android.text.Html import android.text.Html
import android.view.View import android.view.View
...@@ -61,7 +62,8 @@ class WelfareActivity : BaseActivity(), WelfareContract.View, ...@@ -61,7 +62,8 @@ class WelfareActivity : BaseActivity(), WelfareContract.View,
null, null,
0, 0,
null, null,
true true,
Dialog(this)
) )
} }
...@@ -233,7 +235,8 @@ class WelfareActivity : BaseActivity(), WelfareContract.View, ...@@ -233,7 +235,8 @@ class WelfareActivity : BaseActivity(), WelfareContract.View,
null, null,
7, 7,
null, null,
true true,
Dialog(this)
) )
} }
} }
......
...@@ -2,6 +2,7 @@ package com.ym.game.adapter ...@@ -2,6 +2,7 @@ package com.ym.game.adapter
import android.animation.AnimatorSet import android.animation.AnimatorSet
import android.animation.ObjectAnimator import android.animation.ObjectAnimator
import android.app.Dialog
import android.content.Context import android.content.Context
import android.text.Html import android.text.Html
import android.text.TextUtils import android.text.TextUtils
...@@ -26,15 +27,18 @@ import com.ym.library.rxbus.RxBusUtil ...@@ -26,15 +27,18 @@ import com.ym.library.rxbus.RxBusUtil
import com.ym.library.utils.EventUtils import com.ym.library.utils.EventUtils
import com.ym.library.utils.Utils import com.ym.library.utils.Utils
import com.ym.modulecommon.AppliContext import com.ym.modulecommon.AppliContext
import com.ym.modulecommon.base.NoDoubleClickListener
class CashExchangeAdapter : class CashExchangeAdapter :
BaseRecyclerAdapter<WithDrawEntity2.WdList, CashExchangeAdapter.ViewHolder> { BaseRecyclerAdapter<WithDrawEntity2.WdList, CashExchangeAdapter.ViewHolder> {
private var mContext: Context? = null private var mContext: Context? = null
private var dialog:Dialog?=null
constructor( constructor(
content: Context? content: Context?,
mDialog: Dialog
) : super() { ) : super() {
mContext = content mContext = content
dialog=mDialog
} }
override fun onBindViewHolder(holder: ViewHolder, position: Int) { override fun onBindViewHolder(holder: ViewHolder, position: Int) {
...@@ -60,31 +64,35 @@ class CashExchangeAdapter : ...@@ -60,31 +64,35 @@ class CashExchangeAdapter :
} }
} }
holder.item_duihuan?.addClickScale() holder.item_duihuan?.addClickScale()
holder.item_duihuan?.setOnClickListener { holder.item_duihuan?.setOnClickListener (object :NoDoubleClickListener(){
if (Utils.isFastClick2()) { override fun onNoDoubleClick(view: View?) {
duihuan(bean.id, bean.type!!, bean.cashStr)
if (bean.type == 1) { duihuan(bean.id, bean.type!!, bean.cashStr)
EventUtils.onEvent("click_xinshou0.3", "新手0.3") if (bean.type == 1) {
} else if (bean.type == 4) { EventUtils.onEvent("click_xinshou0.3", "新手0.3")
EventUtils.onEvent("click_fuli0.3", "福利0.3") } else if (bean.type == 4) {
} else { EventUtils.onEvent("click_fuli0.3", "福利0.3")
when (bean.id) { } else {
1 -> { when (bean.id) {
EventUtils.onEvent("click_baicai", "白菜" + bean.cash) 1 -> {
} EventUtils.onEvent("click_baicai", "白菜" + bean.cash)
2 -> { }
EventUtils.onEvent("click_fanqie", "番茄" + bean.cash) 2 -> {
} EventUtils.onEvent("click_fanqie", "番茄" + bean.cash)
3 -> { }
EventUtils.onEvent("click_nangua", "南瓜" + bean.cash) 3 -> {
} EventUtils.onEvent("click_nangua", "南瓜" + bean.cash)
4 -> { }
EventUtils.onEvent("click_luobo", "萝卜" + bean.cash) 4 -> {
EventUtils.onEvent("click_luobo", "萝卜" + bean.cash)
}
} }
} }
}
} }
}
})
if (!TextUtils.isEmpty(bean.desc)) { if (!TextUtils.isEmpty(bean.desc)) {
holder.item_chazhi?.text = Html.fromHtml(bean.desc) holder.item_chazhi?.text = Html.fromHtml(bean.desc)
} }
...@@ -109,7 +117,8 @@ class CashExchangeAdapter : ...@@ -109,7 +117,8 @@ class CashExchangeAdapter :
id, id,
type, type,
jine, jine,
false false,
dialog!!
) )
} }
} }
......
...@@ -52,8 +52,13 @@ class BaseApplication : MultiDexApplication() { ...@@ -52,8 +52,13 @@ class BaseApplication : MultiDexApplication() {
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
NetConfig.BASE_FEED_URL = "http://feedapitest2.zhangxinhulian.com/" NetConfig.BASE_FEED_URL="https://fsapi.ihuomao.com/"
NetConfig.BASE_AD_URL="https://bs.ihuomao.com/"
NetConfig.URL_REPORT_BASE="http://report.ihuomao.com/"
// NetConfig.BASE_FEED_URL = "http://feedapitest2.zhangxinhulian.com/"
// Constant.appLs = "afcbef40e31631d3"//appls // Constant.appLs = "afcbef40e31631d3"//appls
AdManager.init(this,"afcbef40e31631d3") AdManager.init(this,"afcbef40e31631d3")
LogUtils.getConfig().logSwitch = true LogUtils.getConfig().logSwitch = true
...@@ -82,7 +87,7 @@ class BaseApplication : MultiDexApplication() { ...@@ -82,7 +87,7 @@ class BaseApplication : MultiDexApplication() {
//小满 //小满
AdSdk.setDebug(isDebug)//打开日志 AdSdk.setDebug(isDebug)//打开日志
AdSdk.init(this, "ddcy-az-hdgj_vbskkc", "D545402QovC2W5g8")//初始化 需要在Applicaiton 中 AdSdk.init(this, "ddcy-az-hdgj_vbskkc", "D545402QovC2W5g8")//初始化 需要在Applicaiton 中
registerActivityLifecycleCallbacks(activityLifecycleCallbacks) //registerActivityLifecycleCallbacks(activityLifecycleCallbacks)
} }
override fun attachBaseContext(base: Context?) { override fun attachBaseContext(base: Context?) {
......
...@@ -48,7 +48,7 @@ object CashExchangeDialog : CashExchangeContract.View { ...@@ -48,7 +48,7 @@ object CashExchangeDialog : CashExchangeContract.View {
val recyclerexchange = mDialog?.findViewById<RecyclerView>(R.id.rl_cash_exchage) val recyclerexchange = mDialog?.findViewById<RecyclerView>(R.id.rl_cash_exchage)
recyclerexchange?.layoutManager = LinearLayoutManager(context) recyclerexchange?.layoutManager = LinearLayoutManager(context)
cashExchangeAdapter = CashExchangeAdapter(context) cashExchangeAdapter = CashExchangeAdapter(context, mDialog!!)
recyclerexchange?.adapter = cashExchangeAdapter recyclerexchange?.adapter = cashExchangeAdapter
mDialogView?.findViewById<ImageView>(R.id.iv_dialog_close).setOnClickListener { mDialogView?.findViewById<ImageView>(R.id.iv_dialog_close).setOnClickListener {
mDialog?.dismiss() mDialog?.dismiss()
......
...@@ -429,7 +429,8 @@ object MainDialog { ...@@ -429,7 +429,8 @@ object MainDialog {
id: Int?, id: Int?,
type: Int?, type: Int?,
jine: String?, jine: String?,
isWelfarePage:Boolean isWelfarePage:Boolean,
dialog:Dialog
) { ) {
if (context == null) { if (context == null) {
...@@ -509,12 +510,16 @@ object MainDialog { ...@@ -509,12 +510,16 @@ object MainDialog {
imggoon.setOnClickListener { imggoon.setOnClickListener {
if (buttonStatus == 0) { if (buttonStatus == 0) {
mDialog.dismiss() mDialog.dismiss()
} else { } else if (buttonStatus == 1){
mDialog.dismiss() mDialog.dismiss()
dialog.dismiss()
if (!isWelfarePage) { if (!isWelfarePage) {
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){
mDialog.dismiss()
dialog.dismiss()
} }
} }
......
...@@ -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.2.14' api 'com.ym.admodule:admodule:1.0.2.15'
api 'com.airbnb.android:lottie:3.1.0' api 'com.airbnb.android:lottie:3.1.0'
/* api 'androidx.appcompat:appcompat:1.2.0-alpha02' /* api 'androidx.appcompat:appcompat:1.2.0-alpha02'
api 'com.android.support:design:28.0.0' api 'com.android.support:design:28.0.0'
......
...@@ -34,6 +34,7 @@ object AdUtils { ...@@ -34,6 +34,7 @@ object AdUtils {
override fun onAdShow() { override fun onAdShow() {
Utils.showToast(activity, "看完视频可获得奖励") Utils.showToast(activity, "看完视频可获得奖励")
// AdManager.loadNextCacheRewardVideoAd(ADConfig.AD_VIDEO, activity!!)
} }
override fun onAdVideoBarClick() {} override fun onAdVideoBarClick() {}
......
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
<!-- 中间的图片 --> <!-- 中间的图片 -->
<bitmap <bitmap
android:gravity="bottom" android:gravity="bottom"
android:src="@drawable/logo" /> android:src="@drawable/duoduokaipingye" />
</item> </item>
</layer-list> </layer-list>
\ No newline at end of file
...@@ -30,7 +30,7 @@ class SettingActivity : BaseActivity() { ...@@ -30,7 +30,7 @@ class SettingActivity : BaseActivity() {
private var adView: Any? = null private var adView: Any? = null
override fun init() { override fun init() {
EventUtils.onEvent("show_setting", "设置页面曝光")
adView = null adView = null
if (SettingPreference.getUserInfoData() != null) { if (SettingPreference.getUserInfoData() != null) {
id_tv_id.text = "ID: ${SettingPreference.getUserInfoData().uid}" id_tv_id.text = "ID: ${SettingPreference.getUserInfoData().uid}"
...@@ -50,8 +50,10 @@ class SettingActivity : BaseActivity() { ...@@ -50,8 +50,10 @@ class SettingActivity : BaseActivity() {
id_notif_check.setOnCheckedChangeListener(CompoundButton.OnCheckedChangeListener { compoundButton, b -> id_notif_check.setOnCheckedChangeListener(CompoundButton.OnCheckedChangeListener { compoundButton, b ->
SettingPreference.setNotice(b) SettingPreference.setNotice(b)
if (b) { if (b) {
EventUtils.onEvent("notification_off", "关通知栏按钮点击")
RxBus.get().post("refresh_login", "open_notif") RxBus.get().post("refresh_login", "open_notif")
} else { } else {
EventUtils.onEvent("notification_on", "开通知栏按钮点击")
RxBus.get().post("refresh_login", "close_notif") RxBus.get().post("refresh_login", "close_notif")
} }
}) })
......
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