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

[feat] [#37] Map 화면 클러스터링 구현 및 Map Marker, Booth HorizontalPager 연동 #66

Merged
merged 18 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
5caa3ac
[fix] [#55] TextField 키보드가 한번 내려갔을 때, 다시 키보드가 올라오지 않는 문제 해결
easyhooon Apr 11, 2024
3d985e2
[style] TextFieldSelectionColor 변경
easyhooon Apr 11, 2024
9554eb0
[fix] 부스 상세 화면에 진입 후 모든 화면에 status bar 영역의 icon 이 보이지 않는 이슈 해결
easyhooon Apr 11, 2024
a22bc99
[fix] [#57] 부스 상세 화면 system bar 영역에 padding 이 생기는 이슈 해결
easyhooon Apr 11, 2024
ee5466b
[fix] 부스 상세 화면 TopAppBar 상단에 고정 및 padding 값 적용
easyhooon Apr 11, 2024
d60a1a9
[fix] [#57] 스낵바 위치 조정
easyhooon Apr 11, 2024
2d4e4a0
[style] BoothDetail 화면 뒤로가기 아이콘 교체
easyhooon Apr 11, 2024
ac9ddb9
[feat] BoothItem 을 눌러야 Booth 로 이동 하도록 변경
easyhooon Apr 11, 2024
36150df
[feat] 랭킹 순위 뱃지 구현
easyhooon Apr 11, 2024
e5f395e
[feat] 인기 부스 확장 축소 아이콘 버튼 및 애니메이션 추가
easyhooon Apr 11, 2024
0e32848
[feat] 지도 클러스터링 구현 및 Marker 와 Booth HorizontalPager 연동
easyhooon Apr 11, 2024
a8f7b41
[chore] code style check success
easyhooon Apr 11, 2024
515e1d3
[fix] 부스 위치 화면에 진입 후 status bar 영역의 icon 이 보이지 않는 이슈 해결
wjdtkdgns777 Apr 12, 2024
3c82646
[fix] 부스 카드 출현이 어색하던 문제 수정
wjdtkdgns777 Apr 12, 2024
2d8ddd6
[style] ranking badge design 미세 수정
easyhooon Apr 12, 2024
e2c2a88
Merge remote-tracking branch 'origin/feature/map-screen-ui' into feat…
easyhooon Apr 12, 2024
990224a
Merge branch 'feature/map-screen-ui' of https://github.com/Project-Un…
wjdtkdgns777 Apr 12, 2024
3fd7140
[design] 부스 필터 칩스 패딩 조정
wjdtkdgns777 Apr 12, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ internal class AndroidFeatureConventionPlugin : BuildLogicConventionPlugin(
implementation(project(path = ":core:ui"))
implementation(project(path = ":feature:navigator"))

implementation(libs.androidx.navigation.compose)
implementation(libs.androidx.hilt.navigation.compose)
implementation(libs.bundles.androidx.lifecycle)
}
Expand Down
1 change: 0 additions & 1 deletion build-logic/src/main/kotlin/com/unifest/android/Compose.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ internal fun Project.configureCompose(extension: CommonExtension<*, *, *, *, *>)
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.tooling.preview)
debugImplementation(libs.androidx.compose.ui.tooling)
implementation(libs.androidx.navigation.compose)
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.unifest.android.core.designsystem.component

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.ScaffoldDefaults
Expand All @@ -25,7 +24,7 @@ fun UnifestScaffold(
containerColor: Color = MaterialTheme.colorScheme.background,
contentColor: Color = contentColorFor(containerColor),
contentWindowInsets: WindowInsets = ScaffoldDefaults.contentWindowInsets,
content: @Composable () -> Unit,
content: @Composable (PaddingValues) -> Unit,
) {
CompositionLocalProvider(
LocalMutableExKeyboardStateSourceOwner provides MutableExKeyboardStateSource(),
Expand All @@ -40,11 +39,7 @@ fun UnifestScaffold(
contentWindowInsets = contentWindowInsets,
modifier = modifier.removeFocusWhenKeyboardIsHidden(),
) { innerPadding ->
Box(
modifier = Modifier.padding(innerPadding),
) {
content()
}
content(innerPadding)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.unifest.android.core.designsystem.component

import androidx.annotation.StringRes
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
Expand All @@ -14,12 +13,14 @@ 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.foundation.text.BasicTextField
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.foundation.text2.BasicTextField2
import androidx.compose.foundation.text2.input.TextFieldState
import androidx.compose.foundation.text.selection.LocalTextSelectionColors
import androidx.compose.foundation.text.selection.TextSelectionColors
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
Expand All @@ -29,16 +30,22 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.ui.unit.dp
import com.unifest.android.core.designsystem.ComponentPreview
import com.unifest.android.core.designsystem.R
import com.unifest.android.core.designsystem.theme.BoothLocation
import com.unifest.android.core.designsystem.theme.UnifestTheme

@OptIn(ExperimentalFoundationApi::class)
val unifestTextSelectionColors = TextSelectionColors(
handleColor = Color(0xFFF5687E),
backgroundColor = Color(0xFFFAB3BE),
)

@Composable
fun SearchTextField(
searchText: TextFieldState,
searchText: TextFieldValue,
updateSearchText: (TextFieldValue) -> Unit,
@StringRes searchTextHintRes: Int,
onSearch: (String) -> Unit,
initSearchText: () -> Unit,
Expand All @@ -47,62 +54,65 @@ fun SearchTextField(
cornerShape: RoundedCornerShape = RoundedCornerShape(67.dp),
borderStroke: BorderStroke = BorderStroke(width = 1.dp, color = Color(0xFFBABABA)),
) {
BasicTextField2(
state = searchText,
modifier = Modifier.fillMaxWidth(),
keyboardOptions = KeyboardOptions.Default.copy(imeAction = ImeAction.Search),
textStyle = TextStyle(color = Color.Black),
decorator = { innerTextField ->
Row(
modifier = modifier
.background(color = backgroundColor, shape = cornerShape)
.border(
border = borderStroke,
shape = cornerShape,
),
verticalAlignment = Alignment.CenterVertically,
) {
Spacer(modifier = Modifier.width(17.dp))
Box {
CompositionLocalProvider(LocalTextSelectionColors provides unifestTextSelectionColors) {
BasicTextField(
value = searchText,
onValueChange = updateSearchText,
modifier = Modifier.fillMaxWidth(),
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Search),
textStyle = TextStyle(color = Color.Black),
decorationBox = { innerTextField ->
Row(
modifier = modifier
.background(color = backgroundColor, shape = cornerShape)
.border(
border = borderStroke,
shape = cornerShape,
),
verticalAlignment = Alignment.CenterVertically,
) {
Spacer(modifier = Modifier.width(17.dp))
Box {
if (searchText.text.isEmpty()) {
Text(
text = stringResource(id = searchTextHintRes),
color = Color(0xFF848484),
style = BoothLocation,
)
}
innerTextField()
}
Spacer(modifier = Modifier.weight(1f))
if (searchText.text.isEmpty()) {
Text(
text = stringResource(id = searchTextHintRes),
color = Color(0xFF848484),
style = BoothLocation,
Icon(
imageVector = ImageVector.vectorResource(R.drawable.ic_search),
contentDescription = "Search Icon",
modifier = Modifier.clickable {
onSearch(searchText.text)
},
)
} else {
Icon(
imageVector = ImageVector.vectorResource(R.drawable.ic_delete_gray),
contentDescription = "Delete Icon",
tint = Color.Unspecified,
modifier = Modifier
.clickable {
initSearchText()
},
)
}
innerTextField()
Spacer(modifier = Modifier.width(width = 15.dp))
}
Spacer(modifier = Modifier.weight(1f))
if (searchText.text.isEmpty()) {
Icon(
imageVector = ImageVector.vectorResource(R.drawable.ic_search),
contentDescription = "Search Icon",
modifier = Modifier.clickable {
onSearch(searchText.text.toString())
},
)
} else {
Icon(
imageVector = ImageVector.vectorResource(R.drawable.ic_delete_gray),
contentDescription = "Delete Icon",
tint = Color.Unspecified,
modifier = Modifier
.clickable {
initSearchText()
},
)
}
Spacer(modifier = Modifier.width(width = 15.dp))
}
},
)
},
)
}
}

@OptIn(ExperimentalFoundationApi::class)
@Composable
fun FestivalSearchTextField(
searchText: TextFieldState,
searchText: TextFieldValue,
updateSearchText: (TextFieldValue) -> Unit,
@StringRes searchTextHintRes: Int,
onSearch: (String) -> Unit,
initSearchText: () -> Unit,
Expand All @@ -117,75 +127,78 @@ fun FestivalSearchTextField(
setEnableSearchMode(searchText.text.isNotEmpty())
}

BasicTextField2(
state = searchText,
modifier = Modifier.fillMaxWidth(),
keyboardOptions = KeyboardOptions.Default.copy(imeAction = ImeAction.Search),
textStyle = TextStyle(color = Color.Black),
decorator = { innerTextField ->
Row(
modifier = modifier
.background(color = backgroundColor, shape = cornerShape)
.border(
border = borderStroke,
shape = cornerShape,
),
verticalAlignment = Alignment.CenterVertically,
) {
Spacer(modifier = Modifier.width(14.dp))
if (isSearchMode) {
Icon(
imageVector = ImageVector.vectorResource(R.drawable.ic_arrow_back_dark_gray),
contentDescription = "Search Icon",
tint = Color(0xFF767676),
modifier = Modifier.clickable {
initSearchText()
},
)
}
Spacer(modifier = Modifier.width(12.dp))
Box {
CompositionLocalProvider(LocalTextSelectionColors provides unifestTextSelectionColors) {
BasicTextField(
value = searchText,
onValueChange = updateSearchText,
modifier = Modifier.fillMaxWidth(),
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Search),
textStyle = TextStyle(color = Color.Black),
decorationBox = { innerTextField ->
Row(
modifier = modifier
.background(color = backgroundColor, shape = cornerShape)
.border(
border = borderStroke,
shape = cornerShape,
),
verticalAlignment = Alignment.CenterVertically,
) {
Spacer(modifier = Modifier.width(14.dp))
if (isSearchMode) {
Icon(
imageVector = ImageVector.vectorResource(R.drawable.ic_arrow_back_dark_gray),
contentDescription = "Search Icon",
tint = Color(0xFF767676),
modifier = Modifier.clickable {
initSearchText()
},
)
}
Spacer(modifier = Modifier.width(12.dp))
Box {
if (searchText.text.isEmpty()) {
Text(
text = stringResource(id = searchTextHintRes),
color = Color(0xFF848484),
style = BoothLocation,
)
}
innerTextField()
}
Spacer(modifier = Modifier.weight(1f))
if (searchText.text.isEmpty()) {
Text(
text = stringResource(id = searchTextHintRes),
color = Color(0xFF848484),
style = BoothLocation,
Icon(
imageVector = ImageVector.vectorResource(R.drawable.ic_search),
contentDescription = "Search Icon",
modifier = Modifier.clickable {
onSearch(searchText.text)
},
)
} else {
Icon(
imageVector = ImageVector.vectorResource(R.drawable.ic_delete_gray),
contentDescription = "Delete Icon",
tint = Color.Unspecified,
modifier = Modifier.clickable {
initSearchText()
},
)
}
innerTextField()
}
Spacer(modifier = Modifier.weight(1f))
if (searchText.text.isEmpty()) {
Icon(
imageVector = ImageVector.vectorResource(R.drawable.ic_search),
contentDescription = "Search Icon",
modifier = Modifier.clickable {
onSearch(searchText.text.toString())
},
)
} else {
Icon(
imageVector = ImageVector.vectorResource(R.drawable.ic_delete_gray),
contentDescription = "Delete Icon",
tint = Color.Unspecified,
modifier = Modifier.clickable {
initSearchText()
},
)
Spacer(modifier = Modifier.width(width = 15.dp))
}
Spacer(modifier = Modifier.width(width = 15.dp))
}
},
)
},
)
}
}

@OptIn(ExperimentalFoundationApi::class)
@ComponentPreview
@Composable
fun SearchTextFieldPreview() {
UnifestTheme {
SearchTextField(
searchText = TextFieldState(""),
searchText = TextFieldValue(),
updateSearchText = {},
searchTextHintRes = R.string.intro_search_text_hint,
onSearch = {},
initSearchText = {},
Expand All @@ -197,13 +210,13 @@ fun SearchTextFieldPreview() {
}
}

@OptIn(ExperimentalFoundationApi::class)
@ComponentPreview
@Composable
fun FestivalSearchTextFieldPreview() {
UnifestTheme {
FestivalSearchTextField(
searchText = TextFieldState("건국대학교"),
searchText = TextFieldValue("건국대학교"),
updateSearchText = {},
searchTextHintRes = R.string.intro_search_text_hint,
onSearch = {},
initSearchText = {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ fun UnifestTopAppBar(
Icon(
imageVector = imageVector,
contentDescription = navigationIconContentDescription,
tint = Color.Unspecified,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
android:viewportWidth="9"
android:viewportHeight="16">
<path
android:pathData="M8,1L1.212,7.788C1.095,7.905 1.095,8.095 1.212,8.212L8,15"
android:strokeWidth="1.5"
android:fillColor="#00000000"
android:strokeColor="#D5D5D5"
android:pathData="M8.53,0.47C8.823,0.763 8.823,1.237 8.53,1.53L2.06,8L8.53,14.47C8.823,14.763 8.823,15.237 8.53,15.53C8.237,15.823 7.762,15.823 7.469,15.53L0.682,8.742C0.272,8.332 0.272,7.668 0.682,7.258L7.469,0.47C7.762,0.177 8.237,0.177 8.53,0.47Z"
android:strokeWidth="0.5"
android:fillColor="#D5D5D5"
android:fillType="evenOdd"
android:strokeColor="#000000"
android:strokeLineCap="round"/>
</vector>
Loading
Loading