Skip to content

Commit

Permalink
#176 [ui] 상단 고정(sticky) ui 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
pump9918 committed Jun 23, 2024
1 parent e634b0b commit c824bf5
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class MockAddRoutineRepository @Inject constructor() : AddRoutineRepository {
subTitle = "하이브의 주인은 누구?",
title = "뉴진스가 돌아왔다",
hashtag = listOf(
MakerCard.Hashtag(hashtagId = 1, content = "민희진"),
MakerCard.Hashtag(hashtagId = 2, content = "방시혁"),
MakerCard.Hashtag(hashtagId = 2, content = "하이브")
MakerCard.Hashtag(hashtagId = 1, content = "#민희진"),
MakerCard.Hashtag(hashtagId = 2, content = "#방시혁"),
MakerCard.Hashtag(hashtagId = 2, content = "#하이브")
)
),
MakerCard(
Expand All @@ -25,8 +25,8 @@ class MockAddRoutineRepository @Inject constructor() : AddRoutineRepository {
subTitle = "더이상 웹툰작가로는 못산다",
title = "침착맨의 시크릿",
hashtag = listOf(
MakerCard.Hashtag(hashtagId = 3, content = "침착침착"),
MakerCard.Hashtag(hashtagId = 4, content = "이말년")
MakerCard.Hashtag(hashtagId = 3, content = "#침착침착"),
MakerCard.Hashtag(hashtagId = 4, content = "#이말년")
)
),
MakerCard(
Expand All @@ -35,8 +35,8 @@ class MockAddRoutineRepository @Inject constructor() : AddRoutineRepository {
subTitle = "선재업고 얼마나 뛸 수 있어?",
title = "변우석의 성공담",
hashtag = listOf(
MakerCard.Hashtag(hashtagId = 5, content = "류선재"),
MakerCard.Hashtag(hashtagId = 6, content = "드라마")
MakerCard.Hashtag(hashtagId = 5, content = "#류선재"),
MakerCard.Hashtag(hashtagId = 6, content = "#드라마")
)
)
)
Expand Down
141 changes: 79 additions & 62 deletions app/src/main/res/layout/activity_add_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="10dp"
android:padding="7dp"
android:paddingBottom="10dp"
android:src="@drawable/ic_back_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand All @@ -33,79 +33,96 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:paddingBottom="10dp"
android:text="@string/add_list_title"
android:textAppearance="@style/body1"
app:layout_constraintBottom_toBottomOf="@id/iv_add_list_back_arrow"
app:layout_constraintStart_toEndOf="@id/iv_add_list_back_arrow"
app:layout_constraintTop_toTopOf="@id/iv_add_list_back_arrow" />

<TextView
android:id="@+id/tv_add_list_maker_recommend"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="29dp"
android:text="@string/add_list_maker_recommend"
android:textAppearance="@style/body1"
<!-- 스크롤 가능한 내용 -->
<androidx.core.widget.NestedScrollView
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@id/tv_add_list_title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_add_list_title" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent">

<ImageView
android:id="@+id/iv_add_list_maker_chip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:src="@drawable/ic_maker_chip"
app:layout_constraintBottom_toBottomOf="@id/tv_add_list_maker_recommend"
app:layout_constraintStart_toEndOf="@id/tv_add_list_maker_recommend"
app:layout_constraintTop_toTopOf="@id/tv_add_list_maker_recommend" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<ImageView
android:id="@+id/iv_add_list_maker_help"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="20dp"
android:padding="9dp"
android:src="@drawable/ic_maker_help"
app:layout_constraintBottom_toBottomOf="@id/iv_add_list_maker_chip"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/iv_add_list_maker_chip" />
<TextView
android:id="@+id/tv_add_list_maker_recommend"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="19dp"
android:text="@string/add_list_maker_recommend"
android:textAppearance="@style/body1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<androidx.viewpager2.widget.ViewPager2
android:id="@+id/vp_add_list_maker_card"
android:layout_width="match_parent"
android:layout_height="196dp"
android:layout_marginTop="15dp"
android:clipToPadding="false"
app:layout_constraintBottom_toTopOf="@id/tv_add_list_theme_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_add_list_maker_recommend"
tools:listitem="@layout/item_add_list_maker_card" />
<ImageView
android:id="@+id/iv_add_list_maker_chip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:src="@drawable/ic_maker_chip"
app:layout_constraintBottom_toBottomOf="@id/tv_add_list_maker_recommend"
app:layout_constraintStart_toEndOf="@id/tv_add_list_maker_recommend"
app:layout_constraintTop_toTopOf="@id/tv_add_list_maker_recommend" />

<TextView
android:id="@+id/tv_add_list_theme_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="@string/add_list_theme_title"
android:textAppearance="@style/body1"
app:layout_constraintBottom_toTopOf="@id/rv_add_list"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/vp_add_list_maker_card" />
<ImageView
android:id="@+id/iv_add_list_maker_help"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="20dp"
android:padding="9dp"
android:src="@drawable/ic_maker_help"
app:layout_constraintBottom_toBottomOf="@id/iv_add_list_maker_chip"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/iv_add_list_maker_chip" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_add_list"
android:layout_width="0dp"
android:layout_height="0dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_add_list_theme_title"
tools:listitem="@layout/item_add_list" />
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/vp_add_list_maker_card"
android:layout_width="match_parent"
android:layout_height="196dp"
android:layout_marginTop="15dp"
android:clipToPadding="false"
app:layout_constraintBottom_toTopOf="@id/tv_add_list_theme_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_add_list_maker_recommend"
tools:listitem="@layout/item_add_list_maker_card" />

<TextView
android:id="@+id/tv_add_list_theme_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="@string/add_list_theme_title"
android:textAppearance="@style/body1"
app:layout_constraintBottom_toTopOf="@id/rv_add_list"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/vp_add_list_maker_card" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_add_list"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_add_list_theme_title"
tools:listitem="@layout/item_add_list" />

</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>

</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

0 comments on commit c824bf5

Please sign in to comment.