Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] 배경사진 추가 및 적용 #63

Merged
merged 3 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.teamhy2.designsystem.ui.theme

import android.app.Activity
import android.graphics.Color
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.darkColorScheme
Expand Down Expand Up @@ -72,7 +73,7 @@ fun HY2Theme(
val window = (view.context as Activity).window
val insetsController = WindowCompat.getInsetsController(window, view)
val statusBarColor = colorScheme.background.toArgb()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이렇게 바뀌면 이 변수는 삭제해도 괜찮지 않을까 생각이 듭니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

반영하였습니다. 까먹었네요

window.statusBarColor = statusBarColor
window.statusBarColor = Color.TRANSPARENT

// 항상 다크테마이기 때문에 상태바 아이콘들을 밝은 톤으로 표시
insetsController.isAppearanceLightStatusBars = false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package com.teamhy2.feature.main

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.navigation.NavHostController
import androidx.navigation.compose.NavHost
import com.teamhy2.designsystem.ui.theme.Black
import com.teamhy2.feature.main.navigation.mainScreen
import com.teamhy2.feature.main.navigation.popUpToMain
import com.teamhy2.feature.main.webviews.inquiry.navigation.inquiryScreen
Expand Down Expand Up @@ -37,8 +35,7 @@ fun HY2NavHost(
Box(
modifier =
modifier
.fillMaxSize()
.background(Black),
.fillMaxSize(),
) {
NavHost(
modifier = modifier,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Scaffold
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.paint
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.res.painterResource
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle
Expand All @@ -29,6 +32,7 @@ import com.google.firebase.Firebase
import com.google.firebase.auth.auth
import com.teamhy2.designsystem.ui.theme.HY2Theme
import com.teamhy2.feature.main.navigation.Main
import com.teamhy2.hongikyeolgong2.main.presentation.R
import com.teamhy2.onboarding.OnboardingViewModel
import com.teamhy2.onboarding.navigation.Onboarding
import com.teamhy2.onboarding.navigation.SignUp
Expand Down Expand Up @@ -78,7 +82,9 @@ class MainActivity : AppCompatActivity() {
setContent {
HY2Theme {
Scaffold(
modifier = Modifier.fillMaxSize(),
modifier =
Modifier
.fillMaxSize(),
) { innerPadding ->
val postNotificationPermission =
rememberPermissionState(permission = Manifest.permission.POST_NOTIFICATIONS)
Expand All @@ -90,7 +96,12 @@ class MainActivity : AppCompatActivity() {
}
}

Column(Modifier.padding(innerPadding)) {
Column(
Modifier.paint(
painterResource(id = R.drawable.backgroud),
contentScale = ContentScale.FillBounds,
).padding(innerPadding),
) {
HY2NavHost(
navController = rememberNavController(),
urls = onboardingViewModel.urls,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.teamhy2.feature.main

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
Expand All @@ -24,7 +23,6 @@ import androidx.hilt.navigation.compose.hiltViewModel
import com.hongikyeolgong2.calendar.presentation.Hy2Calendar
import com.teamhy2.designsystem.common.HY2Dialog
import com.teamhy2.designsystem.common.HY2TimePicker
import com.teamhy2.designsystem.ui.theme.Black
import com.teamhy2.designsystem.ui.theme.Gray100
import com.teamhy2.designsystem.ui.theme.HY2Theme
import com.teamhy2.feature.main.component.InitTimerComponent
Expand Down Expand Up @@ -181,7 +179,6 @@ fun MainScreen(
modifier =
modifier
.fillMaxSize()
.background(Black)
.padding(horizontal = 24.dp),
) {
MainHeader(
Expand Down Expand Up @@ -246,8 +243,7 @@ private fun MainBody(
Column(
modifier =
modifier
.fillMaxSize()
.background(Black),
.fillMaxSize(),
horizontalAlignment = Alignment.CenterHorizontally,
) {
when (uiState.isTimerRunning) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.viewinterop.AndroidView
import com.google.android.gms.common.SignInButton
import com.teamhy2.designsystem.ui.theme.Black
import com.teamhy2.designsystem.ui.theme.Gray600
import com.teamhy2.designsystem.ui.theme.HY2Theme
import com.teamhy2.onboarding.presentation.R
Expand Down Expand Up @@ -64,7 +63,6 @@ fun OnboardingScreen(
Column(
modifier =
modifier
.background(Black)
.fillMaxSize(),
) {
HorizontalPager(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.teamhy2.onboarding

import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
Expand Down Expand Up @@ -32,7 +31,6 @@ import androidx.hilt.navigation.compose.hiltViewModel
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.teamhy2.designsystem.common.HY2DropdownTextField
import com.teamhy2.designsystem.common.HY2TextField
import com.teamhy2.designsystem.ui.theme.Black
import com.teamhy2.designsystem.ui.theme.Blue100
import com.teamhy2.designsystem.ui.theme.Blue400
import com.teamhy2.designsystem.ui.theme.Gray100
Expand Down Expand Up @@ -95,7 +93,6 @@ fun SignUpScreen(
Column(
modifier =
modifier
.background(Black)
.padding(horizontal = 32.dp),
) {
Box(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.teamhy2.feature.setting.presentation

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
Expand Down Expand Up @@ -31,7 +30,6 @@ import androidx.compose.ui.unit.sp
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.teamhy2.designsystem.common.HY2Dialog
import com.teamhy2.designsystem.ui.theme.Black
import com.teamhy2.designsystem.ui.theme.Gray200
import com.teamhy2.designsystem.ui.theme.Gray300
import com.teamhy2.designsystem.ui.theme.HY2Theme
Expand Down Expand Up @@ -121,8 +119,7 @@ fun SettingScreen(
Column(
modifier =
modifier
.fillMaxSize()
.background(Black),
.fillMaxSize(),
) {
IconButton(
onClick = { onBackButtonClick() },
Expand Down
Loading