Merge pull request #5217 from element-hq/bma/customSplash

Custom logo on on boarding screen.
This commit is contained in:
Benoit Marty 2025-08-25 18:01:37 +02:00 committed by GitHub
commit 4150ed5d7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 118 additions and 8 deletions

View file

@ -31,6 +31,7 @@ import io.element.android.libraries.designsystem.theme.components.Text
*
* Ref: https://www.figma.com/file/o9p34zmiuEpZRyvZXJZAYL/FTUE?type=design&node-id=133-5427&t=5SHVppfYzjvkEywR-0
* @param modifier Classical modifier.
* @param renderBackground whether to render the background image or not.
* @param contentAlignment horizontal alignment of the contents.
* @param footer optional footer.
* @param content main content.
@ -38,6 +39,7 @@ import io.element.android.libraries.designsystem.theme.components.Text
@Composable
fun OnBoardingPage(
modifier: Modifier = Modifier,
renderBackground: Boolean = true,
contentAlignment: Alignment.Horizontal = Alignment.CenterHorizontally,
footer: @Composable () -> Unit = {},
content: @Composable () -> Unit = {},
@ -47,13 +49,15 @@ fun OnBoardingPage(
.fillMaxSize()
) {
// BG
Image(
modifier = Modifier
.fillMaxSize(),
painter = painterResource(id = R.drawable.onboarding_bg),
contentScale = ContentScale.Crop,
contentDescription = null,
)
if (renderBackground) {
Image(
modifier = Modifier
.fillMaxSize(),
painter = painterResource(id = R.drawable.onboarding_bg),
contentScale = ContentScale.Crop,
contentDescription = null,
)
}
Column(
modifier = Modifier
.fillMaxSize()