Commit ae43040b authored by maxiaoliang's avatar maxiaoliang

修改ui

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