Commit f0863275 authored by maxiaoliang's avatar maxiaoliang

修改ui显示

parent 401b8dbc
......@@ -13,6 +13,7 @@ import androidx.recyclerview.widget.RecyclerView
import com.ym.cms.listener.OnRecycleItemClickListener
import com.ym.game.module.WateringTaskEntity
import com.ym.game.net.GameApiClient
import com.ym.game.presenter.WateringRewardPresenter
import com.ym.game.view.MainDialog
import com.ym.library.base.BaseRecyclerAdapter
import com.ym.library.net.BaseObserver
......@@ -68,7 +69,8 @@ class WateringTaskAdpater :
holder.ivStatus.setOnClickListener {
if (Utils.isFastClick()) {
when (data.status) {
0 -> listener.onItemClick(it, position, mList[position])
0 ->
listener.onItemClick(it, position, mList[position])
1 -> Utils.showToast(mContext, "您已经领过了哦~")
//领取
2 -> getDripTaskReceive(type, data)
......@@ -119,20 +121,18 @@ class WateringTaskAdpater :
RxSchedulers.observableIO2Main()
).subscribe(object : BaseObserver<Any>() {
override fun onSuccess(result: Any?) {
RxBusUtil.getDefault()
.send(RxBusConstant.RX_MAIN_WATER_DROP_UPDATE)
if (result != null) {
LogUtils.i("WateringTaskAdpater", "水滴领取" + result)
var adType = ""
if (type == 1) {
RxBusUtil.getDefault()
.send(RxBusConstant.RX_MAIN_WATER_DROP_UPDATE)
adType = "每日"
} else if (type == 2) {
RxBusUtil.getDefault()
.send(RxBusConstant.RX_MAIN_HIGH_WATER_DROP_UPDATE)
adType = "高额"
}
MainDialog.showgetWaterDrop(mContext, 4, adType, data.awardNum, null)
RxBusUtil.getDefault().send(RxBusConstant.RX_MAIN_UPDATE_HOME_INFO)
}
}
......
......@@ -31,7 +31,7 @@ class BaseApplication : MultiDexApplication() {
//第一步初始化 application
AppliContext.init(this)
Config.init(this)
NetConfig.setBase_Url(NetConfig.Environment.PRODUCT)// TODO 上线之后提成成 NetConfig.Environment.PRODUCT
NetConfig.setBase_Url(NetConfig.Environment.DEV)// TODO 上线之后提成成 NetConfig.Environment.PRODUCT
Constant.appLs = "5ea353dac826a125 "//appls
AdManager.init(//TODO 替换id
......
......@@ -62,6 +62,7 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View,
// ToponManager.initNativeAd((mContext as Activity), AdID.AD_DAILY_DRIP_BIGIMAGE)
// ToponManager.initNativeAd((mContext as Activity), AdID.AD_LUCKY_DAILY_WATER_VIDEO)
// ToponManager.initRewardAd((mContext as Activity), AdID.AD_LUCKY_WATER_HIGH_VIDEO)
RxBusUtil.getDefault().register(this)
mPresenter = WateringRewardPresenter(this)
view = LayoutInflater.from(mContext).inflate(R.layout.layout_popup_drops, null)
EventUtils.onEvent("show_receive_coin_task_dialog", "领金币任务")
......@@ -97,7 +98,8 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View,
}
@SuppressLint()
@Subscribe(code = RxBusConstant.RX_MAIN_WATER_DROP_UPDATE, threadMode = ThreadMode.MAIN)
fun updateList() {
mPresenter?.getRrchardDailyTask()
}
......@@ -272,6 +274,7 @@ class SiginDropsPopupwindow : PopupWindow(), WateringRewardContract.View,
override fun dismiss() {
mListener?.onCloseViewSuccess(true)
super.dismiss()
RxBusUtil.getDefault().unregister(this)
LogUtils.i(TAG, "dismiss")
}
......
......@@ -65,7 +65,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:text="每日12:00 18:00 00:00重置"
android:text="每日12:00 18:00 21:00 00:00重置"
android:textColor="@color/white"
android:textSize="16sp" />
......
......@@ -75,8 +75,8 @@
<ImageView
android:id="@+id/iv_popup_close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="@dimen/dp_32"
android:layout_height="@dimen/dp_32"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:src="@mipmap/icon_main_popup_close" />
......
......@@ -3,22 +3,6 @@
package="com.ym.module.userinfo">
<application>
<activity
android:name="com.ym.userinfo.module.activity.WithdrawalsRecordActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:launchMode="singleTop"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="withdrawals_record"
android:scheme="quweiguesssong" />
</intent-filter>
</activity>
<activity
android:name="com.ym.userinfo.module.activity.SettingActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
......
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