-
Notifications
You must be signed in to change notification settings - Fork 2
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
도라방스Topbar 제작기 #26
도라방스Topbar 제작기 #26
Conversation
.padding(end = 20.dp) | ||
.clickable { onClickActonIcon() }, | ||
painter = painterResource(id = actionIcon), | ||
contentDescription = null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a11y 대응할땐 신경써야할둣~
if (actionIcon != null) { | ||
Icon( | ||
modifier = | ||
Modifier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이거 줄이 왜이랭
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
|
||
object DorabangsTopBar : TopAppBarType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
보통 이런식으루 쓰나 ?! 첨보넹
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
나도 첨보는데 좋은듯 👍👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
투투에서 리팩토링할때 이렇게 햇는데 깔끔한거같아서 가져왔슴당~~!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
잘하셨네용
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
굿잡 ~~ 👍
) { | ||
TopAppBar( | ||
modifier = modifier, | ||
colors = TopAppBarDefaults.topAppBarColors(containerColor = Color.White), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ddyeon
머터리얼에 이런 것도 있구나
디자인 시스템 적용되면 바꾸긴 해야됨 ~~
@Preview | ||
@Composable | ||
fun PreviewBackNavigationTopBar() { | ||
DorabangsTopBar.BackNavigationTopBar( | ||
modifier = Modifier.fillMaxWidth(), | ||
title = "Dorabangs", | ||
titleAlignment = Alignment.CenterStart, | ||
) {} | ||
} | ||
|
||
@Preview | ||
@Composable | ||
fun PreviewBackWithActionIconTopBar() { | ||
DorabangsTopBar.BackWithActionIconTopBar( | ||
modifier = Modifier.fillMaxWidth(), | ||
title = "Dorabangs", | ||
actionIcon = R.drawable.ic_plus, | ||
onClickBackIcon = {}, | ||
onClickActonIcon = {}, | ||
) | ||
} | ||
|
||
@Preview | ||
@Composable | ||
fun PreviewTitleTopAppBar() { | ||
DorabangsTopBar.TitleTopAppBar( | ||
modifier = Modifier.fillMaxWidth(), | ||
title = "Dorabangs", | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ddyeon
프리뷰까지 추가한거 좋았다??
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
|
||
object DorabangsTopBar : TopAppBarType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
나도 첨보는데 좋은듯 👍👍
개요
공통Topbar 제작
작업 내용
공통Topbar만들었습니다~!!! 이름은
DorabangsTopbar
로 우선 해뒀는데맘에 안드면 앱이름으로 바꿉시당ㅎㅎ 아이콘도 미확정~~
TopAppBarType
만들어서 4가지 타입별로 사용할 수 있게 해뒀는데 어떤가유?!!시연 화면 (option)
To Reviers
풀리퀘 템플릿 표가 왜이러지?!!! 구냥 넣음ㅎㅎ
Close
close #18