View ShowDetailScreen.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ExperimentalMaterialApi | |
@Composable | |
fun DetailArea( | |
... | |
modalBottomSheetState: ModalBottomSheetState | |
) { | |
... | |
val coroutineScope = rememberCoroutineScope() |
View ShowDetailScreen.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ExperimentalMaterialApi | |
@Composable | |
fun ShowDetailScreen(...) { | |
... | |
ModalBottomSheetLayout( | |
... | |
sheetContent = { | |
Surface( |
View ShowDetailScreen.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ExperimentalMaterialApi | |
@Composable | |
fun ShowDetailScreen(...) { | |
... | |
val modalBottomSheetState = rememberModalBottomSheetState(ModalBottomSheetValue.Hidden) | |
... | |
ModalBottomSheetLayout( |
View ShowDetailScreen.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ExperimentalMaterialApi | |
@Composable | |
fun ShowDetailScreen( | |
viewModel: ShowDetailViewModel = hiltViewModel(), | |
... | |
) { | |
... | |
ModalBottomSheetLayout( // <---- This was Surface | |
sheetState = modalBottomSheetState, |
View ShowDetailScreen.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun ShowDetailScreen( | |
viewModel: ShowDetailViewModel = hiltViewModel(), | |
... | |
) { | |
... | |
val showCast = viewModel.showCast.observeAsState() | |
Surface( | |
modifier = Modifier |
View ShowDetailScreen.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun DetailArea( | |
... | |
showCast: List<ShowCast>?, | |
onCastItemClick: (item: ShowCast) -> Unit | |
) { | |
val scrollState = rememberScrollState() | |
Column( | |
modifier = Modifier |
View ShowDetailFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onCreateView(...): View { | |
... | |
binding.composeContainer.apply { | |
// Dispose of the Composition when the view's | |
// LifecycleOwner is destroyed | |
// https://developer.android.com/jetpack/compose/interop/interop-apis | |
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed) | |
setContent { | |
MdcTheme { |
View fragment_show_detail.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<layout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto"> | |
<androidx.compose.ui.platform.ComposeView | |
android:id="@+id/compose_container" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:transitionGroup="true" | |
app:layout_constraintEnd_toEndOf="parent" | |
app:layout_constraintStart_toStartOf="parent" |