-
Notifications
You must be signed in to change notification settings - Fork 1
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/#11] 탐색 뷰 / 탐색 기본 화면 구현 #30
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
8dd453c
[ADD/#11] TerningTextField 추가
arinming 2c4c070
Merge remote-tracking branch 'origin/develop' into ui/#11-search-view-ui
arinming 9819c4e
[ADD/#11] TerningTextField 추가
arinming 78c8b3a
Merge remote-tracking branch 'origin/ui/#11-search-view-ui' into ui/#…
arinming e7cf63f
[FIX/#23] 경로 수정
arinming 7340cdd
Merge branch 'refs/heads/ui/#23-text-field-color' into ui/#11-search-…
arinming ed2c94b
Merge branch 'refs/heads/develop' into ui/#11-search-view-ui
arinming 42819ec
[ADD/#11] TerningTextField 추가
arinming 7c3dee4
Merge remote-tracking branch 'origin/ui/#11-search-view-ui' into ui/#…
arinming 9d393a4
[ADD/#11] TerningTextField 추가
arinming 7d0e855
Merge remote-tracking branch 'origin/ui/#11-search-view-ui' into ui/#…
arinming eed08f5
[FEAT/#11] ImageSlider 구현
arinming 6846986
[FEAT/#11] 광고 컴포넌트 구현
arinming 8f2970c
[FEAT/#11] 요즘 대학생들에게 인기 있는 공고 텍스트
arinming 314d592
[FEAT/#11] 공고 리스트 텍스트
arinming 7641fd4
[FEAT/#11] 공고 리스트 컴포넌트 구현
arinming 628c9a6
[FIX/#11] 탐색 텍스트 필드 색상 수정
arinming 4d5a569
[DELETE/#11] 안쓰는 코드 삭제
arinming cb73920
[FIX/#11] 경로 변경
arinming 3b353e6
[REFACTOR/#11] padding 값 수정
arinming 8321ae2
[ADD/#11] InternListType Enum class 생성
arinming 3066940
Merge remote-tracking branch 'origin/develop' into ui/#11-search-view-ui
arinming cf2c328
[FIX/#11] 경로 수정
arinming 872c4a9
Merge remote-tracking branch 'origin/develop' into ui/#11-search-view-ui
arinming 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 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 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 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 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 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
29 changes: 29 additions & 0 deletions
29
feature/src/main/java/com/terning/feature/search/component/DotsIndicator.kt
This file contains 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,29 @@ | ||
package com.terning.feature.search.component | ||
|
||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.unit.dp | ||
|
||
@Composable | ||
fun DotsIndicator( | ||
modifier: Modifier = Modifier, | ||
pageCount: Int, | ||
currentPage: Int, | ||
) { | ||
Row( | ||
horizontalArrangement = Arrangement.SpaceBetween, | ||
verticalAlignment = Alignment.CenterVertically, | ||
modifier = Modifier.padding(8.dp) | ||
) { | ||
repeat(pageCount) { index -> | ||
IndicatorDots( | ||
isSelected = index == currentPage, | ||
modifier = modifier | ||
) | ||
} | ||
} | ||
} |
72 changes: 72 additions & 0 deletions
72
feature/src/main/java/com/terning/feature/search/component/ImageSlider.kt
This file contains 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,72 @@ | ||
package com.terning.feature.search.component | ||
|
||
import androidx.compose.foundation.Image | ||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.wrapContentSize | ||
import androidx.compose.foundation.pager.HorizontalPager | ||
import androidx.compose.foundation.pager.rememberPagerState | ||
import androidx.compose.material3.Card | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.LaunchedEffect | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.res.painterResource | ||
import androidx.compose.ui.unit.dp | ||
import com.terning.core.designsystem.theme.Grey200 | ||
import kotlinx.coroutines.delay | ||
|
||
@Composable | ||
fun ImageSlider( | ||
modifier: Modifier = Modifier, | ||
images: List<Int>, | ||
) { | ||
val pagerState = rememberPagerState(pageCount = { images.size }) | ||
|
||
LaunchedEffect(Unit) { | ||
while (true) { | ||
delay(3000) | ||
val nextPage = (pagerState.currentPage + 1) % pagerState.pageCount | ||
pagerState.scrollToPage(nextPage) | ||
} | ||
} | ||
Column( | ||
modifier | ||
.fillMaxWidth() | ||
.background(Grey200), | ||
horizontalAlignment = Alignment.CenterHorizontally | ||
) { | ||
Box( | ||
modifier = modifier | ||
.wrapContentSize(), | ||
contentAlignment = Alignment.BottomCenter | ||
) { | ||
HorizontalPager( | ||
state = pagerState, | ||
modifier = modifier.wrapContentSize() | ||
) { currentPage -> | ||
Card( | ||
modifier | ||
.wrapContentSize() | ||
) { | ||
Image( | ||
painter = painterResource(id = images[currentPage]), | ||
contentDescription = null, | ||
modifier = modifier | ||
.fillMaxWidth() | ||
.height(112.dp) | ||
.padding(16.dp) | ||
) | ||
Comment on lines
+58
to
+63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 나중에 실제 광고 화면 들어가면 요거 고정 디피는 지양하면 좋을 것 가타요! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 넵 !!! |
||
} | ||
} | ||
DotsIndicator( | ||
pageCount = images.size, | ||
currentPage = pagerState.currentPage | ||
) | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
feature/src/main/java/com/terning/feature/search/component/IndicatorDots.kt
This file contains 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,26 @@ | ||
package com.terning.feature.search.component | ||
|
||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.size | ||
import androidx.compose.foundation.shape.CircleShape | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.draw.clip | ||
import androidx.compose.ui.unit.dp | ||
import com.terning.core.designsystem.theme.TerningMain | ||
import com.terning.core.designsystem.theme.White | ||
|
||
@Composable | ||
fun IndicatorDots( | ||
isSelected: Boolean, modifier: Modifier, | ||
) { | ||
Box( | ||
modifier = modifier | ||
.padding(2.dp) | ||
.clip(CircleShape) | ||
.size(6.dp) | ||
.background(if (isSelected) TerningMain else White) | ||
) | ||
} |
6 changes: 6 additions & 0 deletions
6
feature/src/main/java/com/terning/feature/search/component/InternListType.kt
This file contains 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,6 @@ | ||
package com.terning.feature.search.component | ||
|
||
enum class InternListType(val type: String) { | ||
VIEW("view"), | ||
SCRAP("scrap"); | ||
} |
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.
이건 자동 스크롤 로직인가요??
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.
우왕 자동 스크롤까지 구현하다니!!! 진짜 최고최고
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.
기디에서 3초마다 넘어가게 해달라고 하셔서 반영했습니당....... 🫶🏻