Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 인기 축제 목록 넘기기 범위 확장
Browse files Browse the repository at this point in the history
SeongHoonC committed Feb 6, 2024
1 parent 15bfa76 commit 7ef03e6
Showing 3 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -47,6 +47,8 @@ class PopularFestivalViewPagerAdapter(
Resources.getSystem().configuration.screenWidthDp - IMAGE_SIZE - INTERVAL_IMAGE + (IMAGE_SIZE - (IMAGE_SIZE * RATE_SELECT_BY_UNSELECT)) * 0.5f
val offset = position * -dpToPx(offsetBetweenPages)
page.translationX = offset
page.pivotX = page.pivotX
page.pivotY = MIDDLE_IMAGE_PIVOT

if (position <= ALREADY_LOAD_POSITION_CONDITION) {
val scaleFactor = RATE_SELECT_BY_UNSELECT.coerceAtLeast(1 - abs(position))
@@ -78,5 +80,6 @@ class PopularFestivalViewPagerAdapter(
private const val PAGE_LIMIT = 4
private const val IMAGE_SIZE = 220.0f
private const val INTERVAL_IMAGE = 24.0f
private const val MIDDLE_IMAGE_PIVOT = 360.0f
}
}
Original file line number Diff line number Diff line change
@@ -35,19 +35,12 @@
android:textColor="@color/background_gray_01"
app:layout_constraintTop_toTopOf="@id/vpPopularFestivalBackground" />

<androidx.viewpager2.widget.ViewPager2
android:id="@+id/vpPopularFestivalForeground"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
app:layout_constraintTop_toBottomOf="@id/tvPopularFestivalTitle" />

<TextView
android:id="@+id/tvPopularFestivalName"
style="@style/H3Bold18Lh20"
android:layout_width="220dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginTop="248dp"
android:ellipsize="end"
android:gravity="center"
android:lineSpacingExtra="0dp"
@@ -56,7 +49,7 @@
android:textColor="@color/background_gray_01"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/vpPopularFestivalForeground"
app:layout_constraintTop_toTopOf="@id/vpPopularFestivalForeground"
tools:text="대학교 \n 축제 이름" />

<TextView
@@ -90,6 +83,14 @@
app:layout_constraintTop_toBottomOf="@id/tvFestivalSchedule"
tools:text="르세라핌, 아이브, 뉴진스, \n다이나믹 듀오" />

<androidx.viewpager2.widget.ViewPager2
android:id="@+id/vpPopularFestivalForeground"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="12dp"
app:layout_constraintBottom_toBottomOf="@id/tlDotIndicator"
app:layout_constraintTop_toBottomOf="@id/tvPopularFestivalTitle" />

<com.google.android.material.tabs.TabLayout
android:id="@+id/tlDotIndicator"
android:layout_width="match_parent"
Original file line number Diff line number Diff line change
@@ -22,11 +22,11 @@
imageUrl="@{item.imageUrl}"
android:layout_width="220dp"
android:layout_height="220dp"
android:elevation="10dp"
android:layout_marginTop="12dp"
android:elevation="12dp"
android:importantForAccessibility="no"
android:outlineProvider="bounds"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

0 comments on commit 7ef03e6

Please sign in to comment.