Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
1f59b10
[ui]: 내 모임방 Pager 디자인 수정 완료 (#35)
rbqks529 Jul 3, 2025
8f98464
[ui]: GroupMakeRoomScreen 책 선택 구현( (#35)
rbqks529 Jul 4, 2025
ae9b6d3
[ui]: [UI] 기록장 화면에 필요한 컴포넌트 PULL (#35)
rbqks529 Jul 4, 2025
1163694
[ui]: 커스텀 BottomSheet 추가, 책 추가 요청 화면 추가 (#35)
rbqks529 Jul 4, 2025
64753aa
[ui]: 책 선택 화면 수정 및 구현 완료 (#35)
rbqks529 Jul 4, 2025
ff05121
[ui]: 파일 이름 및 위치 변경 (#35)
rbqks529 Jul 6, 2025
2f5250e
[ui]: String 추가 및 책 선택 컴포넌트 수정(#35)
rbqks529 Jul 6, 2025
dbb85d9
[ui]: Picker Component 개발 (#35)
rbqks529 Jul 6, 2025
96c950a
[ui]: Picker Component 개발 (#35)
rbqks529 Jul 6, 2025
39c468c
[ui]: 전체 방 만들기 화면 개발 완료 (#35)
rbqks529 Jul 6, 2025
0230de2
[ui]: 독서 모임방 pager Indicator 삭제 (#35)
rbqks529 Jul 7, 2025
6608f24
[ui]: String Resource 추출 (#35)
rbqks529 Jul 7, 2025
81acf63
[chore]: 불 필요한 주석 제거 (#35)
rbqks529 Jul 7, 2025
01aa920
[ui]: 바텀시트 스크롤바 수정 및 파라미터 수정 (#36)
rbqks529 Jul 9, 2025
258ac9b
[ui]: Picker 및 방 생성 화면 추가 사항 수정 (#36)
rbqks529 Jul 9, 2025
a4a87ba
[ui]: Image를 Icon으로 수정 (#36)
rbqks529 Jul 9, 2025
5fb8171
[ui]: Image를 Icon으로 수정 (#36)
rbqks529 Jul 9, 2025
ea54253
[ui]: String, util 함수 추출 (#36)
rbqks529 Jul 9, 2025
ffc818b
[ui]: section dp 수정 및 세로 정렬 수정 (#36)
rbqks529 Jul 9, 2025
99e2b08
[refactor]: string 수정 및 기타 수정 (#36)
rbqks529 Jul 9, 2025
a7513d1
[refactor]: GroupMakeRoomScreen의 상태 및 데이터 클래스 분리 및 뷰모델 예시 작성 (#36)
rbqks529 Jul 9, 2025
5bfd72d
[refactor]: 장르를 viewModel의 장르를 사용하도록 수정 (#35)
rbqks529 Jul 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .idea/deviceManager.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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)
)
}

// 바깥 클릭 감지

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍
오싱기하네여 ㄷㄷ
담엔 요런거 동작되는거 화면녹화 보여주시면 더 조을듯

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)
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
package com.texthip.thip.ui.group.myroom.component
package com.texthip.thip.ui.common.buttons

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import com.texthip.thip.ui.common.buttons.OptionChipButton
import androidx.compose.ui.unit.dp

@Composable
fun GenreChipRow(
modifier: Modifier = Modifier.width(4.dp),
Comment thread
rbqks529 marked this conversation as resolved.
Comment thread
rbqks529 marked this conversation as resolved.
genres: List<String>,
selectedIndex: Int,
onSelect: (Int) -> Unit
) {
Row(
Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceEvenly
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.Center
) {
genres.forEachIndexed { idx, genre ->
OptionChipButton(
Expand All @@ -25,6 +24,9 @@ fun GenreChipRow(
isSelected = selectedIndex == idx,
onClick = { onSelect(idx) }
)
if (idx < genres.size - 1) {
Spacer(modifier = modifier)
}
}
}
}
Expand All @@ -37,4 +39,4 @@ fun PreviewGenreChipRow() {
selectedIndex = 0,
onSelect = {}
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,16 @@ import com.texthip.thip.ui.theme.ThipTheme.typography
@Composable
fun CardBookSearch(
modifier: Modifier = Modifier,
number: Int,
title: String,
imageRes: Int? = R.drawable.bookcover_sample, // 기본 이미지 리소스
onClick: () -> Unit = {}
) {
Row(
modifier = modifier
.fillMaxWidth()
.clickable { onClick() }
.padding(vertical = 8.dp),
.clickable { onClick() },
verticalAlignment = Alignment.CenterVertically
) {
// 넘버
Text(
text = "$number.",
style = typography.menu_m500_s16_h24,
color = colors.White,
modifier = Modifier.padding(end = 12.dp)
)

// 이미지
Box(
modifier = Modifier
Expand Down Expand Up @@ -84,7 +74,6 @@ fun CardBookSearchPreview() {
verticalArrangement = Arrangement.spacedBy(8.dp)
) {
CardBookSearch(
number = 1,
title = "단 한번의 삶"
)
}
Expand Down
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))
Comment thread
rbqks529 marked this conversation as resolved.
}
},
singleLine = true
)
}
}

@Preview()
@Composable
private fun SearchBookTextFieldPreview() {
SearchBookTextField(
hint = "책 제목, 저자검색",
onSearch = { /* 검색 실행 */ }
)
}
Loading