[#998] Transaction History Compose Preview
This commit is contained in:
parent
a15bea738f
commit
6df3806a1f
|
@ -24,3 +24,4 @@ local.properties
|
|||
google-services.json
|
||||
/.idea/kotlinc.xml
|
||||
/.idea/other.xml
|
||||
/.idea/appInsightsSettings.xml
|
||||
|
|
|
@ -40,8 +40,10 @@ import androidx.compose.ui.platform.testTag
|
|||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import cash.z.ecc.android.sdk.fixture.TransactionOverviewFixture
|
||||
import cash.z.ecc.android.sdk.model.TransactionOverview
|
||||
import cash.z.ecc.android.sdk.model.TransactionState
|
||||
import cash.z.ecc.android.sdk.model.Zatoshi
|
||||
import cash.z.ecc.android.sdk.model.toZecString
|
||||
import cash.z.ecc.sdk.type.ZcashCurrency
|
||||
import co.electriccoin.zcash.ui.R
|
||||
|
@ -51,12 +53,13 @@ import co.electriccoin.zcash.ui.design.theme.ZcashTheme
|
|||
import co.electriccoin.zcash.ui.screen.history.HistoryTag
|
||||
import co.electriccoin.zcash.ui.screen.history.state.TransactionHistorySyncState
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
import kotlinx.collections.immutable.persistentListOf
|
||||
import java.text.DateFormat
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
|
||||
@Preview("History")
|
||||
@Composable
|
||||
@Preview("History")
|
||||
private fun ComposablePreview() {
|
||||
ZcashTheme(forceDarkMode = false) {
|
||||
GradientSurface {
|
||||
|
@ -68,6 +71,26 @@ private fun ComposablePreview() {
|
|||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
@Preview("History List")
|
||||
private fun ComposableHistoryListPreview() {
|
||||
ZcashTheme(forceDarkMode = false) {
|
||||
GradientSurface {
|
||||
History(
|
||||
transactionState = TransactionHistorySyncState.Syncing(
|
||||
@Suppress("MagicNumber")
|
||||
persistentListOf(
|
||||
TransactionOverviewFixture.new(netValue = Zatoshi(100000000)),
|
||||
TransactionOverviewFixture.new(netValue = Zatoshi(200000000)),
|
||||
TransactionOverviewFixture.new(netValue = Zatoshi(300000000)),
|
||||
)
|
||||
),
|
||||
goBack = {}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val dateFormat: DateFormat by lazy {
|
||||
SimpleDateFormat.getDateTimeInstance(
|
||||
SimpleDateFormat.MEDIUM,
|
||||
|
|
Loading…
Reference in New Issue