Commit 030cb772 authored by Li's avatar Li

[李俊岐]修改提现弹窗

parent d0e9f033
...@@ -267,11 +267,14 @@ object MainDialog { ...@@ -267,11 +267,14 @@ object MainDialog {
val ivGetDropBg3 = mDialogView?.findViewById<ImageView>(R.id.iv_get_drop_bg3) val ivGetDropBg3 = mDialogView?.findViewById<ImageView>(R.id.iv_get_drop_bg3)
val tvGetDropCount3 = mDialogView?.findViewById<TextView>(R.id.tv_get_drop_count3) val tvGetDropCount3 = mDialogView?.findViewById<TextView>(R.id.tv_get_drop_count3)
var tvget = mDialogView?.findViewById<TextView>(R.id.id_tv_gongxi_get) var tvget = mDialogView?.findViewById<TextView>(R.id.id_tv_gongxi_get)
val btn_get_drop_happy_accept = mDialogView.findViewById<ImageView>(R.id.btn_get_drop_happy_accept) var layout_get_water_root =
mDialogView?.findViewById<LinearLayout>(R.id.layout_get_water_root)
val btn_get_drop_happy_accept =
mDialogView.findViewById<ImageView>(R.id.btn_get_drop_happy_accept)
//3 种子 4 金币 5 加速剂 //3 种子 4 金币 5 加速剂
when (type) { when (type) {
1 -> { 1 -> {
tvget.text = "恭喜获得种子" tvget.text = "恭喜获得"
llcontent2.visibility = View.GONE llcontent2.visibility = View.GONE
llcontent3.visibility = View.GONE llcontent3.visibility = View.GONE
if (result.seedList?.size == 1) { if (result.seedList?.size == 1) {
...@@ -302,7 +305,7 @@ object MainDialog { ...@@ -302,7 +305,7 @@ object MainDialog {
tvGetDropCount.text = "+${rewardCount}" tvGetDropCount.text = "+${rewardCount}"
} }
3 -> { 3 -> {
tvget.text = "恭喜获得加速" tvget.text = "恭喜获得加速"
ivGetDropBg.setImageResource(R.mipmap.icon_speed_water) ivGetDropBg.setImageResource(R.mipmap.icon_speed_water)
tvGetDropCount.text = "+${rewardCount}" tvGetDropCount.text = "+${rewardCount}"
} }
...@@ -332,6 +335,12 @@ object MainDialog { ...@@ -332,6 +335,12 @@ object MainDialog {
if (!context?.isFinishing) { if (!context?.isFinishing) {
mDialog?.show() mDialog?.show()
} }
layoutAd?.postDelayed({
if (layoutAd?.visibility == View.VISIBLE) {
layout_get_water_root.gravity = Gravity.BOTTOM
}
}, 500)
} }
//福利中心开宝箱 //福利中心开宝箱
...@@ -421,8 +430,8 @@ object MainDialog { ...@@ -421,8 +430,8 @@ object MainDialog {
id: Int?, id: Int?,
type: Int?, type: Int?,
jine: String?, jine: String?,
isWelfarePage:Boolean, isWelfarePage: Boolean,
dialog:Dialog dialog: Dialog
) { ) {
if (context == null) { if (context == null) {
...@@ -438,18 +447,24 @@ object MainDialog { ...@@ -438,18 +447,24 @@ object MainDialog {
Gravity.CENTER Gravity.CENTER
) )
val imgtitle = mDialogView?.findViewById<ImageView>(R.id.id_img_title) // val imgtitle = mDialogView?.findViewById<ImageView>(R.id.id_img_title)
val tv_withdraw_title = mDialogView?.findViewById<TextView>(R.id.tv_withdraw_title)
val tvcashcontent = mDialogView?.findViewById<TextView>(R.id.id_tv_cash_content) val tvcashcontent = mDialogView?.findViewById<TextView>(R.id.id_tv_cash_content)
val imggoon = mDialogView?.findViewById<ImageView>(R.id.id_tv_go_on_make_money) val imggoon = mDialogView?.findViewById<ImageView>(R.id.id_tv_go_on_make_money)
tv_withdraw_title.text = title
tvcashcontent.text = reason
when (status) { when (status) {
1 -> { 1 -> {
imgtitle.setImageResource(R.mipmap.img_duihuan_success) // imgtitle.setImageResource(R.mipmap.img_duihuan_success)
imggoon.setImageResource(R.mipmap.img_go_on_make_money) imggoon.setImageResource(R.drawable.icon_dialog_zuanqian)
if (type == 1) { if (type == 1) {
EventUtils.onEvent("show_xinshou0.3", "新手0.3") EventUtils.onEvent("show_xinshou0.3", "新手0.3")
} else if (type == 4) { } else if (type == 4) {
EventUtils.onEvent("show_fuli0.3", "福利0.3") EventUtils.onEvent("show_fuli0.3", "福利0.3")
} else if (type == 7){ } else if (type == 7) {
EventUtils.onEvent("welfare_withdraw_success_dialog_show") EventUtils.onEvent("welfare_withdraw_success_dialog_show")
} else if (type == 8) { } else if (type == 8) {
EventUtils.onEvent("attendance_withdraw_success_dialog_show") EventUtils.onEvent("attendance_withdraw_success_dialog_show")
...@@ -457,7 +472,7 @@ object MainDialog { ...@@ -457,7 +472,7 @@ object MainDialog {
if (id != null) { if (id != null) {
when (id) { when (id) {
1 -> { 1 -> {
Log.e("MXL","show_baicai") Log.e("MXL", "show_baicai")
EventUtils.onEvent("show_baicai", "白菜" + jine) EventUtils.onEvent("show_baicai", "白菜" + jine)
} }
2 -> { 2 -> {
...@@ -474,43 +489,44 @@ object MainDialog { ...@@ -474,43 +489,44 @@ object MainDialog {
} }
} }
2 -> { 2 -> {
imgtitle.setImageResource(R.mipmap.img_duihuan_success) // imgtitle.setImageResource(R.mipmap.img_duihuan_success)
imggoon.setImageResource(R.mipmap.img_go_on_make_money) imggoon.setImageResource(R.drawable.icon_dialog_lingzhuanshi)
// tvtitle.text = title // tvtitle.text = title
} }
3 -> { 3 -> {
imgtitle.setImageResource(R.mipmap.img_wenxin_trip) // imgtitle.setImageResource(R.mipmap.img_wenxin_trip)
imggoon.setImageResource(R.mipmap.img_i_konw) imggoon.setImageResource(R.drawable.icon_dialog_iknow)
// tvtitle.text = title // tvtitle.text = title
} }
4 -> { 4 -> {
imgtitle.setImageResource(R.mipmap.img_wenxin_trip) // imgtitle.setImageResource(R.mipmap.img_wenxin_trip)
imggoon.setImageResource(R.mipmap.img_go_get_diamand) imggoon.setImageResource(R.drawable.icon_dialog_lingzhuanshi)
} }
5 -> { 5 -> {
imgtitle.setImageResource(R.mipmap.img_wenxin_trip) // imgtitle.setImageResource(R.mipmap.img_wenxin_trip)
imggoon.setImageResource(R.mipmap.img_go_zhongcai) imggoon.setImageResource(R.drawable.icon_dialog_zuanqian)
} }
6 -> { 6 -> {
imgtitle.setImageResource(R.mipmap.img_wenxin_trip) // imgtitle.setImageResource(R.mipmap.img_wenxin_trip)
imggoon.setImageResource(R.mipmap.img_go_zhongcai) imggoon.setImageResource(R.drawable.icon_dialog_zuanqian)
} }
} }
tvcashcontent.text = reason // imggoon.addClickScale()
imggoon.addClickScale() FilterUtils.addClickAlpha(imggoon)
imggoon.setOnClickListener { imggoon.setOnClickListener {
if (buttonStatus == 0) { if (buttonStatus == 0) {
mDialog.dismiss() mDialog.dismiss()
} else if (buttonStatus == 1){ } else if (buttonStatus == 1) {
mDialog.dismiss() mDialog.dismiss()
dialog.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){ } else if (buttonStatus == 2) {
mDialog.dismiss() mDialog.dismiss()
dialog.dismiss() dialog.dismiss()
} }
...@@ -580,6 +596,7 @@ object MainDialog { ...@@ -580,6 +596,7 @@ object MainDialog {
mDialog?.show() mDialog?.show()
} }
} }
// 云朵加速的弹窗 // 云朵加速的弹窗
fun showDialogCloud( fun showDialogCloud(
activity: Activity?, activity: Activity?,
...@@ -600,7 +617,8 @@ object MainDialog { ...@@ -600,7 +617,8 @@ object MainDialog {
val layoutAd = mDialogView?.findViewById<FrameLayout>(R.id.layout_get_drop_ad) val layoutAd = mDialogView?.findViewById<FrameLayout>(R.id.layout_get_drop_ad)
AdUtils.showFeedAd(activity, "cloud_speed_bigimage", layoutAd) AdUtils.showFeedAd(activity, "cloud_speed_bigimage", layoutAd)
mDialogView.findViewById<TextView>(R.id.id_tv_speed_time)?.text = "所有土地获得${speedtime}分钟加速" mDialogView.findViewById<TextView>(R.id.id_tv_speed_time)?.text = "所有土地获得${speedtime}分钟加速"
mDialogView.findViewById<TextView>(R.id.id_cloud_speed_num)?.text = "每天晚上0点重置视频次数(剩余${speedtimes}次)" mDialogView.findViewById<TextView>(R.id.id_cloud_speed_num)?.text =
"每天晚上0点重置视频次数(剩余${speedtimes}次)"
mDialogView.findViewById<ImageView>(R.id.id_img_close_cloud_speed).setOnClickListener { mDialogView.findViewById<ImageView>(R.id.id_img_close_cloud_speed).setOnClickListener {
mDialog.dismiss() mDialog.dismiss()
} }
...@@ -624,7 +642,7 @@ object MainDialog { ...@@ -624,7 +642,7 @@ object MainDialog {
} }
} }
//生虫弹窗 //生虫弹窗
// fun showDialogWorm( // fun showDialogWorm(
// activity: Activity?, // activity: Activity?,
// onClickListener: View.OnClickListener // onClickListener: View.OnClickListener
// ) { // ) {
...@@ -661,7 +679,7 @@ object MainDialog { ...@@ -661,7 +679,7 @@ object MainDialog {
// return // return
// } // }
// mDialog?.show() // mDialog?.show()
// } // }
//种子不足弹窗 //种子不足弹窗
...@@ -712,7 +730,7 @@ object MainDialog { ...@@ -712,7 +730,7 @@ object MainDialog {
}) })
mDialog?.setCanceledOnTouchOutside(false) mDialog?.setCanceledOnTouchOutside(false)
mDialog?.setCancelable(false) mDialog?.setCancelable(false)
if(activity.isFinishing){ if (activity.isFinishing) {
return return
} }
mDialog?.show() mDialog?.show()
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/layout_get_water_root"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center" android:gravity="center"
...@@ -8,7 +9,8 @@ ...@@ -8,7 +9,8 @@
<FrameLayout <FrameLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
<RelativeLayout <RelativeLayout
android:layout_width="328dp" android:layout_width="328dp"
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="328dp"
android:layout_height="370dp" android:layout_height="274dp"
android:layout_marginLeft="@dimen/dp_15" android:layout_marginTop="6dp"
android:layout_marginRight="@dimen/dp_15"> android:layout_marginRight="5dp"
android:background="@drawable/icon_base_dialog_bg">
<com.ym.library.widget.FontTextView
android:id="@+id/tv_withdraw_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="6dp"
android:textColor="@color/white"
android:textSize="22sp" />
<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" />
<TextView
android:id="@+id/id_tv_cash_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginLeft="40dp"
android:layout_marginTop="97dp"
android:layout_marginRight="40dp"
android:gravity="center"
android:includeFontPadding="false"
android:lineSpacingExtra="5dp"
android:textColor="#095100"
android:textSize="@dimen/sp_17"
android:visibility="visible"
tools:text="每天只能提现1次哦,您今天已经 提现过了,明天再提现吧~" />
<ImageView <ImageView
android:id="@+id/id_img_dialog_close" android:id="@+id/id_tv_go_on_make_money"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_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_alignParentBottom="true"
android:layout_marginLeft="@dimen/dp_10" android:layout_centerHorizontal="true"
android:layout_marginRight="@dimen/dp_10" android:layout_marginBottom="30dp"
android:layout_marginBottom="20dp" android:src="@drawable/icon_dialog_iknow" />
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_top_bg" />
<LinearLayout </RelativeLayout>
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="horizontal"
android:visibility="visible">
<TextView
android:id="@+id/id_tv_cash_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:lineSpacingExtra="@dimen/dp_10"
android:text="恭喜您成功兑换0.3元红包,您可以前往微信钱包查看到账情况"
android:textColor="#6A231A"
android:textSize="@dimen/sp_17"
android:visibility="visible" />
</LinearLayout> <ImageView
android:id="@+id/id_img_dialog_close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:src="@mipmap/icon_new_close" />
</FrameLayout>
<ImageView
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_20"
android:src="@drawable/dialog_draw_btn_select" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
</FrameLayout> </LinearLayout>
\ No newline at end of file \ No newline at end of file
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
android:layout_width="150dp" android:layout_width="150dp"
android:layout_height="10dp" android:layout_height="10dp"
android:layout_marginRight="6dp" android:layout_marginRight="6dp"
android:progressDrawable="@drawable/user_progressbar_bg" /> android:progressDrawable="@drawable/user_item_progressbar_bg" />
<TextView <TextView
android:id="@+id/tv_watering_item_progess" android:id="@+id/tv_watering_item_progess"
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
style="?android:attr/progressBarStyleHorizontal" style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="15dp" android:layout_height="15dp"
android:progressDrawable="@drawable/user_progressbar_bg" /> android:progressDrawable="@drawable/user_item_progressbar_bg" />
<TextView <TextView
android:id="@+id/id_tv_jindu" android:id="@+id/id_tv_jindu"
......
...@@ -32,7 +32,7 @@ object FilterUtils { ...@@ -32,7 +32,7 @@ object FilterUtils {
*/ */
private fun setFilter(view: ImageView) { private fun setFilter(view: ImageView) {
//先获取设置的src图片 //先获取设置的src图片
var drawable: Drawable = view?.getDrawable() var drawable: Drawable? = view?.getDrawable()
//当src图片为Null,获取背景图片 //当src图片为Null,获取背景图片
if (drawable == null) { if (drawable == null) {
drawable = view?.getBackground() drawable = view?.getBackground()
...@@ -48,7 +48,7 @@ object FilterUtils { ...@@ -48,7 +48,7 @@ object FilterUtils {
*/ */
private fun removeFilter(view: ImageView) { private fun removeFilter(view: ImageView) {
//先获取设置的src图片 //先获取设置的src图片
var drawable: Drawable = view?.getDrawable() var drawable: Drawable? = view?.getDrawable()
//当src图片为Null,获取背景图片 //当src图片为Null,获取背景图片
if (drawable == null) { if (drawable == null) {
drawable = view?.getBackground() drawable = view?.getBackground()
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
android:layout_height="88dp" android:layout_height="88dp"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="66dp" android:layout_marginTop="66dp"
android:src="@drawable/icon_coin" /> android:src="@drawable/icon_dialog_get_cash_red_pg_bg" />
<com.ym.library.widget.FontTextView <com.ym.library.widget.FontTextView
android:id="@+id/tv_red_pg_reward" android:id="@+id/tv_red_pg_reward"
......
...@@ -103,7 +103,6 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener, ...@@ -103,7 +103,6 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener,
adapter2 = WithdrawAdapter(this, object :OnRecycleItemClickListener<WithdrawEntity> { adapter2 = WithdrawAdapter(this, object :OnRecycleItemClickListener<WithdrawEntity> {
override fun onItemClick(view: View, position: Int, data: WithdrawEntity) { override fun onItemClick(view: View, position: Int, data: WithdrawEntity) {
mData2 = data
adapter2?.setSelectPosition(position) adapter2?.setSelectPosition(position)
adapter2?.notifyDataSetChanged() adapter2?.notifyDataSetChanged()
setWirhdrawDescription2(data) setWirhdrawDescription2(data)
...@@ -174,7 +173,19 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener, ...@@ -174,7 +173,19 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener,
mWithdrawNum = 0.3 mWithdrawNum = 0.3
} }
EventUtils.onEvent("user_withdraw_btn_click", "立即提现按钮点击") EventUtils.onEvent("user_withdraw_btn_click", "立即提现按钮点击")
mPresenter?.requestIsWxBind() // mPresenter?.requestIsWxBind()
if (mData?.ifUse == 1 || mData2?.ifUse == 1) {
Toast.makeText(this@UserInfoActivity, "已提现", Toast.LENGTH_SHORT).show()
} else {
if (adapter?.getSelectPosition() != -1 && mData?.id != null) {
mPresenter?.requestWxWithdraw(mData?.id!!)
} else if (adapter2?.getSelectPosition() != -1 && mData2?.id != null) {
mPresenter?.requestWxWithdraw(mData2?.id!!)
} else {
Toast.makeText(this@UserInfoActivity, "请选择提现额度", Toast.LENGTH_SHORT)
.show()
}
}
} }
} }
} }
...@@ -215,12 +226,12 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener, ...@@ -215,12 +226,12 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener,
if (adapter?.getSelectPosition() != -1) { if (adapter?.getSelectPosition() != -1) {
mData = datas[adapter?.getSelectPosition()!!] mData = datas[adapter?.getSelectPosition()!!]
setWirhdrawDescription(datas[adapter?.getSelectPosition()!!]) setWirhdrawDescription(mAdapterList[adapter?.getSelectPosition()!!])
} }
if (adapter2?.getSelectPosition() != -1) { if (adapter2?.getSelectPosition() != -1) {
mData2 = datas[adapter2?.getSelectPosition()!!] mData2 = datas[adapter2?.getSelectPosition()!!]
setWirhdrawDescription2(datas[adapter2?.getSelectPosition()!!]) setWirhdrawDescription2(mAdapterList2[adapter2?.getSelectPosition()!!])
} }
...@@ -404,67 +415,60 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener, ...@@ -404,67 +415,60 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener,
adapter2?.setSelectPosition(-1) adapter2?.setSelectPosition(-1)
adapter2?.notifyDataSetChanged() adapter2?.notifyDataSetChanged()
layout_user_withdraw_description2.visibility = View.GONE layout_user_withdraw_description2.visibility = View.GONE
if (data.status == 1) {//不显示提现说明
if (data.type == 1) {
tv_user_withdraw_description_1.text = Html.fromHtml(data.desc)
layout_user_withdraw_description.visibility = View.VISIBLE
layout_user_withdraw_description_progress.visibility = View.GONE
} else {
layout_user_withdraw_description.visibility = View.GONE
}
} else {
if (data.ext?.title == "") {
layout_user_withdraw_description.visibility = View.GONE
} else {
layout_user_withdraw_description.visibility = View.VISIBLE
tv_user_withdraw_description_1.text = Html.fromHtml(data.ext?.title?:"")
tv_user_withdraw_description_2.text = Html.fromHtml(data.ext?.desc?:"")
if (data.type == 4) {
id_iv_withdraw_description_icon?.setImageResource(R.drawable.icon_user_withdraw_unreceive)
} else if (data.type == 2) {
id_iv_withdraw_description_icon?.setImageResource(R.drawable.icon_user_withdraw_receive)
}
pb_withdraw_task.max = data.ext?.max?:0
if (data.type == 1 || data.type == 3) {
layout_user_withdraw_description_progress.visibility = View.GONE
if (data?.ifUse != 1) {
mData = data
mData2 = null
if (data.status == 1) {//不显示提现说明
if (data.type == 1) {
tv_user_withdraw_description_1.text = Html.fromHtml(data.desc)
layout_user_withdraw_description.visibility = View.VISIBLE
layout_user_withdraw_description_progress.visibility = View.GONE
} else {
layout_user_withdraw_description.visibility = View.GONE
} }
if ((data.ext?.current ?: 0) >= (data.ext?.max ?: 0)) { } else {
pb_withdraw_task.progress = data.ext?.max ?: 0 if (data.ext?.title == "") {
tv_user_withdraw_status.text = "已完成" layout_user_withdraw_description.visibility = View.GONE
} else { } else {
pb_withdraw_task.progress = data.ext!!.current!! layout_user_withdraw_description.visibility = View.VISIBLE
when (data.type) { tv_user_withdraw_description_1.text = Html.fromHtml(data.ext?.title)
2 -> { tv_user_withdraw_description_2.text = Html.fromHtml(data.ext?.desc)
layout_user_withdraw_description_progress.visibility = View.VISIBLE tv_user_withdraw_status.text = "${data?.ext?.clock}"
if (data.ext?.clockStatus == 0) {
tv_user_withdraw_status.text = "今日未打卡" if (data.type == 4) {
} else { id_iv_withdraw_description_icon?.setImageResource(R.drawable.icon_user_withdraw_unreceive)
tv_user_withdraw_status.text = "今日已打卡" } else if (data.type == 2) {
} id_iv_withdraw_description_icon?.setImageResource(R.drawable.icon_user_withdraw_receive)
} } else if(data.type == 5) {
4 -> { id_iv_withdraw_description_icon?.setImageResource(R.drawable.icon_user_order)
layout_user_withdraw_description_progress.visibility = View.VISIBLE
if (data.ext!!.current!! >= data.ext!!.max!!) {
pb_withdraw_task.progress = data.ext!!.max!!
} else {
pb_withdraw_task.progress = data.ext!!.current!!
tv_user_withdraw_status.text = "领钻石"
}
}
} }
}
tv_user_withdraw_status.setOnClickListener { if (data?.ext?.max != null) {
when (data.type) { if (data?.ext?.current != null) {
// 1 -> 新手专享 pb_withdraw_task.progress = data.ext?.current?:0
2 -> JumpUtils.jumpClockInWithdrawActivity() }
4 -> JumpUtils.jumpWelfareActivity() pb_withdraw_task.max = data.ext?.max?:0
}
if (data.type == 1 || data.type == 3) {
layout_user_withdraw_description_progress.visibility = View.GONE
} else {
layout_user_withdraw_description_progress.visibility = View.VISIBLE
}
tv_user_withdraw_status.setOnClickListener {
when (data.type) {
// 1 -> 新手专享
2 -> JumpUtils.jumpClockInWithdrawActivity()
4 -> JumpUtils.jumpWelfareActivity()
5 -> finish()
}
} }
} }
} }
} else {
layout_user_withdraw_description.visibility = View.GONE
} }
} }
//设置提现说明 //设置提现说明
...@@ -473,66 +477,74 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener, ...@@ -473,66 +477,74 @@ class UserInfoActivity : BaseActivity(), View.OnClickListener,
adapter?.notifyDataSetChanged() adapter?.notifyDataSetChanged()
layout_user_withdraw_description.visibility = View.GONE layout_user_withdraw_description.visibility = View.GONE
if (data.status == 1) {//不显示提现说明 if (data?.ifUse != 1) {
if (data.type == 1) { mData2 = data
tv_user_withdraw_description_11.text = Html.fromHtml(data.desc) mData = null
layout_user_withdraw_description2.visibility = View.VISIBLE if (data.status == 1) {//不显示提现说明
layout_user_withdraw_description_progress2.visibility = View.GONE if (data.type == 1) {
} else { tv_user_withdraw_description_11.text = Html.fromHtml(data.desc)
layout_user_withdraw_description2.visibility = View.GONE layout_user_withdraw_description2.visibility = View.VISIBLE
}
} else {
if (data.ext?.title == "") {
layout_user_withdraw_description2.visibility = View.GONE
} else {
layout_user_withdraw_description2.visibility = View.VISIBLE
tv_user_withdraw_description_11.text = Html.fromHtml(data.ext?.title?:"")
tv_user_withdraw_description_22.text = Html.fromHtml(data.ext?.desc?:"")
if (data.type == 4) {
id_iv_withdraw_description_icon2?.setImageResource(R.drawable.icon_user_withdraw_unreceive)
} else if (data.type == 2) {
id_iv_withdraw_description_icon2?.setImageResource(R.drawable.icon_user_withdraw_receive)
}
pb_withdraw_task2.max = data.ext?.max?:0
if (data.type == 1 || data.type == 3) {
layout_user_withdraw_description_progress2.visibility = View.GONE layout_user_withdraw_description_progress2.visibility = View.GONE
} else {
layout_user_withdraw_description2.visibility = View.GONE
} }
if ((data.ext?.current ?: 0) >= (data.ext?.max ?: 0)) { } else {
pb_withdraw_task2.progress = data.ext?.max ?: 0 if (data.ext?.title == "") {
tv_user_withdraw_status2.text = "已完成" layout_user_withdraw_description2.visibility = View.GONE
} else { } else {
pb_withdraw_task2.progress = data.ext!!.current!! layout_user_withdraw_description2.visibility = View.VISIBLE
when (data.type) { tv_user_withdraw_description_11.text = Html.fromHtml(data.ext?.title ?: "")
2 -> { tv_user_withdraw_description_22.text = Html.fromHtml(data.ext?.desc ?: "")
layout_user_withdraw_description_progress2.visibility = View.VISIBLE if (data.type == 4) {
if (data.ext?.clockStatus == 0) { id_iv_withdraw_description_icon2?.setImageResource(R.drawable.icon_user_withdraw_unreceive)
tv_user_withdraw_status2.text = "今日未打卡" } else if (data.type == 2) {
} else { id_iv_withdraw_description_icon2?.setImageResource(R.drawable.icon_user_withdraw_receive)
tv_user_withdraw_status2.text = "今日已打卡" }
pb_withdraw_task2.max = data.ext?.max ?: 0
if (data.type == 1 || data.type == 3) {
layout_user_withdraw_description_progress2.visibility = View.GONE
}
if ((data.ext?.current ?: 0) >= (data.ext?.max ?: 0)) {
pb_withdraw_task2.progress = data.ext?.max ?: 0
tv_user_withdraw_status2.text = "已完成"
} else {
pb_withdraw_task2.progress = data.ext!!.current!!
when (data.type) {
2 -> {
layout_user_withdraw_description_progress2.visibility = View.VISIBLE
if (data.ext?.clockStatus == 0) {
tv_user_withdraw_status2.text = "今日未打卡"
} else {
tv_user_withdraw_status2.text = "今日已打卡"
}
} }
} 4 -> {
4 -> { layout_user_withdraw_description_progress2.visibility = View.VISIBLE
layout_user_withdraw_description_progress2.visibility = View.VISIBLE if (data.ext!!.current!! >= data.ext!!.max!!) {
if (data.ext!!.current!! >= data.ext!!.max!!) { pb_withdraw_task2.progress = data.ext!!.max!!
pb_withdraw_task2.progress = data.ext!!.max!! } else {
} else { pb_withdraw_task2.progress = data.ext!!.current!!
pb_withdraw_task2.progress = data.ext!!.current!! tv_user_withdraw_status2.text = "领钻石"
tv_user_withdraw_status2.text = "领钻石" }
}
5 -> {
} }
} }
} }
}
tv_user_withdraw_status2.setOnClickListener { tv_user_withdraw_status2.setOnClickListener {
when (data.type) { when (data.type) {
// 1 -> 新手专享 // 1 -> 新手专享
2 -> JumpUtils.jumpClockInWithdrawActivity() 2 -> JumpUtils.jumpClockInWithdrawActivity()
4 -> JumpUtils.jumpWelfareActivity() 4 -> JumpUtils.jumpWelfareActivity()
}
} }
} }
} }
} else {
layout_user_withdraw_description2.visibility = View.GONE
} }
} }
......
<?xml version="1.0" encoding="UTF-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 设置背景色 -->
<item android:id="@android:id/background">
<shape>
<corners android:radius="8dp" />
<solid android:color="#A45D33" />
</shape>
</item>
<!-- 设置进度条颜色 -->
<item android:id="@android:id/progress">
<clip>
<shape>
<corners android:radius="8dp" />
<solid android:color="#94CA46" />
</shape>
</clip>
</item>
</layer-list>
\ No newline at end of file
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<!-- 设置背景色 --> <!-- 设置背景色 -->
<item android:id="@android:id/background"> <item android:id="@android:id/background">
<shape> <shape>
<corners android:radius="8dp" /> <corners android:radius="6dp" />
<solid android:color="#A45D33" /> <solid android:color="#B0B0B0" />
</shape> </shape>
</item> </item>
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
<item android:id="@android:id/progress"> <item android:id="@android:id/progress">
<clip> <clip>
<shape> <shape>
<corners android:radius="8dp" /> <corners android:radius="6dp" />
<solid android:color="#94CA46" /> <solid android:color="#FAA002" />
</shape> </shape>
</clip> </clip>
</item> </item>
......
...@@ -12,9 +12,11 @@ ...@@ -12,9 +12,11 @@
android:layout_height="match_parent"> android:layout_height="match_parent">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical"
android:paddingBottom="70dp">
<RelativeLayout <RelativeLayout
android:id="@+id/id_rl_userinfo_toolbar" android:id="@+id/id_rl_userinfo_toolbar"
...@@ -55,8 +57,7 @@ ...@@ -55,8 +57,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical">
android:paddingBottom="16dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -273,10 +274,11 @@ ...@@ -273,10 +274,11 @@
<ProgressBar <ProgressBar
android:id="@+id/pb_withdraw_task" android:id="@+id/pb_withdraw_task"
style="?android:attr/progressBarStyleHorizontal" style="?android:attr/progressBarStyleHorizontal"
android:layout_width="160dp" android:layout_width="150dp"
android:layout_height="9dp" android:layout_height="12dp"
android:max="100" android:max="100"
android:progress="0" /> android:progress="0"
android:progressDrawable="@drawable/user_progressbar_bg" />
</LinearLayout> </LinearLayout>
<TextView <TextView
...@@ -387,10 +389,11 @@ ...@@ -387,10 +389,11 @@
<ProgressBar <ProgressBar
android:id="@+id/pb_withdraw_task2" android:id="@+id/pb_withdraw_task2"
style="?android:attr/progressBarStyleHorizontal" style="?android:attr/progressBarStyleHorizontal"
android:layout_width="160dp" android:layout_width="150dp"
android:layout_height="9dp" android:layout_height="12dp"
android:max="100" android:max="100"
android:progress="0" /> android:progress="0"
android:progressDrawable="@drawable/user_progressbar_bg" />
</LinearLayout> </LinearLayout>
<TextView <TextView
...@@ -413,7 +416,6 @@ ...@@ -413,7 +416,6 @@
android:layout_marginLeft="7dp" android:layout_marginLeft="7dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_marginRight="7dp" android:layout_marginRight="7dp"
android:layout_marginBottom="50dp"
android:background="@drawable/icon_user_bg" android:background="@drawable/icon_user_bg"
android:orientation="vertical" android:orientation="vertical"
android:paddingLeft="20dp" android:paddingLeft="20dp"
...@@ -456,7 +458,6 @@ ...@@ -456,7 +458,6 @@
android:layout_marginLeft="7dp" android:layout_marginLeft="7dp"
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
android:layout_marginRight="7dp" android:layout_marginRight="7dp"
android:layout_marginBottom="16dp"
android:src="@drawable/icon_user_big_withdraw_btn_txt3" /> android:src="@drawable/icon_user_big_withdraw_btn_txt3" />
</FrameLayout> </FrameLayout>
\ No newline at end of file
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