-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ee4d54
commit 2f5551c
Showing
17 changed files
with
154 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...main/java/io/horizontalsystems/bankwallet/modules/xtransaction/cells/TitleAndValueCell.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package io.horizontalsystems.bankwallet.modules.xtransaction.cells | ||
|
||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.text.style.TextAlign | ||
import androidx.compose.ui.unit.dp | ||
import io.horizontalsystems.bankwallet.ui.compose.components.HSpacer | ||
import io.horizontalsystems.bankwallet.ui.compose.components.cell.CellUniversal | ||
import io.horizontalsystems.bankwallet.ui.compose.components.subhead1_leah | ||
import io.horizontalsystems.bankwallet.ui.compose.components.subhead2_grey | ||
|
||
@Composable | ||
fun TitleAndValueCell( | ||
title: String, | ||
value: String, | ||
borderTop: Boolean = true | ||
) { | ||
CellUniversal(borderTop = borderTop) { | ||
subhead2_grey(text = title, modifier = Modifier.padding(end = 16.dp)) | ||
HSpacer(16.dp) | ||
subhead1_leah( | ||
modifier = Modifier.weight(1f), | ||
text = value, | ||
textAlign = TextAlign.Right | ||
) | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...rc/main/java/io/horizontalsystems/bankwallet/modules/xtransaction/helpers/AmountString.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package io.horizontalsystems.bankwallet.modules.xtransaction.helpers | ||
|
||
import androidx.compose.runtime.Composable | ||
import io.horizontalsystems.bankwallet.core.App | ||
import java.math.BigDecimal | ||
|
||
@Composable | ||
fun coinAmountString(value: BigDecimal?, coinCode: String, sign: String): String { | ||
// if (hideAmount) return "*****" | ||
if (value == null) return "---" | ||
|
||
return sign + App.numberFormatter.formatCoinFull(value, coinCode, 8) | ||
} | ||
|
||
@Composable | ||
fun fiatAmountString(value: BigDecimal?, fiatSymbol: String): String { | ||
// if (hideAmount) return "*****" | ||
if (value == null) return "---" | ||
|
||
return App.numberFormatter.formatFiatFull(value, fiatSymbol) | ||
} |
2 changes: 1 addition & 1 deletion
2
...t/modules/xtransaction/CoinIconPainter.kt → ...s/xtransaction/helpers/CoinIconPainter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...les/xtransaction/TransactionInfoHelper.kt → ...nsaction/helpers/TransactionInfoHelper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 7 additions & 3 deletions
10
...et/modules/xtransaction/XxxBurnSection.kt → ...ules/xtransaction/sections/BurnSection.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
...let/modules/xtransaction/XxxFeeSection.kt → ...dules/xtransaction/sections/FeeSection.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 7 additions & 3 deletions
10
...et/modules/xtransaction/XxxMintSection.kt → ...ules/xtransaction/sections/MintSection.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.