[#883] Turn on NotEnoughSpace light theme
- Closes #883 - This removes the hardcoded dark theme from the NotEnoughSpace screen
This commit is contained in:
parent
ef3788bb8a
commit
f711cd7cbd
|
@ -9,6 +9,10 @@ directly impact users rather than highlighting other key architectural updates.*
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- The Not Enough Space screen used for notifying about insufficient free device disk space now provides the light
|
||||||
|
theme by default
|
||||||
|
|
||||||
## [0.2.0 (523)] - 2024-01-09
|
## [0.2.0 (523)] - 2024-01-09
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package co.electriccoin.zcash.ui.screen.warning.view
|
package co.electriccoin.zcash.ui.screen.warning.view
|
||||||
|
|
||||||
import androidx.compose.foundation.Image
|
import androidx.compose.foundation.Image
|
||||||
import androidx.compose.foundation.background
|
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
|
@ -9,15 +8,15 @@ import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.rememberScrollState
|
||||||
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.text.style.TextAlign
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.ui.tooling.preview.Preview
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
import androidx.compose.ui.unit.dp
|
|
||||||
import co.electriccoin.zcash.ui.R
|
import co.electriccoin.zcash.ui.R
|
||||||
import co.electriccoin.zcash.ui.design.component.Body
|
import co.electriccoin.zcash.ui.design.component.Body
|
||||||
import co.electriccoin.zcash.ui.design.component.GradientSurface
|
import co.electriccoin.zcash.ui.design.component.GradientSurface
|
||||||
|
@ -38,34 +37,40 @@ private fun NotEnoughSpacePreview() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO [#883]: NotEnoughSpace screen has dark theme hardcoded
|
|
||||||
// TODO [#883]: https://github.com/Electric-Coin-Company/zashi-android/issues/883
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun NotEnoughSpaceView(
|
fun NotEnoughSpaceView(
|
||||||
storageSpaceRequiredGigabytes: Int,
|
storageSpaceRequiredGigabytes: Int,
|
||||||
spaceRequiredToContinueMegabytes: Int
|
spaceRequiredToContinueMegabytes: Int
|
||||||
) {
|
) {
|
||||||
@Suppress("MagicNumber")
|
|
||||||
val backgroundColor = Color(0xFF1A233A)
|
|
||||||
Column(
|
Column(
|
||||||
Modifier
|
Modifier
|
||||||
.background(backgroundColor)
|
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(32.dp),
|
.padding(ZcashTheme.dimens.screenHorizontalSpacingRegular)
|
||||||
|
.verticalScroll(
|
||||||
|
rememberScrollState()
|
||||||
|
),
|
||||||
verticalArrangement = Arrangement.Center,
|
verticalArrangement = Arrangement.Center,
|
||||||
horizontalAlignment = Alignment.CenterHorizontally
|
horizontalAlignment = Alignment.CenterHorizontally
|
||||||
) {
|
) {
|
||||||
Image(painterResource(id = R.drawable.not_enough_space), "", Modifier.fillMaxWidth())
|
Image(
|
||||||
Spacer(Modifier.height(32.dp))
|
painter = painterResource(id = R.drawable.not_enough_space),
|
||||||
Header(text = stringResource(id = R.string.not_enough_space_title), color = Color.White)
|
contentDescription = stringResource(id = R.string.not_enough_space_logo_content_description),
|
||||||
Spacer(Modifier.height(32.dp))
|
modifier = Modifier.fillMaxWidth()
|
||||||
|
)
|
||||||
|
|
||||||
|
Spacer(Modifier.height(ZcashTheme.dimens.spacingXlarge))
|
||||||
|
|
||||||
|
Header(text = stringResource(id = R.string.not_enough_space_title))
|
||||||
|
|
||||||
|
Spacer(Modifier.height(ZcashTheme.dimens.spacingXlarge))
|
||||||
|
|
||||||
Body(
|
Body(
|
||||||
text = stringResource(id = R.string.not_enough_space_description, storageSpaceRequiredGigabytes),
|
text = stringResource(id = R.string.not_enough_space_description, storageSpaceRequiredGigabytes),
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center
|
||||||
color = Color.White
|
|
||||||
)
|
)
|
||||||
Spacer(Modifier.height(64.dp))
|
|
||||||
|
Spacer(Modifier.height(ZcashTheme.dimens.spacingHuge))
|
||||||
|
|
||||||
Small(
|
Small(
|
||||||
text = stringResource(id = R.string.space_required_to_continue, spaceRequiredToContinueMegabytes),
|
text = stringResource(id = R.string.space_required_to_continue, spaceRequiredToContinueMegabytes),
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||||
<string name="not_enough_space_title">Not enough space!</string>
|
<string name="not_enough_space_title">Not enough space!</string>
|
||||||
<string name="not_enough_space_description">You need approximately <xliff:g example="1" id="required_gigabytes">%1$s</xliff:g> gig of space while synchronizing the Zcash blockchain, but only 300 megs once done. Syncing will stay paused until more space is available.</string>
|
<string name="not_enough_space_logo_content_description"></string>
|
||||||
<string name="space_required_to_continue"><xliff:g example="300" id="required_megabytes">~%1$s</xliff:g> megs required to continue </string>
|
<string name="not_enough_space_description">You need approximately <xliff:g example="1" id="required_gigabytes">
|
||||||
|
%1$d</xliff:g> gig of space while synchronizing the Zcash blockchain, but only 300 megs once done. Syncing
|
||||||
|
will stay paused until more space is available.</string>
|
||||||
|
<string name="space_required_to_continue"><xliff:g example="300" id="required_megabytes">~%1$d</xliff:g> megs
|
||||||
|
required to continue </string>
|
||||||
<string name="unknown">Unknown</string>
|
<string name="unknown">Unknown</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue