Commit ae43040b authored by maxiaoliang's avatar maxiaoliang

修改ui

parent 92407394
...@@ -93,6 +93,7 @@ class CashExchangeAdapter : ...@@ -93,6 +93,7 @@ class CashExchangeAdapter :
MainDialog?.showWithDraw( MainDialog?.showWithDraw(
mContext, mContext,
result.status, result.status,
result.title,
result.reason, result.reason,
result.buttonText, result.buttonText,
result.buttonStatus, result.buttonStatus,
......
...@@ -45,12 +45,8 @@ class SpeedWaterTaskAdapter : ...@@ -45,12 +45,8 @@ class SpeedWaterTaskAdapter :
holder.tvCount.text = "+${data.awardNum}" holder.tvCount.text = "+${data.awardNum}"
holder.imgspeed.setImageResource(R.mipmap.icon_speed_get) holder.imgspeed.setImageResource(R.mipmap.icon_speed_get)
if (data.subTitle != null) { if (data.subTitle != null) {
holder.btnProgess.visibility = View.GONE
holder.tvProgess.text = data.subTitle holder.tvProgess.text = data.subTitle
} else { } else {
holder.btnProgess.visibility = View.VISIBLE
holder.btnProgess.max = data.targetNum
holder.btnProgess.setProgress(data.completedNum)
holder.tvProgess.text = "${data.completedNum}/${data.targetNum}" holder.tvProgess.text = "${data.completedNum}/${data.targetNum}"
} }
...@@ -89,15 +85,12 @@ class SpeedWaterTaskAdapter : ...@@ -89,15 +85,12 @@ class SpeedWaterTaskAdapter :
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): WateringTaskHolder { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): WateringTaskHolder {
return WateringTaskHolder( return WateringTaskHolder(
LayoutInflater.from(mContext).inflate(R.layout.item_watering_task, parent, false) LayoutInflater.from(mContext).inflate(R.layout.item_get_water_task, parent, false)
) )
} }
inner class WateringTaskHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { inner class WateringTaskHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
val tvTitle: TextView = itemView.findViewById(R.id.tv_watering_item_title) val tvTitle: TextView = itemView.findViewById(R.id.tv_watering_item_title)
// 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 tvProgess: TextView = itemView.findViewById(R.id.tv_watering_item_progess)
val tvCount: TextView = itemView.findViewById(R.id.tv_watering_item_count) val tvCount: TextView = itemView.findViewById(R.id.tv_watering_item_count)
val ivStatus: ImageView = itemView.findViewById(R.id.tv_watering_item_status) val ivStatus: ImageView = itemView.findViewById(R.id.tv_watering_item_status)
......
...@@ -2,8 +2,9 @@ package com.ym.game.module ...@@ -2,8 +2,9 @@ package com.ym.game.module
class ExchangeEntity { class ExchangeEntity {
var status:Int =0 var status: Int = 0
var reason:String="" var reason: String = ""
var buttonText:String="" var buttonText: String = ""
var buttonStatus:Int=0 var buttonStatus: Int = 0
var title: String = ""
} }
\ No newline at end of file
...@@ -206,7 +206,7 @@ interface IGameApi { ...@@ -206,7 +206,7 @@ interface IGameApi {
加速剂任务视频 加速剂任务视频
*/ */
@POST(NetConfig.Game.URL_GAME_THIRD_PARTY) @POST(NetConfig.Game.URL_GAME_THIRD_PARTY)
fun thirdParty(): Observable<Response<Any>> fun thirdParty(@Query("id") id: Int): Observable<Response<Any>>
//新手判断 //新手判断
@GET(NetConfig.Game.URL_GAME_USER_GUIDE) @GET(NetConfig.Game.URL_GAME_USER_GUIDE)
......
...@@ -85,6 +85,7 @@ object MainDialog { ...@@ -85,6 +85,7 @@ object MainDialog {
) )
val ivGetDropBg = mDialogView?.findViewById<ImageView>(R.id.iv_get_drop_bg) val ivGetDropBg = mDialogView?.findViewById<ImageView>(R.id.iv_get_drop_bg)
val ivtitle = mDialogView?.findViewById<ImageView>(R.id.id_img_title)
val tvGetDropCount = mDialogView?.findViewById<TextView>(R.id.tv_get_drop_count) val tvGetDropCount = mDialogView?.findViewById<TextView>(R.id.tv_get_drop_count)
val layoutAd = mDialogView?.findViewById<FrameLayout>(R.id.layout_get_drop_ad) val layoutAd = mDialogView?.findViewById<FrameLayout>(R.id.layout_get_drop_ad)
val llcontent2 = mDialogView?.findViewById<LinearLayout>(R.id.id_ll_content_2) val llcontent2 = mDialogView?.findViewById<LinearLayout>(R.id.id_ll_content_2)
...@@ -97,7 +98,8 @@ object MainDialog { ...@@ -97,7 +98,8 @@ object MainDialog {
//3 种子 4 金币 5 加速剂 //3 种子 4 金币 5 加速剂
when (type) { when (type) {
3 -> { 3 -> {
tvget.text = "恭喜获得种子" //tvget.text = "恭喜获得种子"
ivtitle.setImageResource(R.mipmap.icon_img_title_get_zhongzi)
llcontent2.visibility = View.GONE llcontent2.visibility = View.GONE
llcontent3.visibility = View.GONE llcontent3.visibility = View.GONE
if (list?.seedList?.size == 1) { if (list?.seedList?.size == 1) {
...@@ -123,12 +125,14 @@ object MainDialog { ...@@ -123,12 +125,14 @@ object MainDialog {
} }
4 -> { 4 -> {
tvget.text = "恭喜获得金币" ivtitle.setImageResource(R.mipmap.icon_img_title_get_coin_)
// tvget.text = "恭喜获得金币"
ivGetDropBg.setImageResource(R.mipmap.icon_coin) ivGetDropBg.setImageResource(R.mipmap.icon_coin)
tvGetDropCount.text = "+${rewardCount}" tvGetDropCount.text = "+${rewardCount}"
} }
5 -> { 5 -> {
tvget.text = "恭喜获得加速剂" //tvget.text = "恭喜获得加速剂"
ivtitle.setImageResource(R.mipmap.icon_img_title_get_speed_water)
ivGetDropBg.setImageResource(R.mipmap.icon_speed_water) ivGetDropBg.setImageResource(R.mipmap.icon_speed_water)
tvGetDropCount.text = "+${rewardCount}" tvGetDropCount.text = "+${rewardCount}"
} }
...@@ -501,12 +505,13 @@ object MainDialog { ...@@ -501,12 +505,13 @@ object MainDialog {
fun showWithDraw( fun showWithDraw(
context: Context?, context: Context?,
status: Int, status: Int,
title: String,
reason: String, reason: String,
buttonText: String, buttonText: String,
buttonStatus: Int, buttonStatus: Int,
id:Int, id: Int,
type:Int, type: Int,
jine:Int jine: Int
) { ) {
if (context == null) { if (context == null) {
...@@ -527,7 +532,7 @@ object MainDialog { ...@@ -527,7 +532,7 @@ object MainDialog {
val tvgoon = mDialogView?.findViewById<TextView>(R.id.id_tv_go_on_make_money) val tvgoon = mDialogView?.findViewById<TextView>(R.id.id_tv_go_on_make_money)
when (status) { when (status) {
1 -> { 1 -> {
tvtitle.text = "提现成功" tvtitle.text = title
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) {
...@@ -550,10 +555,10 @@ object MainDialog { ...@@ -550,10 +555,10 @@ object MainDialog {
} }
} }
2 -> { 2 -> {
tvtitle.text = "等待审核" tvtitle.text = title
} }
3 -> { 3 -> {
tvtitle.text = "提现失败" tvtitle.text = title
} }
} }
......
...@@ -150,7 +150,7 @@ class SpeedWaterPopupWindow : PopupWindow(), SpeedWaterContract.View, ...@@ -150,7 +150,7 @@ class SpeedWaterPopupWindow : PopupWindow(), SpeedWaterContract.View,
} }
override fun onAdClose() { override fun onAdClose() {
getVideoAcceleratorsReceive2(); getVideoAcceleratorsReceive2(data.id)
} }
override fun onVideoComplete() { override fun onVideoComplete() {
...@@ -225,8 +225,8 @@ class SpeedWaterPopupWindow : PopupWindow(), SpeedWaterContract.View, ...@@ -225,8 +225,8 @@ class SpeedWaterPopupWindow : PopupWindow(), SpeedWaterContract.View,
} }
//看视频领上报 //看视频领上报
fun getVideoAcceleratorsReceive2() { fun getVideoAcceleratorsReceive2(id:Int) {
GameApiClient.gameApi.thirdParty() GameApiClient.gameApi.thirdParty(id)
.compose(RxSchedulers.observableIO2Main()) .compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<Any>() { .subscribe(object : BaseObserver<Any>() {
override fun onSuccess(result: Any?) { override fun onSuccess(result: Any?) {
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
android:background="@mipmap/icon_content_bg"> android:background="@mipmap/icon_content_bg">
<ImageView <ImageView
android:id="@+id/id_img_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
...@@ -59,7 +60,8 @@ ...@@ -59,7 +60,8 @@
android:layout_marginTop="@dimen/dp_44" android:layout_marginTop="@dimen/dp_44"
android:text="恭喜获得金币" android:text="恭喜获得金币"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="20sp" /> android:textSize="20sp"
android:visibility="invisible" />
<LinearLayout <LinearLayout
android:id="@+id/id_ll_content" android:id="@+id/id_ll_content"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/layout_watering_root"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_8">
<RelativeLayout
android:id="@+id/ll_one"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_12"
android:layout_marginRight="@dimen/dp_12"
android:background="@drawable/withdraw_bg">
<TextView
android:id="@+id/tv_watering_item_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_12"
android:includeFontPadding="false"
android:text="浇水10次"
android:textColor="#642D2D"
android:textSize="17sp" />
<TextView
android:id="@+id/tv_watering_item_progess"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_watering_item_title"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_10"
android:includeFontPadding="false"
android:textColor="#8F6E42"
android:textSize="12.5sp"
tools:text="10/10" />
<LinearLayout
android:id="@+id/id_ll_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/dp_2"
android:layout_marginRight="@dimen/dp_30"
android:gravity="center">
<ImageView
android:id="@+id/img_icon_item"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/dp_3"
android:src="@mipmap/icon_speed_get" />
<TextView
android:id="@+id/tv_watering_item_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="+0g"
android:textColor="#ED5430"
android:textSize="@dimen/sp_12" />
</LinearLayout>
<ImageView
android:id="@+id/tv_watering_item_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/id_ll_right"
android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/dp_2"
android:layout_marginRight="@dimen/dp_13"
android:layout_marginBottom="@dimen/dp_4"
android:src="@mipmap/icon_mian_popup_complete" />
</RelativeLayout>
</LinearLayout>
\ No newline at end of file
...@@ -7,33 +7,31 @@ ...@@ -7,33 +7,31 @@
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<LinearLayout <RelativeLayout
android:id="@+id/ll_one" android:id="@+id/ll_one"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:background="@drawable/withdraw_bg"
android:layout_marginBottom="-3dp"
android:layout_weight="1"
android:background="@mipmap/icon_record_item_bg"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/tv_watering_item_title" android:id="@+id/tv_watering_item_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_18" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_16" android:layout_marginTop="@dimen/dp_12"
android:includeFontPadding="false" android:includeFontPadding="false"
android:text="浇水10次" android:text="浇水10次"
android:textColor="#642D2D" android:textColor="#642D2D"
android:textSize="15sp" /> android:textSize="17sp" />
<LinearLayout <LinearLayout
android:id="@+id/layout_watering_progress" android:id="@+id/layout_watering_progress"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_18" android:layout_below="@+id/tv_watering_item_title"
android:layout_marginTop="@dimen/dp_4" android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_8"
android:gravity="center"> android:gravity="center">
<!-- <com.ym.module.guesssong.widget.ProgressButton <!-- <com.ym.module.guesssong.widget.ProgressButton
...@@ -58,41 +56,34 @@ ...@@ -58,41 +56,34 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_8" android:layout_marginLeft="@dimen/dp_8"
android:textColor="#826033" android:includeFontPadding="false"
android:textSize="12sp" android:text="1"
tools:text="10/10" /> android:textColor="#8F6E42"
android:textSize="12.5sp" />
</LinearLayout> </LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/id_ll_two"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginLeft="-15dp"
android:layout_marginRight="@dimen/dp_10"
android:gravity="center"
android:orientation="vertical">
<LinearLayout <LinearLayout
android:id="@+id/id_ll_right"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@mipmap/icon_reword_bg" android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/dp_2"
android:layout_marginRight="@dimen/dp_30"
android:gravity="center"> android:gravity="center">
<ImageView <ImageView
android:id="@+id/img_icon_item" android:id="@+id/img_icon_item"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@mipmap/icon_speed_get" /> android:layout_marginRight="@dimen/dp_3" />
<TextView <TextView
android:id="@+id/tv_watering_item_count" android:id="@+id/tv_watering_item_count"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="+0g" android:text="+0g"
android:textColor="@color/white" android:textColor="#ED5430"
android:textSize="@dimen/sp_12" /> android:textSize="@dimen/sp_12" />
</LinearLayout> </LinearLayout>
...@@ -100,8 +91,11 @@ ...@@ -100,8 +91,11 @@
android:id="@+id/tv_watering_item_status" android:id="@+id/tv_watering_item_status"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="-10dp" android:layout_below="@+id/id_ll_right"
android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/dp_2"
android:layout_marginRight="@dimen/dp_13"
android:layout_marginBottom="@dimen/dp_4"
android:src="@mipmap/icon_mian_popup_complete" /> android:src="@mipmap/icon_mian_popup_complete" />
</LinearLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -42,7 +42,9 @@ ...@@ -42,7 +42,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/iv_popup_close" android:layout_below="@+id/iv_popup_close"
android:layout_margin="@dimen/dp_20"> android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_20"
android:layout_marginRight="@dimen/dp_10">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rl_task_speed_water" android:id="@+id/rl_task_speed_water"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -43,6 +43,7 @@ public class RxBusConstant { ...@@ -43,6 +43,7 @@ public class RxBusConstant {
//提现列表 //提现列表
public final static int RX_WITH_DRAW_LIST = 30001; public final static int RX_WITH_DRAW_LIST = 30001;
//加速剂任务列表
public final static int RX_SPEED_WATER_TASK_LIST = 30002; public final static int RX_SPEED_WATER_TASK_LIST = 30002;
} }
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingTop="40dp" android:paddingTop="40dp"
android:paddingRight="20dp" android:paddingRight="20dp"
android:paddingBottom="10dp"> android:paddingBottom="20dp">
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
...@@ -137,9 +137,9 @@ ...@@ -137,9 +137,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:drawableRight="@drawable/icon_setting_back" android:drawableRight="@drawable/icon_setting_back"
android:paddingLeft="20dp" android:paddingLeft="20dp"
android:paddingTop="17dp" android:paddingTop="20dp"
android:paddingRight="20dp" android:paddingRight="20dp"
android:paddingBottom="17dp" android:paddingBottom="20dp"
android:visibility="gone" /> android:visibility="gone" />
<View <View
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingTop="20dp" android:paddingTop="20dp"
android:paddingRight="20dp" android:paddingRight="20dp"
android:paddingBottom="10dp" android:paddingBottom="20dp"
android:text="检查更新" android:text="检查更新"
android:textColor="#642D2D" android:textColor="#642D2D"
android:textSize="15sp" android:textSize="15sp"
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingTop="20dp" android:paddingTop="20dp"
android:paddingRight="20dp" android:paddingRight="20dp"
android:paddingBottom="10dp" android:paddingBottom="20dp"
android:text="@string/user_agreement" android:text="@string/user_agreement"
android:textColor="#642D2D" android:textColor="#642D2D"
android:textSize="15sp" /> android:textSize="15sp" />
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingTop="20dp" android:paddingTop="20dp"
android:paddingRight="20dp" android:paddingRight="20dp"
android:paddingBottom="10dp" android:paddingBottom="20dp"
android:text="@string/user_privacy_policy" android:text="@string/user_privacy_policy"
android:textColor="#642D2D" android:textColor="#642D2D"
android:textSize="15sp" /> android:textSize="15sp" />
...@@ -242,7 +242,6 @@ ...@@ -242,7 +242,6 @@
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:background="@drawable/icon_setting_title" android:background="@drawable/icon_setting_title"
android:gravity="center" android:gravity="center"
android:text="设置"
android:textColor="#ffffffff" android:textColor="#ffffffff"
android:textSize="20sp" /> android:textSize="20sp" />
</RelativeLayout> </RelativeLayout>
......
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