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

[UI/#48] 온보딩 뷰 / UI 구현 #70

Merged
merged 32 commits into from
Jul 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a9861ef
[UI/#48] StartScreen UI 구현
leeeyubin Jul 11, 2024
78e6f62
[FEAT/#48] 애니메이션 구현
leeeyubin Jul 11, 2024
ee773f6
[FEAT/#48] solving conflict
leeeyubin Jul 11, 2024
145076b
[FEAT/#48] TopAppBar 수정
leeeyubin Jul 11, 2024
1d01e28
[ADD/#48] Filtering Screen 추가
leeeyubin Jul 11, 2024
3823413
[FEAT/#48] TerningBasicImage 구현
leeeyubin Jul 11, 2024
d1b435d
[FEAT/#48] Text 구현
leeeyubin Jul 11, 2024
b7fe480
[FEAT/#48] string 추출
leeeyubin Jul 11, 2024
b40a191
[FEAT/#48] solving conflict
leeeyubin Jul 11, 2024
d395dbc
[FEAT/#48] FilteringButton 구현
leeeyubin Jul 11, 2024
d5149d1
[FEAT/#48] FilteringButton 구현
leeeyubin Jul 12, 2024
c43e4b9
[UI/#48] FilteringOneScreen UI 구현
leeeyubin Jul 12, 2024
3c4ab6b
[FEAT/#48] Filtering 버튼 연결
leeeyubin Jul 12, 2024
a3b3183
[UI/#48] FilteringTwoScreen UI 구현
leeeyubin Jul 12, 2024
7569fec
[UI/#48] FilteringTwoScreen UI 구현
leeeyubin Jul 12, 2024
e3b7d1c
[FEAT/#48] navigation 연결
leeeyubin Jul 12, 2024
ab9dd9f
[FEAT/#48] button3_a 추가
leeeyubin Jul 12, 2024
6f334c3
[FEAT/#48] padding vertical 수정
leeeyubin Jul 12, 2024
08ad2bb
[FEAT/#48] Calendar 구현
leeeyubin Jul 12, 2024
93cb52f
[FEAT/#48] solving conflict
leeeyubin Jul 12, 2024
16c1646
[FEAT/#48] solving conflict
leeeyubin Jul 12, 2024
e05f2c8
[FEAT/#48] StartHomeScreen 추가
leeeyubin Jul 12, 2024
c4adc81
[FEAT/#48] 스크롤 시 버튼 활성화 구현
leeeyubin Jul 12, 2024
439eb06
[FEAT/#48] 데이트 피커 구현
leeeyubin Jul 12, 2024
6e7565b
[FEAT/#48] pull from develop
leeeyubin Jul 12, 2024
965cb71
[FEAT/#48] pull from develop
leeeyubin Jul 12, 2024
1b2e0d5
[FIX/#48] 마지막 아이템 선택 이슈 해결
leeeyubin Jul 12, 2024
8fc7213
[FEAT/#48] StartHomeScreen 구현
leeeyubin Jul 12, 2024
a06c968
[FEAT/#48] string에 년, 월 추가
leeeyubin Jul 13, 2024
3e8d879
[CHORE/#48] startDestination 수정
leeeyubin Jul 13, 2024
d3b69e9
[CHORE/#48] MONTH 상수화
leeeyubin Jul 13, 2024
72d1d53
Merge branch 'develop' of https://github.com/teamterning/Terning-Andr…
leeeyubin Jul 13, 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
Prev Previous commit
Next Next commit
[FEAT/#48] FilteringButton 구현
  • Loading branch information
leeeyubin committed Jul 12, 2024
commit d5149d18de3ac817a3c1f43e753924c312c12563
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.terning.core.designsystem.theme.Grey400
Expand All @@ -26,6 +25,7 @@ import com.terning.core.designsystem.theme.TerningSub3
import com.terning.core.designsystem.theme.TerningSub4
import com.terning.core.designsystem.theme.TerningSub5
import com.terning.core.designsystem.theme.TerningTheme
import com.terning.core.designsystem.theme.White
import com.terning.core.util.NoRippleTheme

@Composable
Expand All @@ -38,7 +38,7 @@ fun FilteringButton(
val interactionSource = remember { MutableInteractionSource() }
val isPressed by interactionSource.collectIsPressedAsState()
val backgroundColor = when {
!isSelected && !isPressed -> Color.Transparent
!isSelected && !isPressed -> White
!isSelected && isPressed -> TerningSub5
isSelected && !isPressed -> TerningSub4
else -> TerningSub3
Expand Down
Copy link
Member

Choose a reason for hiding this comment

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

이런 라디오버튼들도 재활용한다면 좋을 것 같네요,,,

Copy link
Member Author

Choose a reason for hiding this comment

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

인정하는 부분임다,, 리팩 때 야무지게 해보아요!

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fun StatusOneRadioGroup(
)

val selectedIndex = remember { mutableIntStateOf(options[0]) }
val buttonStates = remember { mutableStateListOf(false, false, false, false) }
val selectedButton = remember { mutableStateListOf(false, false, false, false) }

LazyVerticalGrid(
columns = GridCells.Fixed(1),
Expand All @@ -44,29 +44,17 @@ fun StatusOneRadioGroup(
) {
itemsIndexed(options) { index, option ->

when (buttonStates[index]) {
false -> FilteringButton(
isSelected = false,
modifier = modifier.fillMaxWidth(),
text = option,
onButtonClick = {
selectedIndex.intValue = option
buttonStates[index] = !buttonStates[index]
onButtonClick(index)
}
)

true -> FilteringButton(
isSelected = true,
modifier = modifier.fillMaxWidth(),
text = selectedOptions[index],
onButtonClick = {
selectedIndex.intValue = option
buttonStates[index] = !buttonStates[index]
onButtonClick(index)
}
)
}
FilteringButton(
isSelected = selectedButton[index],
modifier = modifier.fillMaxWidth(),
text = if (selectedButton[index]) selectedOptions[index] else option,
onButtonClick = {
selectedIndex.intValue = option
selectedButton.indices.forEach { i -> selectedButton[i] = false }
selectedButton[index] = true
onButtonClick(index)
}
)
}
}
}