Commit 972e2b50 authored by jyx's avatar jyx

更换分红页面背景图

parent bc92a115
......@@ -19,6 +19,7 @@ import com.mints.goodmoney.ui.activitys.base.BaseActivity
import com.mints.goodmoney.ui.adapter.DrawcashAdapter
import com.mints.goodmoney.ui.adapter.listener.OnItemClickListener
import com.mints.goodmoney.utils.SpanUtils
import com.mints.library.utils.CommonUtils
import com.mints.library.utils.json.JsonUtil
import kotlinx.android.synthetic.main.activity_drawcash.*
import kotlinx.android.synthetic.main.header_layout.*
......@@ -146,7 +147,7 @@ class DrawcashActivity : BaseActivity(),
tvDrawcashExplain.text = data.drawcashRule
tvDrawcashHint.text = data.drawcashHint
tvDrawcashGold.text = "${data.getCoin()}"
tvDrawcashGold.text = CommonUtils.formatString(data.coin.toString())
if (TextUtils.isEmpty(data.openid)) {
tvDrawcashWx.setText("去授权")
tvDrawcashName.setText("微信昵称")
......
......@@ -35,12 +35,12 @@ import com.mints.goodmoney.ui.fragment.base.BaseFragment
import com.mints.goodmoney.utils.ImageUtil
import com.mints.goodmoney.utils.SpanUtils
import com.mints.library.net.netstatus.NetUtils
import com.mints.library.utils.CommonUtils
import com.mints.library.utils.ConstantUtil
import com.mints.library.utils.GlideUtils
import com.mints.library.utils.nodoubleclick.AntiShake
import com.scwang.smartrefresh.layout.api.RefreshLayout
import com.scwang.smartrefresh.layout.listener.OnRefreshListener
import com.tbruyelle.rxpermissions.RxPermissions
import kotlinx.android.synthetic.main.fragment_main_my.*
import kotlinx.android.synthetic.main.header_layout.*
import kotlinx.android.synthetic.main.item_fragment_main_my_bottom.*
......@@ -188,11 +188,11 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
override fun getMyHotActivitySuc(data: BannerBean?) {
if (activity != null && !requireActivity().isFinishing) {
// item_promotions_egv.visibility = View.GONE
if (!bannerFlag) {
bannerFlag = true
data?.let {
item_promotions_egv.visibility = View.VISIBLE
divider_hot.visibility = View.VISIBLE
hotList = it.list
item_promotions_egv.adapter = GvMyAdapter(mContext, requireActivity(), hotList)
}
......@@ -383,7 +383,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
val userGold = if (userConfig == null) {
"0.00"
} else {
"" + userConfig!!.userMsg.coin
CommonUtils.formatString(userConfig!!.userMsg.coin.toString())
}
// 金币
......
......@@ -219,7 +219,7 @@ public class CommonUtils {
/**
* 获取application中指定的meta-data
*
* @return 如果没有获取成功(没有对应值或者异常),则返回值为空
* @return 如果没有获取成功(没有对应值或者异常),则返回值为空
*/
public static String getAppMetaData(Context ctx, String key) {
if (ctx == null || TextUtils.isEmpty(key)) {
......@@ -242,4 +242,23 @@ public class CommonUtils {
}
return resultData;
}
public static String formatString(String str) {
if (str.contains(".")) {
String[] array = str.split("\\.");
String str0 = array[0];
String str1 = array[1];
if (str0.length() <= 3) {
return str0 + "." + str1;
} else {
return formatString(str0.substring(0, str0.length() - 3)) + ',' + str0.substring(str0.length() - 3) + "." + str1;
}
} else {
if (str.length() <= 3) {
return str;
} else {
return formatString(str.substring(0, str.length() - 3)) + ',' + str.substring(str.length() - 3);
}
}
}
}
......@@ -46,12 +46,11 @@
<Button
android:id="@+id/btn_switch"
android:layout_width="201dp"
android:layout_width="200dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="20dp"
android:background="@drawable/shape_btn_switch"
android:text="退出登录"
android:textColor="@color/white"
......
......@@ -35,7 +35,10 @@
<include layout="@layout/item_fragment_main_my_clock" />
<include layout="@layout/item_divider_gray" />
<include
android:id="@+id/divider_hot"
layout="@layout/item_divider_gray"
android:visibility="gone" />
<include layout="@layout/item_fragment_main_my_promotions" />
......
......@@ -95,27 +95,18 @@
android:src="@mipmap/ic_gold" />
<TextView
android:id="@+id/item_title_gold_count"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:text="我的金币"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/item_title_gold_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:textColor="@color/my_color_orange"
android:textSize="28sp" />
android:textSize="26sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="horizontal">
<Button
android:id="@+id/btn_coinRecord"
......@@ -130,7 +121,6 @@
<Button
android:id="@+id/btn_withdraw"
android:layout_width="60dp"
android:layout_marginTop="10dp"
android:layout_height="30dp"
android:layout_marginStart="10dp"
android:background="@drawable/shape_btn_switch"
......
......@@ -10,6 +10,7 @@
android:layout_width="125dp"
android:layout_height="35dp"
android:layout_gravity="bottom|center_horizontal"
android:layout_marginBottom="15dp"
android:background="@drawable/shape_tv_app_write">
<TextView
......
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