Commit ccc34aaf authored by jyx's avatar jyx

领取分红弹框优化

parent 09f487aa
......@@ -49,6 +49,10 @@ public class UserManager {
* 用户金币
*/
private static final String USER_GOLD = "user_gold";
/**
* 用户总金币
*/
private static final String USER_SUM_GOLD = "user_sum_gold";
/**
* 用户零钱
*/
......@@ -130,6 +134,7 @@ public class UserManager {
ps.putString(ALIPAY_ACCOUNT, user.getAlipay_account());
ps.putString(USER_GOLD, String.valueOf(user.getCoin()));
ps.putString(USER_CASH, String.format("%.2f", user.getSurplus()));
ps.putString(USER_SUM_GOLD, String.valueOf(user.getSumCoin()));
ps.putBoolean(USER_OLD, !user.isFirstSignInApp());
ps.putString(WX_NAME, user.getNickName());
......@@ -265,6 +270,10 @@ public class UserManager {
ps.putString(ALIPAY_ACCOUNT, alipay);
}
public String getUserSumGold() {
return ps.getString(USER_SUM_GOLD);
}
/**
* 获取用户金币/积分
*/
......
......@@ -36,6 +36,16 @@ public class UserBean implements Serializable {
private String alipay_account;
private String idcode;
private String gameInfo;
public String getSumCoin() {
return sumCoin;
}
public void setSumCoin(String sumCoin) {
this.sumCoin = sumCoin;
}
private String sumCoin;
private double surplus;//余额
private int coin;// 积分
private long pk_id;// 用户id
......
......@@ -33,6 +33,7 @@ import com.scwang.smartrefresh.layout.listener.OnRefreshListener
import kotlinx.android.synthetic.main.fragment_main_friends.*
import kotlinx.android.synthetic.main.header_layout.*
import net.grandcentrix.tray.AppPreferences
import java.math.BigDecimal
/**
* 描述:邀请好友
......@@ -368,7 +369,7 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
// 第一次邀请提示弹框
firstWeChatInvite()
} else {
shareImgBounsDialog()
shareImgDialog()
}
}
......@@ -491,9 +492,16 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
} else {
title = "Hi,我是" + userManager.wxName
}
var sumCoin = if (TextUtils.isEmpty(userManager.userSumGold)) {
"0"
} else {
val allcoinBig = BigDecimal(userManager.userSumGold)
val rateBig = BigDecimal("1000")
allcoinBig.divide(rateBig).setScale(2, BigDecimal.ROUND_DOWN).toString()
}
val content = SpanUtils()
.append("我已在好赚钱赚了")
.append("100").setFontSize(BubbleUtils.dp2px(10)).setForegroundColor(resources.getColor(R.color.color_E72C2B))
.append(sumCoin).setFontSize(BubbleUtils.dp2px(10)).setForegroundColor(resources.getColor(R.color.color_E72C2B))
.append("元 ,快来跟我一起赚钱吧,满")
.append("0.3").setFontSize(BubbleUtils.dp2px(10)).setForegroundColor(resources.getColor(R.color.color_E72C2B))
.append("元就可以提现")
......
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:bottom="-10dp"
android:left="-10dp"
android:right="-10dp">
<shape>
<stroke
android:width="10dp"
android:color="@color/color_F8F8F8" />
</shape>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 边 -->
<item>
<shape android:shape="rectangle">
<padding android:top="1dp" />
<solid android:color="#00CCCCCC" />
<corners
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<padding android:top="1dp" />
<solid android:color="#10CCCCCC" />
<corners
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<padding android:top="1dp" />
<solid android:color="#20CCCCCC" />
<corners
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>
</item>
<!-- <item>-->
<!-- <shape android:shape="rectangle">-->
<!-- <padding android:top="1dp" />-->
<!-- <solid android:color="#00CCCCCC" />-->
<!-- <corners-->
<!-- android:topLeftRadius="20dp"-->
<!-- android:topRightRadius="20dp" />-->
<!-- </shape>-->
<!-- </item>-->
<!-- <item>-->
<!-- <shape android:shape="rectangle">-->
<!-- <padding android:top="1dp" />-->
<!-- <solid android:color="#10CCCCCC" />-->
<!-- <corners-->
<!-- android:topLeftRadius="20dp"-->
<!-- android:topRightRadius="20dp" />-->
<!-- </shape>-->
<!-- </item>-->
<!-- <item>-->
<!-- <shape android:shape="rectangle">-->
<!-- <padding android:top="1dp" />-->
<!-- <solid android:color="#20CCCCCC" />-->
<!-- <corners-->
<!-- android:topLeftRadius="20dp"-->
<!-- android:topRightRadius="20dp" />-->
<!-- </shape>-->
<!-- </item>-->
<item>
<shape android:shape="rectangle">
<padding
......
......@@ -31,6 +31,8 @@
app:xTabDisplayNum="2"
app:xTabIndicatorColor="#FB560C"
app:xTabIndicatorHeight="3dp"
app:xTabIndicatorRoundX="50dp"
app:xTabIndicatorRoundY="50dp"
app:xTabIndicatorWidth="30dp"
app:xTabMode="fixed"
app:xTabSelectedTextColor="#FB560C"
......
......@@ -402,6 +402,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="@drawable/shape_tab_friends"
android:elevation="4dip"
app:xTabIndicatorColor="#FB560C"
app:xTabIndicatorHeight="4dp"
app:xTabIndicatorRoundX="50dp"
......
......@@ -34,21 +34,18 @@
<include layout="@layout/item_fragment_main_my_clock" />
<include layout="@layout/item_divider_gray" />
<FrameLayout
android:id="@+id/fl_my_banner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="4dp"
android:layout_marginTop="4dp"
android:layout_marginRight="4dp"
android:background="@drawable/shape_border_top"
android:visibility="gone" />
<include
android:id="@+id/item_divider"
layout="@layout/item_divider_gray" />
<include layout="@layout/item_divider_gray" />
<include layout="@layout/item_fragment_main_my_promotions" />
......
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
......@@ -8,7 +9,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
......@@ -21,18 +22,27 @@
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerVertical="true"
android:layout_marginEnd="6dp" />
app:layout_constraintBottom_toBottomOf="@+id/item_iv_qrcode"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_toEndOf="@id/item_iv_avatar"
android:orientation="vertical">
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/item_iv_qrcode"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toEndOf="@+id/item_iv_avatar"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/item_tv_name"
android:layout_width="90dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
......@@ -41,7 +51,7 @@
<TextView
android:id="@+id/item_tv_info"
android:layout_width="100dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
......@@ -54,9 +64,12 @@
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true" />
android:layout_centerVertical="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.mints.goodmoney.ui.widgets.CornerView>
......
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