-
Notifications
You must be signed in to change notification settings - Fork 3
[UI] 모임 페이지 (#25) #29
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
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
fd29940
Merge pull request #3 from THIP-TextHip/develop
rbqks529 717d13c
[UI] TopAppBar 수정 (#25)
rbqks529 acdbc13
[Refactor] FormTextFieldDefault에서 Boolean 값으로 아이콘과 limit을 구분할 수 있도록 수정
rbqks529 ff0a7d5
[Refactor] NotificationCard의 Badge Text를 파라미터로 받도록 수정
rbqks529 621e9d8
[Refactor] CardAlam 함수 이름 수정
rbqks529 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
This file contains hidden or 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 hidden or 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 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,6 +2,9 @@ package com.texthip.thip.ui.common.forms | |||||||||||
|
|
||||||||||||
| import androidx.compose.foundation.clickable | ||||||||||||
| import androidx.compose.foundation.layout.Box | ||||||||||||
| import androidx.compose.foundation.layout.Column | ||||||||||||
| import androidx.compose.foundation.layout.Spacer | ||||||||||||
| import androidx.compose.foundation.layout.padding | ||||||||||||
| import androidx.compose.foundation.layout.size | ||||||||||||
| import androidx.compose.foundation.shape.RoundedCornerShape | ||||||||||||
| import androidx.compose.material3.Icon | ||||||||||||
|
|
@@ -27,60 +30,103 @@ import com.texthip.thip.ui.theme.ThipTheme.typography | |||||||||||
| @Composable | ||||||||||||
| fun FormTextFieldDefault( | ||||||||||||
| modifier: Modifier = Modifier, | ||||||||||||
| hint: String | ||||||||||||
| hint: String, | ||||||||||||
| showLimit: Boolean = false, | ||||||||||||
| limit: Int = 10, | ||||||||||||
| showIcon: Boolean = true | ||||||||||||
| ) { | ||||||||||||
| var text by rememberSaveable { mutableStateOf("") } | ||||||||||||
| val myStyle = typography.menu_r400_s14_h24.copy(lineHeight = 14.sp) | ||||||||||||
|
|
||||||||||||
| OutlinedTextField( | ||||||||||||
| value = text, | ||||||||||||
| onValueChange = { text = it }, | ||||||||||||
| placeholder = { | ||||||||||||
| Text( | ||||||||||||
| text = hint, | ||||||||||||
| color = colors.Grey02, | ||||||||||||
| style = myStyle | ||||||||||||
| ) | ||||||||||||
| }, | ||||||||||||
| textStyle = myStyle, | ||||||||||||
| modifier = modifier.size(width = 320.dp, height = 48.dp), | ||||||||||||
| shape = RoundedCornerShape(12.dp), | ||||||||||||
| colors = TextFieldDefaults.colors( | ||||||||||||
| focusedTextColor = colors.White, | ||||||||||||
| focusedIndicatorColor = Color.Transparent, | ||||||||||||
| unfocusedIndicatorColor = Color.Transparent, | ||||||||||||
| focusedContainerColor = colors.Black, | ||||||||||||
| unfocusedContainerColor = colors.Black, | ||||||||||||
| cursorColor = colors.NeonGreen | ||||||||||||
| ), | ||||||||||||
| trailingIcon = { | ||||||||||||
| if (text.isNotEmpty()) { | ||||||||||||
| Icon( | ||||||||||||
| painter = painterResource(id = R.drawable.ic_x_circle_white), | ||||||||||||
| contentDescription = "Clear text", | ||||||||||||
| modifier = Modifier.clickable { text = "" }, | ||||||||||||
| tint = Color.Unspecified | ||||||||||||
| // 글자수 제한 적용 | ||||||||||||
| val displayText = if (showLimit && text.length > limit) text.substring(0, limit) else text | ||||||||||||
|
|
||||||||||||
| Box(modifier = modifier) { | ||||||||||||
| OutlinedTextField( | ||||||||||||
| value = displayText, | ||||||||||||
| onValueChange = { | ||||||||||||
| // 글자수 제한 적용 | ||||||||||||
| text = if (showLimit && it.length > limit) it.substring(0, limit) else it | ||||||||||||
| }, | ||||||||||||
| placeholder = { | ||||||||||||
| Text( | ||||||||||||
| text = hint, | ||||||||||||
| color = colors.Grey02, | ||||||||||||
| style = myStyle | ||||||||||||
| ) | ||||||||||||
| } else { | ||||||||||||
| Icon( | ||||||||||||
| painter = painterResource(id = R.drawable.ic_x_circle), | ||||||||||||
| contentDescription = "Clear text" | ||||||||||||
| }, | ||||||||||||
| textStyle = myStyle, | ||||||||||||
| modifier = Modifier | ||||||||||||
| .size(width = 320.dp, height = 48.dp), | ||||||||||||
|
Comment on lines
+59
to
+60
|
||||||||||||
| modifier = Modifier | |
| .size(width = 320.dp, height = 48.dp), | |
| modifier = modifier | |
| .fillMaxWidth() | |
| .padding(vertical = 8.dp), |
This file contains hidden or 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
55 changes: 0 additions & 55 deletions
55
app/src/main/java/com/texthip/thip/ui/myPage/groupPage/MainTopAppBar.kt
This file was deleted.
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.
[nitpick] After removing the fixed
.size(...)on the badge container, consider addingminWidth/minHeightor a fixed height to ensure consistent badge dimensions across varyingbadgeTextlengths.