Fix preview rendering
This commit is contained in:
parent
2fdb28d61c
commit
d37ec23fa9
3 changed files with 5 additions and 2 deletions
|
|
@ -14,6 +14,7 @@ import androidx.compose.foundation.interaction.MutableInteractionSource
|
|||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
|
|
@ -112,6 +113,7 @@ internal fun MediaFileViewPreview(
|
|||
@PreviewParameter(MediaInfoFileProvider::class) info: MediaInfo
|
||||
) = ElementPreview {
|
||||
MediaFileView(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
localMediaViewState = rememberLocalMediaViewState(),
|
||||
uri = null,
|
||||
info = info,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
package io.element.android.libraries.mediaviewer.impl.local.image
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
|
|
@ -55,6 +56,7 @@ fun MediaImageView(
|
|||
@Composable
|
||||
internal fun MediaImageViewPreview() = ElementPreview {
|
||||
MediaImageView(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
localMediaViewState = rememberLocalMediaViewState(),
|
||||
localMedia = null,
|
||||
onClick = {},
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import androidx.compose.foundation.background
|
|||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.wrapContentSize
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.derivedStateOf
|
||||
|
|
@ -179,7 +178,7 @@ private fun ExoPlayerMediaVideoView(
|
|||
Text(
|
||||
modifier = Modifier
|
||||
.background(ElementTheme.colors.bgSubtlePrimary)
|
||||
.wrapContentSize(),
|
||||
.align(Alignment.Center),
|
||||
text = "A Video Player will render here",
|
||||
)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue