Commit 030cb772 authored by Li's avatar Li

[李俊岐]修改提现弹窗

parent d0e9f033
......@@ -267,11 +267,14 @@ object MainDialog {
val ivGetDropBg3 = mDialogView?.findViewById<ImageView>(R.id.iv_get_drop_bg3)
val tvGetDropCount3 = mDialogView?.findViewById<TextView>(R.id.tv_get_drop_count3)
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 加速剂
when (type) {
1 -> {
tvget.text = "恭喜获得种子"
tvget.text = "恭喜获得"
llcontent2.visibility = View.GONE
llcontent3.visibility = View.GONE
if (result.seedList?.size == 1) {
......@@ -302,7 +305,7 @@ object MainDialog {
tvGetDropCount.text = "+${rewardCount}"
}
3 -> {
tvget.text = "恭喜获得加速"
tvget.text = "恭喜获得加速"
ivGetDropBg.setImageResource(R.mipmap.icon_speed_water)
tvGetDropCount.text = "+${rewardCount}"
}
......@@ -332,6 +335,12 @@ object MainDialog {
if (!context?.isFinishing) {
mDialog?.show()
}
layoutAd?.postDelayed({
if (layoutAd?.visibility == View.VISIBLE) {
layout_get_water_root.gravity = Gravity.BOTTOM
}
}, 500)
}
//福利中心开宝箱
......@@ -421,8 +430,8 @@ object MainDialog {
id: Int?,
type: Int?,
jine: String?,
isWelfarePage:Boolean,
dialog:Dialog
isWelfarePage: Boolean,
dialog: Dialog
) {
if (context == null) {
......@@ -438,18 +447,24 @@ object MainDialog {
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 imggoon = mDialogView?.findViewById<ImageView>(R.id.id_tv_go_on_make_money)
tv_withdraw_title.text = title
tvcashcontent.text = reason
when (status) {
1 -> {
imgtitle.setImageResource(R.mipmap.img_duihuan_success)
imggoon.setImageResource(R.mipmap.img_go_on_make_money)
// imgtitle.setImageResource(R.mipmap.img_duihuan_success)
imggoon.setImageResource(R.drawable.icon_dialog_zuanqian)
if (type == 1) {
EventUtils.onEvent("show_xinshou0.3", "新手0.3")
} else if (type == 4) {
EventUtils.onEvent("show_fuli0.3", "福利0.3")
} else if (type == 7){
} else if (type == 7) {
EventUtils.onEvent("welfare_withdraw_success_dialog_show")
} else if (type == 8) {
EventUtils.onEvent("attendance_withdraw_success_dialog_show")
......@@ -457,7 +472,7 @@ object MainDialog {
if (id != null) {
when (id) {
1 -> {
Log.e("MXL","show_baicai")
Log.e("MXL", "show_baicai")
EventUtils.onEvent("show_baicai", "白菜" + jine)
}
2 -> {
......@@ -474,43 +489,44 @@ object MainDialog {
}
}
2 -> {
imgtitle.setImageResource(R.mipmap.img_duihuan_success)
imggoon.setImageResource(R.mipmap.img_go_on_make_money)
// imgtitle.setImageResource(R.mipmap.img_duihuan_success)
imggoon.setImageResource(R.drawable.icon_dialog_lingzhuanshi)
// tvtitle.text = title
}
3 -> {
imgtitle.setImageResource(R.mipmap.img_wenxin_trip)
imggoon.setImageResource(R.mipmap.img_i_konw)
// imgtitle.setImageResource(R.mipmap.img_wenxin_trip)
imggoon.setImageResource(R.drawable.icon_dialog_iknow)
// tvtitle.text = title
}
4 -> {
imgtitle.setImageResource(R.mipmap.img_wenxin_trip)
imggoon.setImageResource(R.mipmap.img_go_get_diamand)
// imgtitle.setImageResource(R.mipmap.img_wenxin_trip)
imggoon.setImageResource(R.drawable.icon_dialog_lingzhuanshi)
}
5 -> {
imgtitle.setImageResource(R.mipmap.img_wenxin_trip)
imggoon.setImageResource(R.mipmap.img_go_zhongcai)
// imgtitle.setImageResource(R.mipmap.img_wenxin_trip)
imggoon.setImageResource(R.drawable.icon_dialog_zuanqian)
}
6 -> {
imgtitle.setImageResource(R.mipmap.img_wenxin_trip)
imggoon.setImageResource(R.mipmap.img_go_zhongcai)
// imgtitle.setImageResource(R.mipmap.img_wenxin_trip)
imggoon.setImageResource(R.drawable.icon_dialog_zuanqian)
}
}
tvcashcontent.text = reason
imggoon.addClickScale()
// imggoon.addClickScale()
FilterUtils.addClickAlpha(imggoon)
imggoon.setOnClickListener {
if (buttonStatus == 0) {
mDialog.dismiss()
} else if (buttonStatus == 1){
} else if (buttonStatus == 1) {
mDialog.dismiss()
dialog.dismiss()
if (!isWelfarePage) {
JumpUtils.jumpWelfareActivity()
}
// JumpUtils.h5Jump("每日福利", Constant.Param.WelfareCenter, false, context as Activity)
}else if (buttonStatus == 2){
} else if (buttonStatus == 2) {
mDialog.dismiss()
dialog.dismiss()
}
......@@ -580,6 +596,7 @@ object MainDialog {
mDialog?.show()
}
}
// 云朵加速的弹窗
fun showDialogCloud(
activity: Activity?,
......@@ -600,7 +617,8 @@ object MainDialog {
val layoutAd = mDialogView?.findViewById<FrameLayout>(R.id.layout_get_drop_ad)
AdUtils.showFeedAd(activity, "cloud_speed_bigimage", layoutAd)
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 {
mDialog.dismiss()
}
......@@ -624,7 +642,7 @@ object MainDialog {
}
}
//生虫弹窗
// fun showDialogWorm(
// fun showDialogWorm(
// activity: Activity?,
// onClickListener: View.OnClickListener
// ) {
......@@ -661,7 +679,7 @@ object MainDialog {
// return
// }
// mDialog?.show()
// }
// }
//种子不足弹窗
......@@ -712,7 +730,7 @@ object MainDialog {
})
mDialog?.setCanceledOnTouchOutside(false)
mDialog?.setCancelable(false)
if(activity.isFinishing){
if (activity.isFinishing) {
return
}
mDialog?.show()
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/layout_get_water_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
......@@ -8,7 +9,8 @@
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
<RelativeLayout
android:layout_width="328dp"
......
<?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"
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
android:layout_width="match_parent"
android:layout_height="370dp"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginRight="@dimen/dp_15">
android:layout_width="328dp"
android:layout_height="274dp"
android:layout_marginTop="6dp"
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
android:id="@+id/id_img_dialog_close"
android:id="@+id/id_tv_go_on_make_money"
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: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" />
android:layout_centerHorizontal="true"
android:layout_marginBottom="30dp"
android:src="@drawable/icon_dialog_iknow" />
<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="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" />
</RelativeLayout>
</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>
\ No newline at end of file
</LinearLayout>
\ No newline at end of file
......@@ -46,7 +46,7 @@
android:layout_width="150dp"
android:layout_height="10dp"
android:layout_marginRight="6dp"
android:progressDrawable="@drawable/user_progressbar_bg" />
android:progressDrawable="@drawable/user_item_progressbar_bg" />
<TextView
android:id="@+id/tv_watering_item_progess"
......
......@@ -66,7 +66,7 @@
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="15dp"
android:progressDrawable="@drawable/user_progressbar_bg" />
android:progressDrawable="@drawable/user_item_progressbar_bg" />
<TextView
android:id="@+id/id_tv_jindu"
......
......@@ -32,7 +32,7 @@ object FilterUtils {
*/
private fun setFilter(view: ImageView) {
//先获取设置的src图片
var drawable: Drawable = view?.getDrawable()
var drawable: Drawable? = view?.getDrawable()
//当src图片为Null,获取背景图片
if (drawable == null) {
drawable = view?.getBackground()
......@@ -48,7 +48,7 @@ object FilterUtils {
*/
private fun removeFilter(view: ImageView) {
//先获取设置的src图片
var drawable: Drawable = view?.getDrawable()
var drawable: Drawable? = view?.getDrawable()
//当src图片为Null,获取背景图片
if (drawable == null) {
drawable = view?.getBackground()
......
......@@ -34,7 +34,7 @@
android:layout_height="88dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="66dp"
android:src="@drawable/icon_coin" />
android:src="@drawable/icon_dialog_get_cash_red_pg_bg" />
<com.ym.library.widget.FontTextView
android:id="@+id/tv_red_pg_reward"
......
<?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 @@
<!-- 设置背景色 -->
<item android:id="@android:id/background">
<shape>
<corners android:radius="8dp" />
<solid android:color="#A45D33" />
<corners android:radius="6dp" />
<solid android:color="#B0B0B0" />
</shape>
</item>
......@@ -12,8 +12,8 @@
<item android:id="@android:id/progress">
<clip>
<shape>
<corners android:radius="8dp" />
<solid android:color="#94CA46" />
<corners android:radius="6dp" />
<solid android:color="#FAA002" />
</shape>
</clip>
</item>
......
......@@ -12,9 +12,11 @@
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:orientation="vertical"
android:paddingBottom="70dp">
<RelativeLayout
android:id="@+id/id_rl_userinfo_toolbar"
......@@ -55,8 +57,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="16dp">
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
......@@ -273,10 +274,11 @@
<ProgressBar
android:id="@+id/pb_withdraw_task"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="160dp"
android:layout_height="9dp"
android:layout_width="150dp"
android:layout_height="12dp"
android:max="100"
android:progress="0" />
android:progress="0"
android:progressDrawable="@drawable/user_progressbar_bg" />
</LinearLayout>
<TextView
......@@ -387,10 +389,11 @@
<ProgressBar
android:id="@+id/pb_withdraw_task2"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="160dp"
android:layout_height="9dp"
android:layout_width="150dp"
android:layout_height="12dp"
android:max="100"
android:progress="0" />
android:progress="0"
android:progressDrawable="@drawable/user_progressbar_bg" />
</LinearLayout>
<TextView
......@@ -413,7 +416,6 @@
android:layout_marginLeft="7dp"
android:layout_marginTop="10dp"
android:layout_marginRight="7dp"
android:layout_marginBottom="50dp"
android:background="@drawable/icon_user_bg"
android:orientation="vertical"
android:paddingLeft="20dp"
......@@ -456,7 +458,6 @@
android:layout_marginLeft="7dp"
android:layout_marginTop="15dp"
android:layout_marginRight="7dp"
android:layout_marginBottom="16dp"
android:src="@drawable/icon_user_big_withdraw_btn_txt3" />
</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