Commit ca2c94cf authored by maxiaoliang's avatar maxiaoliang

修改bug和ui

parent e322a929
......@@ -66,6 +66,7 @@
<activity
android:name="com.ym.msdh.game.activity.SplashActivity"
android:noHistory="false"
android:screenOrientation="portrait"
android:theme="@style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......@@ -94,7 +95,7 @@
<!-- android:exported="true" />-->
<activity
android:name="com.ym.msdh.game.GameActivity"
android:exported="true"
android:screenOrientation="portrait"
android:launchMode="singleTask" /> <!-- 友盟配置 -->
<meta-data
android:name="UMENG_APPKEY"
......
......@@ -5,6 +5,7 @@ import android.app.Dialog
import android.content.ComponentName
import android.content.Intent
import android.content.ServiceConnection
import android.content.pm.ActivityInfo
import android.os.Bundle
import android.os.Handler
import android.os.IBinder
......@@ -47,6 +48,7 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
EventUtils.onEvent("tab_imp", "美食大亨")
setRequestedOrientation(ActivityInfo .SCREEN_ORIENTATION_PORTRAIT);//竖屏
if (SettingPreference.getIsShowGuide()) {
SettingPreference.setIsShowGuide(false)
}
......@@ -86,8 +88,7 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
// }
openNotif()
AdUtils.loadNextCacheRewardVideoAd(this)
AdUtils.loadFeedCacheAdToCache(this)
}
override fun onDestroy() {
......@@ -1248,6 +1249,7 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
//订单弹窗
fun showOrderDialog() {
Log.e("MXL","asda")
EventUtils.onEvent("dingdan_click")
GameApiClient.gameApi.getHomeWList().compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<OrderEntity>() {
......@@ -1280,6 +1282,7 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
.compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<WithdrawEntity>() {
override fun onSuccess(result: WithdrawEntity) {
callUnity("TitleView", "getHomeInfo", "")
callUnity("orderview", "getOrderData", "")
MainDialog.showWithDraw( this@GameActivity,
result?.status ?: 0,
......
......@@ -15,7 +15,10 @@ import com.ym.library.module.ClockInWithdrawEntity
import com.ym.library.module.ExchangeEntity
import com.ym.library.net.BaseActivity
import com.ym.library.utils.EventUtils
import com.ym.library.utils.GameDialog
import com.ym.library.utils.SettingPreference
import com.ym.msdh.R
import com.ym.msdh.game.utils.CenterDialog
import kotlinx.android.synthetic.main.activity_clock_in_withdraw.*
//打卡提现 福利
......@@ -33,6 +36,8 @@ class ClockInWithdrawActitivy : BaseActivity(), ClockInWithdrawContract.View,
override fun init() {
EventUtils.onEvent("daka_show")
mPresenter = ClockInWithdrawPresenter(this)
iv_clock_in_close?.setOnClickListener {
finish()
......
......@@ -176,5 +176,10 @@ class SplashActivity : BaseActivity(), SplashContract.View {
return false
}
override fun onPause() {
super.onPause()
AdUtils.loadNextCacheRewardVideoAd(this)
AdUtils.loadFeedCacheAdToCache(this)
}
}
\ No newline at end of file
......@@ -41,6 +41,14 @@ class WelfareActivity : BaseActivity(), WelfareContract.View,
override fun init() {
EventUtils.onEvent("fuli_show")
if (SettingPreference.getDiamandWithDraw()) {
GameDialog.showDiamondWithdrawal(this, View.OnClickListener {
SettingPreference.setDiamandWithDraw(false)
})
} else {
}
mPresenter = WelfarePresenter(this)
iv_welfare_close?.setOnClickListener {
finish()
......
......@@ -36,9 +36,36 @@ class OrderAdapter : BaseRecyclerAdapter<OrderEntity.FarmOrderDataListBean, Orde
holder?.progess_order_bar.progress = data?.ownNum?:0
holder?.tv_order_progress.text =
Html.fromHtml("<font color=\"#FC6002\">${data?.ownNum}</font>/${data?.targetNum}")
if (data.imgUrl != null) {
Glide.with(mContext!!).load(data?.imgUrl).into(holder?.iv_order_item_img)
when(data.id){
1->{
holder?.iv_order_item_img.setImageResource(R.drawable.icon_one)
}
2->{
holder?.iv_order_item_img.setImageResource(R.drawable.icon_two)
}
3->{
holder?.iv_order_item_img.setImageResource(R.drawable.icon_three)
}
4->{
holder?.iv_order_item_img.setImageResource(R.drawable.icon_four)
}
5->{
holder?.iv_order_item_img.setImageResource(R.drawable.icon_five)
}
6->{
holder?.iv_order_item_img.setImageResource(R.drawable.icon_six)
}
7->{
holder?.iv_order_item_img.setImageResource(R.drawable.icon_seven)
}
8->{
holder?.iv_order_item_img.setImageResource(R.drawable.icon_eight)
}
}
//
// if (data.imgUrl != null) {
// Glide.with(mContext!!).load(data?.imgUrl).into(holder?.iv_order_item_img)
// }
}
......@@ -65,4 +92,5 @@ class OrderAdapter : BaseRecyclerAdapter<OrderEntity.FarmOrderDataListBean, Orde
tv_order_progress = itemView.findViewById(R.id.tv_order_progress)
}
}
}
\ No newline at end of file
......@@ -7,6 +7,7 @@ import android.text.Html
import android.text.TextUtils
import android.view.*
import android.widget.*
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.ym.library.listener.OnRecycleItemClickListener
import com.ym.msdh.game.view.MainDialog
......@@ -22,6 +23,7 @@ import com.ym.library.module.NewsEntity
import com.ym.library.module.TaskCompleteEntity
import com.ym.library.net.GameApiClient
import com.ym.library.utils.EventUtils
import com.ym.library.utils.FilterUtils
import com.ym.msdh.R
/**
......@@ -57,7 +59,7 @@ class WateringTaskAdpater :
holder.tvCount.text = "+${data?.awardRangeStart}~${data?.awardRangeEnd}"
} else {
holder.tvCount.text = "+${data.coins}"
holder.tvCount.text = "+${data.coins} "
}
if (data?.adRenderStyle != null && data?.adRenderStyle == 1) {
......@@ -83,18 +85,22 @@ class WateringTaskAdpater :
holder.imgcoin.setImageResource(R.drawable.icon_pop_coin)
if (!TextUtils.isEmpty(data.description)) {
holder.btnProgess.visibility = View.GONE
holder.llprogesbg.visibility=View.GONE
holder.tvDesc.visibility=View.VISIBLE
holder.tvDesc.text=data.description
holder.tvTitle.text = data.title+" (${data.current_nums}/${data.awardLimit})"
holder.tvProgess.text = data.description
} else {
holder.btnProgess.visibility = View.VISIBLE
holder.llprogesbg.visibility=View.VISIBLE
holder.tvDesc.visibility=View.GONE
holder.btnProgess.max = data.awardLimit!!
holder.btnProgess.setProgress(data.current_nums!!)
// holder.tvProgess.text = "${data.current_nums}/${data.awardLimit}"
holder.tvProgess.text = Html.fromHtml("<font color=\"#FC6002\">${data?.current_nums}</font>/${data.awardLimit}")
}
holder.ivStatus.addClickScale()
//holder.ivStatus.addClickScale()
FilterUtils.addClickAlpha(holder.ivStatus)
holder.ivStatus.setOnClickListener {
if (!isClick) {
isClick = true
......@@ -137,9 +143,9 @@ class WateringTaskAdpater :
}
val layoutParams = RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.MATCH_PARENT,
RelativeLayout.LayoutParams.WRAP_CONTENT
val layoutParams = LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
Utils.dip2px(76)
)
if (position == mList.size - 1) {
layoutParams.setMargins(0, 0, 0, Utils.dip2px(20f))
......@@ -162,10 +168,11 @@ class WateringTaskAdpater :
// val btnProgess: ProgressButton = itemView.findViewById(R.id.progess_watering_item)
val btnProgess: ProgressBar = itemView.findViewById(R.id.progess_watering_item)
val tvProgess: TextView = itemView.findViewById(R.id.tv_watering_item_progess)
val tvDesc: TextView = itemView.findViewById(R.id.id_tv_desc)
val tvCount: TextView = itemView.findViewById(R.id.tv_watering_item_count)
val ivStatus: ImageView = itemView.findViewById(R.id.tv_watering_item_status)
val imgcoin: ImageView = itemView.findViewById(R.id.img_icon_item)
val llprogesbg:LinearLayout=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)
......
......@@ -14,6 +14,7 @@ import com.ym.library.base.BaseRecyclerAdapter
import com.ym.library.utils.Utils
import com.ym.library.module.NewsEntity
import com.ym.library.utils.FilterUtils
import com.ym.msdh.R
/**
......@@ -81,7 +82,7 @@ class WelfareTaskAdpater :
holder?.itemView?.setOnClickListener {
listener.onItemClick(it, position, mList[position])
}
FilterUtils.addClickAlpha(holder.ivStatus)
// 0未完成 1已领取 2可领取
when (data.status) {
0 -> {
......
......@@ -52,13 +52,13 @@ 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
// NetConfig.BASE_FEED_URL="https://fsapi.ihuomao.com/"
// NetConfig.BASE_AD_URL="https://bs.ihuomao.com/"
// NetConfig.URL_REPORT_BASE="http://report.ihuomao.com/"
//TODO 上线去掉测试地址
NetConfig.BASE_FEED_URL = "http://feedapitest2.zhangxinhulian.com/"
// NetConfig.BASE_FEED_URL = "http://feedapitest2.zhangxinhulian.com/"
//AdManager.init(this,"afcbef40e31631d3")
AdManager.init(this,"b1c85b22f06d1990")
......
package com.ym.msdh.game.presenter
import android.app.Activity
import android.view.View
import com.ym.msdh.game.contract.ClockInWithdrawContract
import com.ym.msdh.game.listener.IDialogViewCloseCallback
import com.ym.msdh.game.view.MainDialog
......@@ -11,6 +12,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.GameDialog
class ClockInWithdrawPresenter : ClockInWithdrawContract.Presenter {
......@@ -60,17 +62,20 @@ class ClockInWithdrawPresenter : ClockInWithdrawContract.Presenter {
var type = result.type
if (type != null) {
EventUtils.onEvent("attendance_task_box_receive_dialog_show")
MainDialog.showopenBox(
activity, type,
"宝箱奖励",
"${result.awardNum ?: 0}",
result,
object : IDialogViewCloseCallback {
override fun onCloseViewSuccess(isSuccess: Boolean) {
GameDialog.showGetCash(activity,0,result.awardNum!!,View.OnClickListener {
}
}
)
})
// MainDialog.showopenBox(
// activity, type,
// "宝箱奖励",
// "${result.awardNum ?: 0}",
// result,
// object : IDialogViewCloseCallback {
// override fun onCloseViewSuccess(isSuccess: Boolean) {
//
// }
// }
// )
}
}
}
......
......@@ -136,6 +136,7 @@ object MainDialog {
val ivGetDropBg3 = mDialogView?.findViewById<ImageView>(R.id.iv_get_drop_bg3)
val tvGetDropCount3 = mDialogView?.findViewById<TextView>(R.id.tv_get_drop_count3)
val tvget = mDialogView?.findViewById<TextView>(R.id.id_tv_gongxi_get)
val btn_get_drop_happy_accept=mDialog?.findViewById<ImageView>(R.id.btn_get_drop_happy_accept)
//3 种子 4 金币 5 加速剂
when (type) {
3 -> {
......@@ -181,7 +182,7 @@ object MainDialog {
}
AdUtils.showFeedAd(context, adType, layoutAd)
FilterUtils.addClickAlpha(btn_get_drop_happy_accept)
mDialogView.findViewById<ImageView>(R.id.btn_get_drop_happy_accept).setOnClickListener {
mDialog.dismiss()
}
......@@ -206,33 +207,29 @@ object MainDialog {
fun setImage(img: ImageView, id: Int) {
when (id) {
1 -> {
img.setImageResource(R.mipmap.img_cabbage)
img.setImageResource(R.mipmap.icon_one)
}
2 -> {
img.setImageResource(R.mipmap.img_tomato)
img.setImageResource(R.mipmap.icon_two)
}
3 -> {
img.setImageResource(R.mipmap.img_pumpkin)
img.setImageResource(R.mipmap.icon_three)
}
4 -> {
img.setImageResource(R.mipmap.img_radish)
img.setImageResource(R.mipmap.icon_four)
}
5 -> {
img.setImageResource(R.mipmap.img_corn)
img.setImageResource(R.mipmap.icon_five)
}
6 -> {
img.setImageResource(R.mipmap.img_eggplant)
img.setImageResource(R.mipmap.icon_six)
}
7 -> {
img.setImageResource(R.mipmap.img_melon)
img.setImageResource(R.mipmap.icon_seven)
}
8 -> {
img.setImageResource(R.mipmap.img_grape)
img.setImageResource(R.mipmap.icon_eight)
}
9 -> {
img.setImageResource(R.mipmap.img_strawberry)
}
}
}
......
......@@ -149,7 +149,7 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View,
// singinDropsAdapter?.clear()
// singinDropsAdapter?.appendToList(data.signInfoList)
// singinDropsAdapter?.notifyDataSetChanged()
tv_tomAwardNum?.text = "${data.tomAwardNum}"
tv_tomAwardNum?.text = " ${data.tomAwardNum} "
if (data.isPop == 1) {
//首次签到弹窗
MainDialog.showgetWaterDrop(mContext, 4, "singin", data.awardNum, null)
......
......@@ -47,8 +47,8 @@ object WareHouseDialog : WareHouseContract.View {
rl?.layoutManager =
GridLayoutManager(context,3)
val stringIntegerHashMap: HashMap<String, Int> = HashMap()
stringIntegerHashMap[RecyclerViewSpacesItemDecoration.TOP_DECORATION] = 28 //top间距
stringIntegerHashMap[RecyclerViewSpacesItemDecoration.BOTTOM_DECORATION] = 28 //底部间距
stringIntegerHashMap[RecyclerViewSpacesItemDecoration.TOP_DECORATION] = 0 //top间距
stringIntegerHashMap[RecyclerViewSpacesItemDecoration.BOTTOM_DECORATION] = 30 //底部间距
stringIntegerHashMap[RecyclerViewSpacesItemDecoration.LEFT_DECORATION] = 48 //左边间距
stringIntegerHashMap[RecyclerViewSpacesItemDecoration.RIGHT_DECORATION] = 48 //右边间距
rl?.addItemDecoration(RecyclerViewSpacesItemDecoration(stringIntegerHashMap))
......
......@@ -42,7 +42,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="登即同意"
android:text="登即同意"
android:textColor="#874700"
android:textSize="@dimen/dp_13" />
......
......@@ -18,7 +18,7 @@
android:layout_centerHorizontal="true"
android:layout_marginTop="6dp"
android:layout_marginRight="5dp"
android:background="@drawable/icon_base_dialog_bg">
android:background="@drawable/icon_title_six_bg">
<RelativeLayout
android:layout_width="match_parent"
......@@ -68,7 +68,8 @@
android:layout_marginTop="11dp"
android:includeFontPadding="false"
android:textColor="#095100"
android:textSize="18sp"
android:textSize="20sp"
android:textStyle="bold"
tools:text="+40g" />
</LinearLayout>
......@@ -96,7 +97,8 @@
android:layout_marginTop="11dp"
android:includeFontPadding="false"
android:textColor="#095100"
android:textSize="18sp"
android:textSize="20sp"
android:textStyle="bold"
tools:text="+40g" />
</LinearLayout>
......@@ -124,7 +126,8 @@
android:layout_marginTop="@dimen/dp_11"
android:includeFontPadding="false"
android:textColor="#095100"
android:textSize="18sp"
android:textSize="20sp"
android:textStyle="bold"
tools:text="+40g" />
</LinearLayout>
</LinearLayout>
......
......@@ -71,8 +71,8 @@
android:layout_below="@+id/layout_order_info"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:layout_marginBottom="30dp" />
android:layout_marginTop="10dp"
/>
</RelativeLayout>
......
......@@ -30,9 +30,10 @@
<ImageView
android:id="@+id/id_seed_not_enough_img"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:src="@mipmap/icon_two"
android:layout_marginTop="80dp" />
<RelativeLayout
......@@ -64,7 +65,7 @@
android:drawablePadding="4dp"
android:gravity="center"
android:includeFontPadding="false"
android:text="299"
android:text="0"
android:textColor="@color/white"
android:textSize="22sp" />
......
......@@ -10,7 +10,9 @@
android:id="@+id/iv_order_item_img"
android:layout_width="46dp"
android:layout_height="44dp"
android:layout_centerVertical="true" />
android:layout_marginRight="@dimen/dp_10"
android:layout_centerVertical="true"
android:src="@drawable/icon_five"/>
<TextView
android:id="@+id/tv_order_item_title"
......
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll_one"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_90"
android:layout_height="76dp"
android:background="@drawable/icon_luck_task">
<TextView
android:id="@+id/id_img_lucy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="17dp"
android:layout_marginTop="6dp"
android:layout_marginLeft="6dp"
android:includeFontPadding="false"
android:text="幸运任务"
android:textColor="#FAFFE6"
......@@ -20,7 +19,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="25dp"
android:layout_marginLeft="15dp"
android:orientation="vertical">
<TextView
......@@ -37,15 +36,15 @@
android:id="@+id/layout_watering_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:gravity="center">
android:layout_marginTop="9dp"
android:visibility="gone">
<ProgressBar
android:id="@+id/progess_watering_item"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="150dp"
android:layout_height="10dp"
android:layout_marginRight="6dp"
android:layout_marginRight="3dp"
android:progressDrawable="@drawable/user_item_progressbar_bg" />
<TextView
......@@ -57,7 +56,14 @@
android:textColor="#722E01"
android:textSize="10sp" />
</LinearLayout>
<TextView
android:id="@+id/id_tv_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="浏览4篇资讯可领奖"
android:textColor="#94491A"
android:textSize="@dimen/sp_12"
android:layout_marginTop="@dimen/dp_7"/>
</LinearLayout>
......@@ -66,12 +72,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/dp_20">
android:layout_marginRight="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginBottom="@dimen/dp_7">
<ImageView
android:id="@+id/img_icon_item"
android:layout_width="@dimen/dp_22"
android:layout_height="@dimen/dp_22"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_marginRight="@dimen/dp_3"
android:src="@drawable/icon_pop_coin" />
......@@ -79,20 +87,21 @@
android:id="@+id/tv_watering_item_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="+0"
android:textColor="#ED5430"
android:textSize="@dimen/sp_18"
android:text="+100"
android:textColor="#FC6002"
android:textSize="@dimen/sp_13"
android:includeFontPadding="false"
android:textStyle="bold" />
</LinearLayout>
<ImageView
android:id="@+id/tv_watering_item_status"
android:layout_width="wrap_content"
android:layout_marginRight="16dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginBottom="12dp"
android:layout_alignParentBottom="true"
android:layout_marginRight="@dimen/dp_20"
android:layout_marginBottom="@dimen/dp_19"
android:src="@mipmap/icon_mian_popup_complete" />
......
......@@ -35,7 +35,7 @@
</LinearLayout>
<com.ym.library.widget.MediumBoldTextView
<TextView
android:id="@+id/tv_welfare_item_subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -11,6 +11,7 @@
<dimen name="dp_4.5">4.5dp</dimen>
<dimen name="dp_5">5dp</dimen>
<dimen name="dp_6">6dp</dimen>
<dimen name="dp_7">7dp</dimen>
<dimen name="dp_8">8dp</dimen>
<dimen name="dp_9">9dp</dimen>
<dimen name="dp_10">10dp</dimen>
......@@ -64,6 +65,7 @@
<dimen name="dp_79">79dp</dimen>
<dimen name="dp_80">80dp</dimen>
<dimen name="dp_84">84dp</dimen>
<dimen name="dp_88">88dp</dimen>
<dimen name="dp_98">92dp</dimen>
<dimen name="dp_96">96dp</dimen>
<dimen name="dp_94">94dp</dimen>
......
PACKAGE_NAME=com.ym.msdh
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
......@@ -31,6 +31,9 @@ allprojects {
maven{
url "http://zx-maven.huolea.com/repository/admodule/"
}
maven {
url "https://dl.bintray.com/mintegral-official/Andorid_ad_SDK_for_china"
}
}
}
......
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">LuckyFarm</string>
<string name="app_name">GoogFood</string>
<string name="game_view_content_description">Game view</string>
</resources>
\ 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.3'
api 'com.ym.admodule:admodule:1.0.3.15'
api 'com.airbnb.android:lottie:3.1.0'
/* api 'androidx.appcompat:appcompat:1.2.0-alpha02'
api 'com.android.support:design:28.0.0'
......
......@@ -1100,7 +1100,7 @@ abstract class JavaInterface {
if(type==1){
Toast.makeText(act, "看完福利视频即可继续刮卡", Toast.LENGTH_SHORT).show()
}else if(type==2){
Toast.makeText(act, "观看完激励视频即可继续获取心愿值", Toast.LENGTH_SHORT).show()
// Toast.makeText(act, "观看完激励视频即可继续获取心愿值", Toast.LENGTH_SHORT).show()
}else if(type==3){
//TODO 每日分红
}
......
......@@ -19,7 +19,25 @@ public class NewLandListEntity {
private int rate;
private int configNum;
private float timeRate;
private int videoRate;
private int videoRate;
private int stopConfigNum;
private int currentWormNum;
public int getStopConfigNum() {
return stopConfigNum;
}
public void setStopConfigNum(int stopConfigNum) {
this.stopConfigNum = stopConfigNum;
}
public int getCurrentWormNum() {
return currentWormNum;
}
public void setCurrentWormNum(int currentWormNum) {
this.currentWormNum = currentWormNum;
}
public int getVideoRate() {
return videoRate;
......
......@@ -26,6 +26,7 @@ import com.ym.library.module.ReportEntity;
import com.ym.library.rxbus.RxBusUtil;
import com.ym.library.utils.EventUtils;
import com.ym.library.utils.Utils;
import com.ym.modulecommon.AppLibraryConfig;
/**
* Created by gaoleichao on 2019/4/17
......@@ -35,6 +36,7 @@ public abstract class BaseActivity extends com.ym.modulecommon.base.BaseActivity
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
RxBusUtil.getDefault().register(this);
AppLibraryConfig.ActivityConfig.isProhibitScreenshot=false;
}
@Override
protected void onDestroy() {
......
......@@ -271,7 +271,7 @@ public class NetConfig {
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/clock_receive";//打卡普通打卡任务领取
public static final String URL_GAME_VIDEO_TASK_COMPLETE = "app/v1/game/video_task_complete";//看领金币视频任务
public static final String URL_GAME_WAREHOUSEDATA = "app/v1/game/ddcy/warehouseData";//仓库列表
......
......@@ -46,6 +46,7 @@ object AdUtils {
override fun onSuccess() {}
override fun onAdClose() {
Log.e("ADUTIL","onAdClose")
listener?.onAdClose()
//预加载
loadNextCacheRewardVideoAd(activity)
......
......@@ -315,7 +315,7 @@ object GameDialog : BaseDialog() {
/**
* 集齐钻石提现步骤
*/
fun showDiamondWithdrawal(activity: Activity) {
fun showDiamondWithdrawal(activity: Activity,listener: View.OnClickListener) {
if (activity == null) return
val mDialog = Dialog(activity, R.style.UpdateVersionCompatDialogTheme)
val mDialogView =
......@@ -330,6 +330,7 @@ object GameDialog : BaseDialog() {
val iv_diamoind_close = mDialogView.findViewById<ImageView>(R.id.iv_diamoind_close)
iv_diamoind_close.setOnClickListener {
mDialog?.dismiss()
listener.onClick(it)
}
mDialog.setCanceledOnTouchOutside(false)
......@@ -382,6 +383,7 @@ object GameDialog : BaseDialog() {
}
iv_diamoind_close.setOnClickListener {
listener2.onClick(null)
mDialog?.dismiss()
}
......
......@@ -130,6 +130,7 @@ public class SettingPreference {
private static final String SHOW_PRIVACY_PROTOCOL = "show_privacy_protocol";//是否同意隐私协议
private static final String SHOW_FIVE_WITHDRAW = "show_five_withdraw";//5首提现
private static final String SHOW_DIAMAND_WITHDRAW = "show_diamand_withdraw";//钻石提现
private static final String SHOW_NOTIFICATION = "show_notification";//通知栏
......@@ -2042,4 +2043,19 @@ public class SettingPreference {
boolean isShow = settings.getBoolean(SHOW_FIVE_WITHDRAW, true);
return isShow;
}
//钻石提现
public static void setDiamandWithDraw(boolean isShow) {
SharedPreferences settings = AppliContext.get().getSharedPreferences(USER_SETTING, 0);
SharedPreferences.Editor editor = settings.edit();
editor.putBoolean(SHOW_DIAMAND_WITHDRAW, isShow);
editor.commit();
}
//钻石提现
public static boolean getDiamandWithDraw() {
SharedPreferences settings = AppliContext.get().getSharedPreferences(USER_SETTING, 0);
boolean isShow = settings.getBoolean(SHOW_DIAMAND_WITHDRAW, true);
return isShow;
}
}
This diff is collapsed.
This diff is collapsed.
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