-
Notifications
You must be signed in to change notification settings - Fork 70
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
[디자인] 디자인 최신화 #320
Merged
Merged
[디자인] 디자인 최신화 #320
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
88a8380
feat : HomeScreen design 최신화
JeonK1 700cdb2
feat : SettingScreen design 최신화
JeonK1 85d101e
feat : contributor design 최신화
JeonK1 96f13a9
feat : sessionScreen design 최신화
JeonK1 91ad5f1
feat : SessionDetailScreen design 최신화
JeonK1 9837537
feat : 북마크 Chip 생성 및 추가
JeonK1 0b6239f
feat : SessionDetailScreen 에서 "세션소개" 문구 추가
JeonK1 3402482
feat : Session 하단에 Footer 추가
JeonK1 e676171
feat : BookmarkScreen design 최신화
JeonK1 c76da98
feat : surfaceDim 추가
JeonK1 d74dd83
delete : unused import
JeonK1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
72 changes: 72 additions & 0 deletions
72
...signsystem/src/main/java/com/droidknights/app/core/designsystem/component/IconTextChip.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
package com.droidknights.app.core.designsystem.component | ||
|
||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.width | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material3.Icon | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.ProvideTextStyle | ||
import androidx.compose.material3.Surface | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.graphics.painter.Painter | ||
import androidx.compose.ui.res.painterResource | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import androidx.compose.ui.unit.dp | ||
import com.droidknights.app.core.designsystem.theme.DarkGray | ||
import com.droidknights.app.core.designsystem.theme.KnightsTheme | ||
import com.droidknights.app.core.designsystem.theme.LightGray | ||
|
||
@Composable | ||
fun IconTextChip( | ||
text: String, | ||
containerColor: Color, | ||
labelColor: Color, | ||
iconPainter: Painter, | ||
iconTint: Color, | ||
modifier: Modifier = Modifier, | ||
) { | ||
Surface( | ||
modifier = modifier, | ||
shape = RoundedCornerShape(10.dp), | ||
color = containerColor, | ||
) { | ||
Row( | ||
modifier = modifier.padding(start = 4.dp, end = 10.dp), | ||
verticalAlignment = Alignment.CenterVertically, | ||
horizontalArrangement = Arrangement.Start | ||
) { | ||
Icon( | ||
modifier = modifier | ||
.width(20.dp) | ||
.height(20.dp), | ||
painter = iconPainter, | ||
contentDescription = null, | ||
tint = iconTint | ||
) | ||
ProvideTextStyle(KnightsTheme.typography.labelSmallM) { | ||
Text(text = text, color = labelColor, modifier = Modifier.padding(top = 2.dp, bottom = 2.dp)) | ||
} | ||
} | ||
} | ||
} | ||
|
||
@Preview | ||
@Composable | ||
private fun IconTextChipPreview() { | ||
MaterialTheme { | ||
IconTextChip( | ||
"북마크", | ||
containerColor = DarkGray, | ||
labelColor = LightGray, | ||
iconPainter = painterResource(id = androidx.appcompat.R.drawable.abc_btn_radio_material), | ||
iconTint = Color.Green | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
preview에서는 theme를 적용하지 않고, @Preveiw 어노테이션을 활용하여 처리할수도 있습니다.
개인적으론 preview용 theme를 따로 만들어 사용하기도 합니다.
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.
추후 컴포즈 개발에도 참고해야겠네요! 코멘트 감사드립니다~