Skip to content

Commit

Permalink
Change BottomSheet ContainerColor On DetailScreen, TopBar title On Ho…
Browse files Browse the repository at this point in the history
…meScreen
  • Loading branch information
jhg3410 committed Jul 14, 2023
1 parent ae74d1b commit 51d149e
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import androidx.compose.material3.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.unit.TextUnit
import androidx.compose.ui.unit.dp
import com.jik.core.designsystem.theme.MovieTheme
import com.jik.core.ui.preview.ThemePreviews
Expand All @@ -18,13 +20,17 @@ fun MovieTopAppBar(
containerColor = MaterialTheme.colorScheme.background,
scrolledContainerColor = MaterialTheme.colorScheme.background
),
scrollBehavior: TopAppBarScrollBehavior? = null
scrollBehavior: TopAppBarScrollBehavior? = null,
titleFontFamily: FontFamily? = null,
titleFontSize: TextUnit = TextUnit.Unspecified,
) {
TopAppBar(
title = {
Text(
text = stringResource(id = titleRes),
color = MaterialTheme.colorScheme.primary
color = MaterialTheme.colorScheme.primary,
fontFamily = titleFontFamily,
fontSize = titleFontSize
)
},
colors = colors,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ val Typography = Typography(
)


val sansita = FontFamily(
Font(R.font.sansita_blackitalic),
)
object MovieFontFamily {
val Sansita = FontFamily(
Font(R.font.sansita_blackitalic),
)
val LilitaOne = FontFamily(
Font(R.font.lilita_one),
)
}
Binary file not shown.
2 changes: 2 additions & 0 deletions core-ui/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
<resources>

<string name="app_name">Movie</string>

<string name="logo">M</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ fun DetailScreenContent(
sheetPeekHeight = getStatusBarHeight() +
LocalConfiguration.current.screenHeightDp.dp - (LocalConfiguration.current.screenWidthDp.dp * 1.5f),
sheetShape = RoundedCornerShape(size = 16.dp),
sheetContainerColor = MaterialTheme.colorScheme.background,
modifier = modifier
) {
GradientPosterCard(
Expand Down
11 changes: 7 additions & 4 deletions feature-home/src/main/java/com/jik/feature/home/HomeScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.jik.core.designsystem.component.*
import com.jik.core.designsystem.theme.sansita
import com.jik.core.designsystem.theme.MovieFontFamily
import com.jik.core.model.Movie
import com.jik.core.ui.pagination.Pageable
import com.jik.core.ui.state.UiState
Expand Down Expand Up @@ -136,7 +137,7 @@ fun HomeScreenPopularContent(
modifier = Modifier.padding(horizontal = 16.dp),
style = MaterialTheme.typography.titleLarge,
color = MaterialTheme.colorScheme.primary,
fontFamily = sansita
fontFamily = MovieFontFamily.Sansita
)

LazyRow(
Expand Down Expand Up @@ -166,11 +167,13 @@ fun HomeScreenTopBar(
) {
MovieTopAppBar(
modifier = modifier,
titleRes = R.string.home,
titleRes = com.jik.core.ui.R.string.logo,
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.background.copy(
alpha = 0.0f
)
)
),
titleFontFamily = MovieFontFamily.LilitaOne,
titleFontSize = 40.sp
)
}

0 comments on commit 51d149e

Please sign in to comment.