-
Notifications
You must be signed in to change notification settings - Fork 3
[UI] 모임방 만들기 페이지 구현 완료 #39
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
Merged
Nico1eKim
merged 22 commits into
THIP-TextHip:develop
from
rbqks529:ui/#35-group_mygroup
Jul 10, 2025
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
1f59b10
[ui]: 내 모임방 Pager 디자인 수정 완료 (#35)
rbqks529 8f98464
[ui]: GroupMakeRoomScreen 책 선택 구현( (#35)
rbqks529 ae9b6d3
[ui]: [UI] 기록장 화면에 필요한 컴포넌트 PULL (#35)
rbqks529 1163694
[ui]: 커스텀 BottomSheet 추가, 책 추가 요청 화면 추가 (#35)
rbqks529 64753aa
[ui]: 책 선택 화면 수정 및 구현 완료 (#35)
rbqks529 ff05121
[ui]: 파일 이름 및 위치 변경 (#35)
rbqks529 2f5250e
[ui]: String 추가 및 책 선택 컴포넌트 수정(#35)
rbqks529 dbb85d9
[ui]: Picker Component 개발 (#35)
rbqks529 96c950a
[ui]: Picker Component 개발 (#35)
rbqks529 39c468c
[ui]: 전체 방 만들기 화면 개발 완료 (#35)
rbqks529 0230de2
[ui]: 독서 모임방 pager Indicator 삭제 (#35)
rbqks529 6608f24
[ui]: String Resource 추출 (#35)
rbqks529 81acf63
[chore]: 불 필요한 주석 제거 (#35)
rbqks529 01aa920
[ui]: 바텀시트 스크롤바 수정 및 파라미터 수정 (#36)
rbqks529 258ac9b
[ui]: Picker 및 방 생성 화면 추가 사항 수정 (#36)
rbqks529 a4a87ba
[ui]: Image를 Icon으로 수정 (#36)
rbqks529 5fb8171
[ui]: Image를 Icon으로 수정 (#36)
rbqks529 ea54253
[ui]: String, util 함수 추출 (#36)
rbqks529 ffc818b
[ui]: section dp 수정 및 세로 정렬 수정 (#36)
rbqks529 99e2b08
[refactor]: string 수정 및 기타 수정 (#36)
rbqks529 a7513d1
[refactor]: GroupMakeRoomScreen의 상태 및 데이터 클래스 분리 및 뷰모델 예시 작성 (#36)
rbqks529 5bfd72d
[refactor]: 장르를 viewModel의 장르를 사용하도록 수정 (#35)
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
141 changes: 141 additions & 0 deletions
141
app/src/main/java/com/texthip/thip/ui/common/bottomsheet/CustomBottomSheet.kt
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 |
|---|---|---|
| @@ -0,0 +1,141 @@ | ||
| package com.texthip.thip.ui.common.bottomsheet | ||
|
|
||
|
|
||
| import androidx.compose.animation.core.Animatable | ||
| import androidx.compose.animation.core.tween | ||
| import androidx.compose.foundation.background | ||
| import androidx.compose.foundation.clickable | ||
| import androidx.compose.foundation.gestures.detectVerticalDragGestures | ||
| import androidx.compose.foundation.interaction.MutableInteractionSource | ||
| import androidx.compose.foundation.layout.* | ||
| import androidx.compose.foundation.shape.RoundedCornerShape | ||
| import androidx.compose.material3.Button | ||
| import androidx.compose.material3.Text | ||
| import androidx.compose.runtime.* | ||
| import androidx.compose.ui.Alignment | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.graphics.Color | ||
| import androidx.compose.ui.input.pointer.pointerInput | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import androidx.compose.ui.unit.dp | ||
| import androidx.compose.ui.zIndex | ||
| import com.texthip.thip.ui.theme.ThipTheme | ||
| import com.texthip.thip.ui.theme.ThipTheme.colors | ||
| import kotlinx.coroutines.launch | ||
|
|
||
| @Composable | ||
| fun CustomBottomSheet( | ||
| onDismiss: () -> Unit, | ||
| content: @Composable ColumnScope.() -> Unit | ||
| ) { | ||
| val scope = rememberCoroutineScope() | ||
| val animatableOffset = remember { Animatable(300f) } | ||
| var offsetY by remember { mutableFloatStateOf(0f) } | ||
| var isDismissing by remember { mutableStateOf(false) } | ||
|
|
||
| // 등장 애니메이션 | ||
| LaunchedEffect(Unit) { | ||
| animatableOffset.animateTo( | ||
| targetValue = 0f, | ||
| animationSpec = tween(durationMillis = 300) | ||
| ) | ||
| } | ||
|
|
||
| // 바깥 클릭 감지 | ||
| Box( | ||
| modifier = Modifier | ||
| .fillMaxSize() | ||
| .clickable( | ||
| indication = null, | ||
| interactionSource = remember { MutableInteractionSource() } | ||
| ) { | ||
| if (!isDismissing) { | ||
| isDismissing = true | ||
| scope.launch { | ||
| animatableOffset.animateTo(300f, tween(300)) | ||
| onDismiss() | ||
| } | ||
| } | ||
| } | ||
| .zIndex(1f) | ||
| ) | ||
|
|
||
| // BottomSheet 본체 | ||
| Box( | ||
| modifier = Modifier | ||
| .fillMaxSize() | ||
| .zIndex(2f), | ||
| contentAlignment = Alignment.BottomCenter | ||
| ) { | ||
| Box( | ||
| modifier = Modifier | ||
| .fillMaxWidth() | ||
| .offset(y = (offsetY + animatableOffset.value).dp) | ||
| .background( | ||
| color = colors.DarkGrey, | ||
| shape = RoundedCornerShape(topEnd = 12.dp, topStart = 12.dp) | ||
| ) | ||
| .pointerInput(Unit) { | ||
| detectVerticalDragGestures( | ||
| onVerticalDrag = { _, dragAmount -> | ||
| if (dragAmount > 0) { | ||
| offsetY += dragAmount / 2 | ||
| } | ||
| }, | ||
| onDragEnd = { | ||
| if (offsetY > 100f && !isDismissing) { | ||
| isDismissing = true | ||
| scope.launch { | ||
| animatableOffset.animateTo(300f, tween(300)) | ||
| onDismiss() | ||
| } | ||
| } else { | ||
| offsetY = 0f | ||
| } | ||
| } | ||
| ) | ||
| } | ||
| .clickable(enabled = true) {} | ||
| ) { | ||
| Column(modifier = Modifier.fillMaxWidth()) { | ||
| content() | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
||
| @Preview() | ||
| @Composable | ||
| fun PreviewCustomBottomSheet() { | ||
| var showSheet by remember { mutableStateOf(true) } | ||
|
|
||
| ThipTheme { | ||
| Box(Modifier.fillMaxSize()) { | ||
| Text( | ||
| text = "Main Content Area", | ||
| color = Color.White, | ||
| modifier = Modifier | ||
| .align(Alignment.Center) | ||
| ) | ||
|
|
||
| if (showSheet) { | ||
| CustomBottomSheet( | ||
| onDismiss = { showSheet = false } | ||
| ) { | ||
| Text( | ||
| "바텀 시트 예시", | ||
| color = Color.White, | ||
| modifier = Modifier.padding(bottom = 16.dp) | ||
| ) | ||
| Button( | ||
| onClick = { showSheet = false }, | ||
| modifier = Modifier.fillMaxWidth() | ||
| ) { | ||
| Text("닫기", color = Color.Black) | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
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
105 changes: 105 additions & 0 deletions
105
app/src/main/java/com/texthip/thip/ui/common/forms/SearchBookTextField.kt
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 |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| package com.texthip.thip.ui.common.forms | ||
|
|
||
| import androidx.compose.foundation.clickable | ||
| import androidx.compose.foundation.layout.Arrangement | ||
| import androidx.compose.foundation.layout.Box | ||
| import androidx.compose.foundation.layout.Row | ||
| import androidx.compose.foundation.layout.Spacer | ||
| import androidx.compose.foundation.layout.fillMaxSize | ||
| import androidx.compose.foundation.layout.fillMaxWidth | ||
| import androidx.compose.foundation.layout.height | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.layout.size | ||
| import androidx.compose.foundation.layout.width | ||
| import androidx.compose.foundation.shape.RoundedCornerShape | ||
| import androidx.compose.material3.Icon | ||
| import androidx.compose.material3.OutlinedTextField | ||
| import androidx.compose.material3.Text | ||
| import androidx.compose.material3.TextFieldDefaults | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.runtime.getValue | ||
| import androidx.compose.runtime.mutableStateOf | ||
| import androidx.compose.runtime.saveable.rememberSaveable | ||
| import androidx.compose.runtime.setValue | ||
| import androidx.compose.ui.Alignment | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.graphics.Color | ||
| import androidx.compose.ui.res.painterResource | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import androidx.compose.ui.unit.dp | ||
| import androidx.compose.ui.unit.sp | ||
| import com.texthip.thip.R | ||
| import com.texthip.thip.ui.theme.ThipTheme.colors | ||
| import com.texthip.thip.ui.theme.ThipTheme.typography | ||
|
|
||
| @Composable | ||
| fun SearchBookTextField( | ||
| modifier: Modifier = Modifier, | ||
| hint: String, | ||
| onSearch: (String) -> Unit = {} | ||
| ) { | ||
| var text by rememberSaveable { mutableStateOf("") } | ||
| val myStyle = typography.menu_r400_s14_h24.copy(lineHeight = 14.sp) | ||
|
|
||
| Box( | ||
| modifier = modifier.height(48.dp) | ||
| ) { | ||
| OutlinedTextField( | ||
| value = text, | ||
| onValueChange = { | ||
| text = it | ||
| }, | ||
| placeholder = { | ||
| Text( | ||
| text = hint, | ||
| color = colors.Grey02, | ||
| style = myStyle | ||
| ) | ||
| }, | ||
| textStyle = myStyle, | ||
| modifier = Modifier.fillMaxSize(), | ||
| shape = RoundedCornerShape(12.dp), | ||
| colors = TextFieldDefaults.colors( | ||
| focusedTextColor = colors.White, | ||
| focusedIndicatorColor = Color.Transparent, | ||
| unfocusedIndicatorColor = Color.Transparent, | ||
| focusedContainerColor = colors.DarkGrey02, | ||
| unfocusedContainerColor = colors.DarkGrey02, | ||
| cursorColor = colors.NeonGreen | ||
| ), | ||
| trailingIcon = { | ||
| Row( | ||
| horizontalArrangement = Arrangement.Center | ||
| ) { | ||
| Icon( | ||
| painter = painterResource(id = R.drawable.ic_x_circle_grey), | ||
| contentDescription = "Clear text", | ||
| modifier = Modifier | ||
| .clickable { text = "" }, | ||
| tint = Color.Unspecified | ||
| ) | ||
|
|
||
| Spacer(Modifier.width(20.dp)) | ||
| Icon( | ||
| painter = painterResource(id = R.drawable.ic_search), | ||
| contentDescription = "Search", | ||
| modifier = Modifier | ||
| .clickable { onSearch(text) }, | ||
| tint = colors.White | ||
| ) | ||
| Spacer(Modifier.width(8.dp)) | ||
|
rbqks529 marked this conversation as resolved.
|
||
| } | ||
| }, | ||
| singleLine = true | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| @Preview() | ||
| @Composable | ||
| private fun SearchBookTextFieldPreview() { | ||
| SearchBookTextField( | ||
| hint = "책 제목, 저자검색", | ||
| onSearch = { /* 검색 실행 */ } | ||
| ) | ||
| } | ||
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.
👍
오싱기하네여 ㄷㄷ
담엔 요런거 동작되는거 화면녹화 보여주시면 더 조을듯