Skip to content

Commit

Permalink
showcase change.
Browse files Browse the repository at this point in the history
  • Loading branch information
commandiron committed Oct 12, 2022
1 parent 102c685 commit 2ecfced
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ class MainActivity : ComponentActivity() {
) {
ExpandableHorizontalPager(
count = films.size,
initialHorizontalPadding = 80.dp,
initialHorizontalPadding = 64.dp,
initialWidth = 240.dp,
targetWidth = maxWidth,
mainContent = { page ->
AsyncImage(
Expand All @@ -79,9 +80,10 @@ class MainActivity : ComponentActivity() {
)
},
hiddenContent = { page ->
Column(Modifier.padding(16.dp)) {
HiddenContent(page)
}
HiddenContent(
title = films[page].title,
overview = films[page].overview
)
}
)
}
Expand Down Expand Up @@ -139,10 +141,12 @@ fun OverMainContent(
}

@Composable
fun HiddenContent(page: Int) {
Text(text = films[page].title)
Spacer(Modifier.height(8.dp))
Text(text = films[page].overview)
fun HiddenContent(title: String, overview: String) {
Column(Modifier.padding(16.dp)) {
Text(text = title)
Spacer(Modifier.height(8.dp))
Text(text = overview)
}
}

data class Film(
Expand Down

0 comments on commit 2ecfced

Please sign in to comment.