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

[Main] 메인 화면 BottomBar 구조 추가 #26

Merged
merged 13 commits into from
Jul 9, 2023
Merged

[Main] 메인 화면 BottomBar 구조 추가 #26

merged 13 commits into from
Jul 9, 2023

Conversation

laco-dev
Copy link
Contributor

@laco-dev laco-dev commented Jul 6, 2023

Issue

Overview (Required)

  • 메인 화면을 상태바를 포함해서 그리기 위해 NoStatusBar 테마 적용
  • MainScreen 컴포저블 추가
  • MainTab (SETTING, HOME, TEMP) 타입 추가
  • MainBottomBar 컴포저블 구현

Etc

  • 컬러 시스템이 정의되어 있지 않아 HEX 코드를 직접 사용함

Screenshot

@laco-dev laco-dev added the enhancement New feature or request label Jul 6, 2023
@laco-dev laco-dev requested a review from wisemuji July 6, 2023 14:58
@laco-dev laco-dev self-assigned this Jul 6, 2023
@laco-dev laco-dev requested a review from wisemuji July 7, 2023 00:11
import androidx.compose.ui.unit.dp

@Composable
fun MainScreen() {
Copy link
Member

Choose a reason for hiding this comment

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

모듈별이니 internal 붙여두는게 더 좋아요.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

painter = painterResource(id = resId),
contentDescription = null,
tint = if (selected) Color(0xFF49F300) else Color(0xFFDCDCDC),
modifier = Modifier.size(34.dp),
Copy link
Member

Choose a reason for hiding this comment

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

icon 사이즈를 늘리는것과 box의 사이즈 늘리는게 좀 달라서
기본 Icon은 내부적으로 24.dp를 강제로 셋팅합니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

Icon 컴포저블은 painter의 크기를 가져올 수 없는 경우에만 24로 고정합니다.

color = Color(0xFFDCDCDC), // lightgray
shape = RoundedCornerShape(size = 28.dp)
)
.background(color = Color(0xFFFFFFFF), shape = RoundedCornerShape(28.dp))
Copy link
Member

Choose a reason for hiding this comment

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

Color 정보 테마 지정하면서 지정하는게 좋겠네요.

Copy link
Contributor Author

@laco-dev laco-dev Jul 7, 2023

Choose a reason for hiding this comment

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

아직 디자인 정의가 안되어있는 상태입니다.
따로 이슈 생성 해 두었습니다

.navigationBarsPadding()
.padding(start = 8.dp, end = 8.dp, bottom = 28.dp)
.fillMaxWidth()
.height(56.dp)
Copy link
Member

Choose a reason for hiding this comment

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

modifier를 외부에서 주입하고있긴한데 내부에서 padding 지정과 외부에서도 padding과 같은 지정을 할 수 있어서
사실 좋은 방법은 아니에요.

그리고 modifier의 순서는 매우 중요하지만 여기서는 fil/height가 먼저와도 상관은 없어요. padding이 어차피 색상 먹기 전에만 지정하면 아웃사이드의 padding이고, 색상 먹고 난 다음엔 inside의 padding이라서

Copy link
Contributor Author

Choose a reason for hiding this comment

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

xml에서 layout_width layout_height을 최상단에 쓰듯이 이 속성들도 가장 앞에 위치하는게 눈에 잘 들어오네요

1d024ab

Copy link
Contributor Author

Choose a reason for hiding this comment

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

현재는 Modifier가 외부에서 주입이 필요하지 않으니 제거해두겠습니다.
098c5cb

Copy link
Member

@wisemuji wisemuji left a comment

Choose a reason for hiding this comment

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

태환님 코멘트만 확인 부탁드립니다!

@laco-dev laco-dev requested a review from taehwandev July 7, 2023 14:58
@laco-dev laco-dev merged commit ddb4a54 into droidknights:main Jul 9, 2023
@laco-dev laco-dev deleted the feature/#21 branch July 9, 2023 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2023 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Main] 메인 화면 BottomBar 구조 추가
3 participants