Conversation
Hyobeen-Park
left a comment
There was a problem hiding this comment.
์ง์ง ์ด๋ ๊ฒ ๋น ๋ฅด๊ฒ ๋ง๋ค์๋๋ฐ ์ด๋ ๊ฒ ๊น๋ํ ์๊ฐ ์๋ค๊ณ ์???? ์ด๊ฒ ํฐ๋์๋์ง~ ์๊ณ ํ์ จ์ต๋๋น๐ฅฐ
| text = title, | ||
| modifier = Modifier.align(Alignment.Center), | ||
| textAlign = TextAlign.Center, | ||
| style = TerningTypography().title2 |
There was a problem hiding this comment.
์ค!! ์ด๋ ๊ฒ๋ ํ์ดํฌ ์ง์ ์ด ๋๋ค์?!?
There was a problem hiding this comment.
๋ฌด์ง์ฑ์ผ๋ก TerningTypography ์๋์์ฑํด์ ์ํฌํธํ๋๋ฐ ๋๋๋ผ๊ตฌ์,,,ํ! ใ
There was a problem hiding this comment.
๋ค์ด๋ฐ ๋ค๋ฅธ ์น๊ตฌ๋ค์ด๋ ํต์ผ๋๊ฒ ํ๋ฉด ๋ ์ข์ ๊ฒ ๊ฐ์์...!
There was a problem hiding this comment.
์๋ฆฌํ๋น! ๊ณ ์ณค์ต๋๋น ๊ทผ๋ฐ ์ right ๋ฒํผ์ด ์บ๋ฆฐ๋์๋ 24์ฌ์ด์ฆ๋ก ์๋ ๊ฒ ๊ฐ์์ ์์ค์ค๋น ๋ ์๊ธฐํจ ํด๋ด์ผํ ๊ฒ ๊ฐ๊ธด ํ๋ค์ฉ,,
boiledeggg
left a comment
There was a problem hiding this comment.
๋น ๋ฅด๋ค ๋นจ๋ผ,,, ๋๋ฌด ๊ณ ์ํ์ จ์ต๋๋น!!
leeeyubin
left a comment
There was a problem hiding this comment.
์ง์ง ์๋ ์ต๊ณ ๋ค,,, ๋๋ฌด ์ํ๋๋ฐ์!!!!! ๋ ๋ ํ ์๋ฆฐ์ธ๋,,
drawable ์ํฌํธ ๋ฌธ์ ๋ ๋ ์ด์ผ๊ธฐ ํด๋ณด๋๋ก ํด์!!!
| topBar = { | ||
| when (navigator.currentTab) { | ||
| MainTab.HOME -> LogoTopAppBar() | ||
| MainTab.CALENDAR -> TerningTopAppBar() | ||
| MainTab.SEARCH -> LogoTopAppBar() | ||
| MainTab.MY_PAGE -> MyPageTopAppBar() | ||
| null -> LogoTopAppBar() | ||
| } | ||
| }, |
There was a problem hiding this comment.
ํน์ MainScreen์์ ํ๋ฐ๋ฅผ ๋ฃ์ด์ค ์ด์ ๊ฐ ์์๊น์ฉ,,?
๋ฐํ
๋ฐ๋ ๊น๋นก์์ ๋ฐฉ์งํ๊ธฐ ์ํด ๋ณด์ด๋ ๋ถ๋ถ๊ณผ ์ ๋ณด์ด๋ ๋ถ๋ถ์ ๋๋ด์๋๋ฐ
์ด ํ๋ฐ๋ค์ ๊ฐ screen๋ง๋ค ๊ด๋ฆฌํด์ค๋ ๋ ๊ฒ ๊ฐ์์์!!
There was a problem hiding this comment.
MainScreen์์ Scaffold๋ก ๋ค ๊ฐ์ ํ๋ฉด์ ๊ฐ์ธ์ฃผ๊ณ ์๋๋ฐ ํด๋น Scaffold์ topbar ์์ฑ์ ํ ๋ฒ์ ์ ์ฉํ๋ ค๊ณ ํ์ต๋๋น
๊ฐ screen๋ง๋ค ๊ด๋ฆฌ๋ฅผ ํด์ฃผ๊ฒ ๋๋ฉด Screen๋ง๋ค Scaffold๋ก ํ ๋ฒ ๋ ๊ฐ์ธ์ topbar๋ก ๋ฃ์ด์ฃผ์ด์ผ ํ๋ ๊ฑธ๋ก ์๊ณ ์์ด์..!
๊ทธ๋ฌ๋ฉด ๋ฉ์ธ์คํฌ๋ฆฐ+๊ฐ์คํฌ๋ฆฐ ํด์ Scaffold๊ฐ ๋๋ฒ ๊ฐ์ธ์ง๊ฒ ๋์ด์,, ์ผ๋จ ์ ๋ ๊ฒ ๊ตฌํํด๋ณด์์ต๋๋น.
๊ทธ.. Column์ ๋ฐ๋ก
`
@composable
fun HomeScreen() {
Column(modifier = Modifier.fillMaxSize()) {
LogoTopAppBar()
Text(text = "ํ ์คํฌ๋ฆฐ")
}
}
`
์ด๋ ๊ฒ ๋๋ ค๋ฃ์ผ๋ฉด
์๋กท๊ฒ ์์๊ฐ ๋ถ๋จ๋ ํ์์ด.,,. ใ ใ
There was a problem hiding this comment.
์๋ฅผ ๋ค์ด์ ์ ๋น์ด๊ฐ ๋ง๋ signin ์คํฌ๋ฆฐ์ ๋ฐํ
๋ค๋น๊ฐ ์๊ณ ๋ฉ์ธ์คํฌ๋ฆฐ์์ ๊ด๋ฆฌ๋๋ ์ ๊ฐ ์๋๋๊น ๋ฐ๋ก Scaffold๋ก ๊ฐ์ธ์ topbar๋ฅผ ๋ฃ์ด์ฃผ๋ฉด ๋๋๋ฐ ๋ฉ์ธ ์คํฌ๋ฆฐ์์ ๋ฐํ
๋ค๋น๋ก ๊ด๋ฆฌ๋๋ ์ ๋ค์ scaffold๋ก ๋๋ฒ ๊ฐ์ธ๊ธฐ or ๋ฉ์ธ์์ ๊ด๋ฆฌํ๊ธฐ
๋ก ํด์ผํ ๊ฒ ๊ฐ์๋ฐ ์ด๋ป๊ฒ ์๊ฐํ๋์ง!?!
๋ ์ข์ ๋ฐฉ๋ฒ์ ์์ง ๋ด ๋จธ๋ฆฌ๋ก ์ฐพ์ง ๋ชปํ๋ค ใ ใ
There was a problem hiding this comment.
์นดํก๋ฐฉ์์ ์ด์ผ๊ธฐ ๋๋๋๋ก Scaffold๋ก ํ ๋ฒ ๋ ๊ฐ์ธ์ ๊ด๋ฆฌํ๋๋ก ํด์!!
ํด๋ณด๊ตฌ ๋ถํธํ ์ ๋ฐ๊ฒฌ๋๋ฉด ์์ ํด๋ณด๋ ๊ฑธ๋ก ํฉ์๋ค!
ํ๋ฐ ๊ด๋ จํด์ ์์ ๋๋ฉด ํ ๋ฒ ๋ ์๋ ค์ฃผ์ธ์ฉ!
| onBackButtonClick: (() -> Unit)? = null, | ||
| ) { |
There was a problem hiding this comment.
| onBackButtonClick: (() -> Unit)? = null, | |
| ) { | |
| onBackButtonClick: () -> Unit = {}, | |
| ) { |
์ด๋ฐ ์์ผ๋ก ์์ฑํ๋ฉด null ์ฒดํฌ๋ฅผ ๋ฐ๋ก ์ ํด์ค๋ ๋ ๊ฒ ๊ฐ์์!
There was a problem hiding this comment.
ํ์คํ์ง ์์ง๋ง customActions๋ ๋น์ทํ๊ฒ ๋ฐ๊ฟ์ค ์ ์์ ๊ฒ ๊ฐ์์!
There was a problem hiding this comment.
์ฒด๊ณ ์ผ,, customActions๊น์ง ๋ฐ๋ก ์ ์ฉํด์๋๋ค
| navigationIcon = { | ||
| if (showBackButton) { | ||
| IconButton(onClick = { | ||
| onBackButtonClick?.invoke() | ||
| }) { | ||
| Icon( | ||
| painter = painterResource(id = R.drawable.ic_back), | ||
| contentDescription = stringResource(id = R.string.ic_back) | ||
| ) | ||
| } | ||
| } else { | ||
| customActions?.getOrNull(0)?.invoke() | ||
| } | ||
| }, | ||
| actions = { | ||
| customActions?.drop(1)?.forEach { customAction -> | ||
| customAction() | ||
| } | ||
| }, |
There was a problem hiding this comment.
์ค! ์ด ์์ฑ๋ค์ด ๊ถ๊ธํด์ ์ฐพ์๋ดค๋๋ฐ navigationIcon๋ ์ฑ๋ฐ์ ์ผ์ชฝ์ ์์นํ๋ ์์ด์ฝ์, actions๋ ์ค๋ฅธ์ชฝ์ ์์นํ๋ ์์ด์ฝ์ ์ก์
์ ๋ํ๋ด๋ ๊ฑฐ๊ตฐ์ฌ,,,,,,??!
There was a problem hiding this comment.
๋ง์์ฉ! Tmi๋ฅผ ๋ง๋ถ์ด๋ฉด,,, ๊ธฐ๋ณธ TopAppBar๋ก ๊ตฌํํ์ ๋ navigationIcon, actions ์ค์ ํ๋๋ง ์๋ ๊ฒฝ์ฐ ํ์ดํ์ด ๊ฐ์ด๋ฐ ์ ๋ ฌ๋์ง ์๊ณ ์์ด์ฝ ์ฌ์ด์ฆ ๋งํผ ์ผ์ชฝ, ๋๋ ์ค๋ฅธ์ชฝ์ผ๋ก ์น์ฐ์น๋ ์ด์๊ฐ ์๋๋ผ๊ตฌ์ ใ ใ ๊ทธ๋์ TopAppBar๋์ ํ์ดํ์ ์ค์์ผ๋ก ์ ๋ ฌํด์ฃผ๋ CenterAlignedTopAppBar ์ ์ฉํด์ฃผ์์ฝ๋๋ค.
| customActions = listOf( | ||
| {}, | ||
| { |
There was a problem hiding this comment.
์ฌ๊ธฐ ๋น { }๊ฐ ์๊ธฐ๋ ์ด์ ๋ TerningTopAppBar์์ customActions์ ์ธ๋ฑ์ค1๋ถํฐ ์คํ๋๊ฒ ํ๊ธฐ ๋๋ฌธ์ผ๊น์..?
ํน์ customActions์ ๋ํด ์ค๋ช
ํด์ฃผ์ค ์ ์์๊น์,,ใ
ใ
There was a problem hiding this comment.
๋ง์ดํ์ด์ง๋ ์์ ๊ฐ์ด 'ํ๋กํ ์์ ' ์ด๋ผ๋ ํ ์คํธ + ์ค๋ฅธ์ชฝ ์์ด์ฝ ์ผ๋ก ์ด๋ฃจ์ด์ ธ์๊ณ
๋ก๊ณ ํ ๋ฐ๋ navigation์ด ๋ฐ๋ก ์๋ ์ด๋ฏธ์ง..?! ํ์์ ์์ด์ฝ์์ ํ์ธํ ์ ์๋๋ฐ
navigationIcon ์๋ฆฌ์๋ BackButton์ด ๊ธฐ๋ณธ์ผ๋ก ๋ค์ด๊ฐ๋ ๊ฒ ์ง๊ด์ ์ผ ๊ฒ ๊ฐ์์, ๋ก๊ณ ๋ฅผ navigationIcon์ ๋ฃ๊ธฐ๋ณด๋ค๋ actions์ผ๋ก ๋นผ์ผ๊ฒ ๋ค๋ ์๊ฐ์ ํ์ต๋๋น.
๊ทธ๋์ LogoTopAppBar์ ์ก์
์๋ list ์ฒซ๋ฒ์งธ์ ๋ฐ๋ก ๋ก๊ณ ์ด๋ฏธ์ง๋ฅผ ๋ฃ๊ณ , ์ก์
๋ฆฌ์คํธ์ ์ฒซ๋ฒ์งธ ์ปดํฌ์ ๋ธ์ ํ ๋ฐ์ ์ผ์ชฝ (๋ค๋น๊ฒ์ด์
์์ด์ฝ ์๋ฆฌ) ์ ๋ค์ด๊ฐ ์ ์๊ฒ ํด๋์์ต๋๋ค!
์ก์
๋ฆฌ์คํธ์ ๋๋ฒ์งธ ์ปดํฌ์ ๋ธ๋ถํฐ๋ ํ์ดํ์ ์ผ์ชฝ์ ์์๋๋ก ๋ฐฐ์น๋๋ ํ์์
๋๋ค. ๋ง์ดํ์ด์ง์๋ ์ผ์ชฝ์ ๋ก๊ณ ๊ฐ ์์ด์ ์ฒซ๋ฒ์งธ ์ปดํฌ์ ๋ธ์ {}๋ก ๋ ๊ฒ์
๋๋น.!
There was a problem hiding this comment.
์์ธํ ์ค๋ช ๊ฐ์ฌํฉ๋๋ค! ํ๋ฐ ์ ์ฉํ ๋ ์ฐธ๊ณ ํด์ ๊ฐ๋ฐํ๋๋ก ํ ๊ฒ์!
# Conflicts: # feature/src/main/res/values/strings.xml
leeeyubin
left a comment
There was a problem hiding this comment.
์์ ๋ ๋ถ๋ถ ํ์ธํ์ต๋๋ค~!!
โณ๏ธ Work Description
๐ธ Screenshot
15.mp4
๐ข To Reviewers