Commit 3a5749f8 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent e8d55ced
...@@ -13,6 +13,8 @@ import com.mints.goodmoney.mvp.presenters.MorningClockPresenter ...@@ -13,6 +13,8 @@ import com.mints.goodmoney.mvp.presenters.MorningClockPresenter
import com.mints.goodmoney.mvp.views.MorningClockView import com.mints.goodmoney.mvp.views.MorningClockView
import com.mints.goodmoney.ui.activitys.base.BaseActivity import com.mints.goodmoney.ui.activitys.base.BaseActivity
import com.mints.goodmoney.ui.adapter.MorningClockAdapter import com.mints.goodmoney.ui.adapter.MorningClockAdapter
import com.mints.goodmoney.utils.SpanUtils
import kotlinx.android.synthetic.main.activity_drawcash.*
import kotlinx.android.synthetic.main.activity_morning_clock.* import kotlinx.android.synthetic.main.activity_morning_clock.*
/** /**
...@@ -75,6 +77,12 @@ class MorningClockActivity : BaseActivity() ...@@ -75,6 +77,12 @@ class MorningClockActivity : BaseActivity()
tvMorningClockClick.isEnabled = false tvMorningClockClick.isEnabled = false
} }
tvMorningClockClick.text = data.buttonMsg tvMorningClockClick.text = data.buttonMsg
tvMorningClockDay.setText(
SpanUtils()
.append("打卡领金币 已连续打卡")
.append("${data.continuityDays}").setForegroundColor(resources.getColor(R.color.main_mints))
.append("天")
.create())
initRvView() initRvView()
} }
......
...@@ -54,10 +54,10 @@ class DrawcashAdapter(val priceList: MutableList<DrawcashBean.CashOutMoneyArrBea ...@@ -54,10 +54,10 @@ class DrawcashAdapter(val priceList: MutableList<DrawcashBean.CashOutMoneyArrBea
} else { } else {
holder.tvDrawItemCash.text = "${priceBean.money}元" holder.tvDrawItemCash.text = "${priceBean.money}元"
} }
if (TextUtils.isEmpty(priceBean.remark)) { if (priceBean.money == 0.3) {
holder.tvDrawItemHint.visibility = View.GONE priceBean.remark = "天天可提现"
} else { }
holder.tvDrawItemHint.visibility = View.VISIBLE if (!TextUtils.isEmpty(priceBean.remark)) {
holder.tvDrawItemHint.text = priceBean.remark holder.tvDrawItemHint.text = priceBean.remark
} }
holder.tvDrawItemGold.text = "约${String.format("%.0f", priceBean.money * 10000)}金币" holder.tvDrawItemGold.text = "约${String.format("%.0f", priceBean.money * 10000)}金币"
......
...@@ -110,7 +110,7 @@ public class CountDownVedioView extends LinearLayout { ...@@ -110,7 +110,7 @@ public class CountDownVedioView extends LinearLayout {
*/ */
public void showRedbox() { public void showRedbox() {
if (ivCountVedioRedbox != null) { if (ivCountVedioRedbox != null) {
rope = YoYo.with(Techniques.Tada).duration(2000).repeat(-1).playOn(ivCountVedioRedbox); rope = YoYo.with(Techniques.Tada).duration(600).repeat(-1).playOn(ivCountVedioRedbox);
} }
} }
......
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/tvMorningClockDay"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="14dp" android:layout_margin="14dp"
......
...@@ -17,11 +17,9 @@ ...@@ -17,11 +17,9 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:gravity="center_vertical" android:gravity="center_vertical"
android:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
android:text="返回" android:text="主菜单"
android:drawablePadding="2dp"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="16sp" android:textSize="16sp" />
android:drawableLeft="@mipmap/ic_arrow_back" />
<TextView <TextView
android:id="@+id/tvDhRefresh" android:id="@+id/tvDhRefresh"
......
...@@ -17,15 +17,11 @@ ...@@ -17,15 +17,11 @@
android:id="@+id/tvDrawItemHint" android:id="@+id/tvDrawItemHint"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:visibility="gone"
android:layout_marginBottom="-4dp"
android:textSize="12sp" /> android:textSize="12sp" />
<TextView <TextView
android:id="@+id/tvDrawItemCash" android:id="@+id/tvDrawItemCash"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_marginTop="8dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="0.3元" android:text="0.3元"
android:textStyle="bold" android:textStyle="bold"
...@@ -37,8 +33,8 @@ ...@@ -37,8 +33,8 @@
android:text="约300000金币" android:text="约300000金币"
android:singleLine="true" android:singleLine="true"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="4dp" android:layout_marginTop="2dp"
android:layout_marginBottom="8dp" android:layout_marginBottom="10dp"
android:gravity="center" android:gravity="center"
android:textSize="12sp" /> android:textSize="12sp" />
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<ImageView <ImageView
android:id="@+id/iv_count_redbox" android:id="@+id/iv_count_redbox"
android:layout_width="26dp" android:layout_width="28dp"
android:layout_height="30dp" android:layout_height="32dp"
android:layout_gravity="center" android:layout_gravity="center"
android:src="@mipmap/ic_main_red" /> android:src="@mipmap/ic_main_red" />
</FrameLayout> </FrameLayout>
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