Commit a2b2d52c authored by 王雪伟's avatar 王雪伟

[提交人]:王雪伟

[提交简述] :修改五连抽显示价格问题
[实现方案] :
parent 0f3222cb
PACKAGE_NAME=com.zhangxin.magicbox PACKAGE_NAME=com.zhangxin.magicbox
VERSION_CODE=10 VERSION_CODE=11
VERSION_NAME=1.0.3.2 VERSION_NAME=1.0.3.3
\ No newline at end of file \ No newline at end of file
...@@ -41,6 +41,8 @@ import io.reactivex.functions.Consumer ...@@ -41,6 +41,8 @@ import io.reactivex.functions.Consumer
import kotlinx.android.synthetic.main.activity_layout_new_box_goods_detail.* import kotlinx.android.synthetic.main.activity_layout_new_box_goods_detail.*
import kotlinx.android.synthetic.main.layout_detail_content2.* import kotlinx.android.synthetic.main.layout_detail_content2.*
import kotlinx.android.synthetic.main.layout_detail_top2.* import kotlinx.android.synthetic.main.layout_detail_top2.*
import java.math.RoundingMode
import java.text.DecimalFormat
class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View, class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View,
...@@ -252,8 +254,8 @@ class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View, ...@@ -252,8 +254,8 @@ class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View,
Log.e("MXL", "拥有的钱" + ownCoin + "5连价格" + fiveSellCoin + "单次价格" + oneSellCoin) Log.e("MXL", "拥有的钱" + ownCoin + "5连价格" + fiveSellCoin + "单次价格" + oneSellCoin)
id_tv_one_lottery_price?.text = "${reslut.onePriceStr}" id_tv_one_lottery_price?.text = "${reslut.onePriceStr}"
id_tv_five_lottery_price?.text = "${reslut.fivePrice}" id_tv_five_lottery_price?.text = "${reslut.fivePrice}"
id_tv_five_lottery_price2?.text = "${reslut.onePrice?.times(5)}" id_tv_five_lottery_price2?.text = getNoMoreThanTwoDigits(reslut.onePrice?.times(5)?:0.0)
id_tv_five_lottery_price2.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG) //中划线 id_tv_five_lottery_price2.paint.flags = Paint.STRIKE_THRU_TEXT_FLAG //中划线
if (reslut?.goodsList != null) { if (reslut?.goodsList != null) {
mPagerAdapter = TopPagerAdapter(reslut?.goodsList!!) mPagerAdapter = TopPagerAdapter(reslut?.goodsList!!)
id_detail_top_viewpager.adapter = mPagerAdapter id_detail_top_viewpager.adapter = mPagerAdapter
...@@ -268,7 +270,11 @@ class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View, ...@@ -268,7 +270,11 @@ class NewBoxGoodsDetailActivity : BaseActivity(), GoodsDetailContract.View,
} }
BoxResultDialog.setDialogPrice(oneSellCoin,fiveSellCoin) BoxResultDialog.setDialogPrice(oneSellCoin,fiveSellCoin)
} }
fun getNoMoreThanTwoDigits(number: Double): String {
val format = DecimalFormat("0.##")
format.roundingMode = RoundingMode.HALF_UP
return format.format(number)
}
@SuppressLint("WrongConstant") @SuppressLint("WrongConstant")
private fun floatAnim(view: View, delay: Int) { private fun floatAnim(view: View, delay: Int) {
val animators: MutableList<Animator> = ArrayList() val animators: MutableList<Animator> = ArrayList()
......
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