|
@@ -140,7 +140,12 @@ class CostInfoFragment(type: String?) : BaseFragment<CostViewModel>() {
|
|
|
|
|
|
|
|
textView {
|
|
textView {
|
|
|
userAccountData.bindOptional(context){
|
|
userAccountData.bindOptional(context){
|
|
|
- text = NumberUtils.roundNum(NumberUtils.doubleDistortion(it?.rightsAndInterests?.toString()),2)
|
|
|
|
|
|
|
+ if (it?.rightsAndInterests == 0.0){
|
|
|
|
|
+ text = "0"
|
|
|
|
|
+ }else{
|
|
|
|
|
+ text = NumberUtils.roundNum(NumberUtils.doubleDistortion(it?.rightsAndInterests?.toString()),2)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
textSizeAuto = 31
|
|
textSizeAuto = 31
|
|
|
textColorInt = R.color.rma_black_33
|
|
textColorInt = R.color.rma_black_33
|
|
@@ -164,7 +169,11 @@ class CostInfoFragment(type: String?) : BaseFragment<CostViewModel>() {
|
|
|
|
|
|
|
|
textView {
|
|
textView {
|
|
|
userAccountData.bindOptional(context){
|
|
userAccountData.bindOptional(context){
|
|
|
- text = NumberUtils.roundNum(NumberUtils.doubleDistortion(it?.canUserAmount?.toString()),2)
|
|
|
|
|
|
|
+ if (it?.canUserAmount == 0.0){
|
|
|
|
|
+ text = "0"
|
|
|
|
|
+ }else{
|
|
|
|
|
+ text = NumberUtils.roundNum(NumberUtils.doubleDistortion(it?.canUserAmount?.toString()),2)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
textSizeAuto = 31
|
|
textSizeAuto = 31
|
|
|
textColorInt = R.color.rma_black_33
|
|
textColorInt = R.color.rma_black_33
|
|
@@ -189,7 +198,12 @@ class CostInfoFragment(type: String?) : BaseFragment<CostViewModel>() {
|
|
|
textView {
|
|
textView {
|
|
|
/** 直接去占用保证金 **/
|
|
/** 直接去占用保证金 **/
|
|
|
userAccountData.bindOptional(context){
|
|
userAccountData.bindOptional(context){
|
|
|
- text = NumberUtils.roundNum(it?.usedmargin.toString(),2)
|
|
|
|
|
|
|
+ if (it?.usedmargin == null){
|
|
|
|
|
+ text = "0"
|
|
|
|
|
+ }else{
|
|
|
|
|
+ text = NumberUtils.roundNum(it?.usedmargin.toString(),2)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
textSizeAuto = 31
|
|
textSizeAuto = 31
|
|
|
textColorInt = R.color.rma_black_33
|
|
textColorInt = R.color.rma_black_33
|
|
@@ -214,7 +228,11 @@ class CostInfoFragment(type: String?) : BaseFragment<CostViewModel>() {
|
|
|
|
|
|
|
|
textView {
|
|
textView {
|
|
|
userAccountData.bindOptional(context){
|
|
userAccountData.bindOptional(context){
|
|
|
- text = it?.freezemargin?.plus(it.freezecharge ?: 0.0)?.plus(it.outamountfreeze ?:0.0).toString()
|
|
|
|
|
|
|
+ if (it?.freezecharge == null){
|
|
|
|
|
+ text = "0"
|
|
|
|
|
+ }else{
|
|
|
|
|
+ text = it?.freezemargin?.plus(it.freezecharge ?: 0.0)?.plus(it.outamountfreeze ?:0.0).toString()
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
textSizeAuto = 31
|
|
textSizeAuto = 31
|
|
|
textColorInt = R.color.rma_black_33
|
|
textColorInt = R.color.rma_black_33
|
|
@@ -239,7 +257,11 @@ class CostInfoFragment(type: String?) : BaseFragment<CostViewModel>() {
|
|
|
|
|
|
|
|
textView {
|
|
textView {
|
|
|
userAccountData.bindOptional(context){
|
|
userAccountData.bindOptional(context){
|
|
|
- text = NumberUtils.roundNum(NumberUtils.doubleDistortion(it?.close_watch_profit_and_loss?.toString()),2)
|
|
|
|
|
|
|
+ if (it?.close_watch_profit_and_loss == 0.0){
|
|
|
|
|
+ text = "0"
|
|
|
|
|
+ }else{
|
|
|
|
|
+ text = NumberUtils.roundNum(NumberUtils.doubleDistortion(it?.close_watch_profit_and_loss?.toString()),2)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
textSizeAuto = 31
|
|
textSizeAuto = 31
|
|
|
textColorInt = R.color.rma_black_33
|
|
textColorInt = R.color.rma_black_33
|
|
@@ -263,7 +285,12 @@ class CostInfoFragment(type: String?) : BaseFragment<CostViewModel>() {
|
|
|
|
|
|
|
|
textView {
|
|
textView {
|
|
|
profitAndLoss.bindOptional(context){
|
|
profitAndLoss.bindOptional(context){
|
|
|
- text = it?.toString()
|
|
|
|
|
|
|
+ if (it == 0.0){
|
|
|
|
|
+ text = "0"
|
|
|
|
|
+ }else{
|
|
|
|
|
+ text = it?.toString()
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
textSizeAuto = 31
|
|
textSizeAuto = 31
|
|
|
textColorInt = R.color.rma_black_33
|
|
textColorInt = R.color.rma_black_33
|
|
@@ -287,7 +314,12 @@ class CostInfoFragment(type: String?) : BaseFragment<CostViewModel>() {
|
|
|
|
|
|
|
|
textView {
|
|
textView {
|
|
|
userAccountData.bindOptional(context){
|
|
userAccountData.bindOptional(context){
|
|
|
- text = it?.inamount.toString()
|
|
|
|
|
|
|
+ if (it?.inamount == null){
|
|
|
|
|
+ text = "0"
|
|
|
|
|
+ }else{
|
|
|
|
|
+ text = it?.inamount.toString()
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
textSizeAuto = 31
|
|
textSizeAuto = 31
|
|
|
textColorInt = R.color.rma_black_33
|
|
textColorInt = R.color.rma_black_33
|
|
@@ -311,7 +343,11 @@ class CostInfoFragment(type: String?) : BaseFragment<CostViewModel>() {
|
|
|
|
|
|
|
|
textView {
|
|
textView {
|
|
|
userAccountData.bindOptional(context){
|
|
userAccountData.bindOptional(context){
|
|
|
- text = it?.outamount.toString()
|
|
|
|
|
|
|
+ if (it?.outamount == null){
|
|
|
|
|
+ text = "0"
|
|
|
|
|
+ }else{
|
|
|
|
|
+ text = it?.outamount.toString()
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
textSizeAuto = 31
|
|
textSizeAuto = 31
|
|
|
textColorInt = R.color.rma_black_33
|
|
textColorInt = R.color.rma_black_33
|