mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 10:32:34 +00:00
Add background to loading state
This commit is contained in:
+20
-15
@@ -460,23 +460,28 @@ private fun EmptyContent(
|
|||||||
private fun LoadingContent(
|
private fun LoadingContent(
|
||||||
mode: MediaGalleryMode,
|
mode: MediaGalleryMode,
|
||||||
) {
|
) {
|
||||||
Column(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier.fillMaxSize(),
|
||||||
.fillMaxSize()
|
|
||||||
.padding(top = 48.dp)
|
|
||||||
.padding(24.dp),
|
|
||||||
verticalArrangement = Arrangement.spacedBy(16.dp),
|
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
|
||||||
) {
|
) {
|
||||||
CircularProgressIndicator()
|
OnboardingBackground()
|
||||||
val res = when (mode) {
|
Column(
|
||||||
MediaGalleryMode.Images -> R.string.screen_media_browser_list_loading_media
|
modifier = Modifier
|
||||||
MediaGalleryMode.Files -> R.string.screen_media_browser_list_loading_files
|
.fillMaxSize()
|
||||||
|
.padding(top = 48.dp)
|
||||||
|
.padding(24.dp),
|
||||||
|
verticalArrangement = Arrangement.spacedBy(16.dp),
|
||||||
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
|
) {
|
||||||
|
CircularProgressIndicator()
|
||||||
|
val res = when (mode) {
|
||||||
|
MediaGalleryMode.Images -> R.string.screen_media_browser_list_loading_media
|
||||||
|
MediaGalleryMode.Files -> R.string.screen_media_browser_list_loading_files
|
||||||
|
}
|
||||||
|
Text(
|
||||||
|
text = stringResource(res),
|
||||||
|
modifier = Modifier.align(Alignment.CenterHorizontally),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
Text(
|
|
||||||
text = stringResource(res),
|
|
||||||
modifier = Modifier.align(Alignment.CenterHorizontally),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user