feat(home): 장르 크리에이터 페이지 리소스를 추가한다
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package kr.co.vividnext.sodalive.v2.main.home.ui
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import androidx.recyclerview.widget.PagerSnapHelper
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
||||
class HomePagerSnapRecyclerView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : RecyclerView(context, attrs, defStyleAttr) {
|
||||
private val snapHelper = PagerSnapHelper()
|
||||
|
||||
init {
|
||||
clipToPadding = false
|
||||
if (onFlingListener == null) snapHelper.attachToRecyclerView(this)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:endColor="@color/soda_700"
|
||||
android:startColor="@color/gray_900" />
|
||||
<corners android:radius="@dimen/radius_14" />
|
||||
</shape>
|
||||
@@ -165,42 +165,14 @@
|
||||
android:layout_marginTop="@dimen/spacing_48"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_home_genre_creator_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="@dimen/spacing_20">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_home_genre_creator_title_genre"
|
||||
style="@style/Typography.Heading3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/color_3bb9f1"
|
||||
tools:text="로맨스" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_home_genre_creator_title_suffix"
|
||||
style="@style/Typography.Heading3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_recommendation_section_genre_creator_suffix"
|
||||
android:textColor="@color/white" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
<kr.co.vividnext.sodalive.v2.main.home.ui.HomePagerSnapRecyclerView
|
||||
android:id="@+id/rv_home_genre_creators"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="160dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="@dimen/spacing_20"
|
||||
android:paddingHorizontal="@dimen/spacing_14"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
<include
|
||||
android:id="@+id/view_home_genre_follow_all"
|
||||
layout="@layout/view_home_follow_all_button" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
49
app/src/main/res/layout/item_home_genre_creator_group.xml
Normal file
49
app/src/main/res/layout/item_home_genre_creator_group.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_home_genre_creator_group"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/spacing_14">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="24dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_home_genre_creator_group_title_genre"
|
||||
style="@style/Typography.Heading3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/color_3bb9f1"
|
||||
tools:text="장르" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_home_genre_creator_group_title_suffix"
|
||||
style="@style/Typography.Heading3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:includeFontPadding="false"
|
||||
android:text="@string/home_recommendation_section_genre_creator_suffix"
|
||||
android:textColor="@color/white" />
|
||||
</LinearLayout>
|
||||
|
||||
<GridLayout
|
||||
android:id="@+id/gl_home_genre_creator_profiles"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_14"
|
||||
android:columnCount="4"
|
||||
android:rowCount="2" />
|
||||
|
||||
<include
|
||||
android:id="@+id/view_home_genre_group_follow_all"
|
||||
layout="@layout/view_home_follow_all_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="@dimen/spacing_14" />
|
||||
</LinearLayout>
|
||||
38
app/src/main/res/layout/item_home_genre_creator_profile.xml
Normal file
38
app/src/main/res/layout/item_home_genre_creator_profile.xml
Normal file
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_home_genre_creator_profile"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/bg_round_corner_999_263238"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/ic_launcher_background" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_home_genre_creator_profile_nickname"
|
||||
style="@style/Typography.Body5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_6"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_home_genre_creator_profile"
|
||||
tools:text="크리에이터이름" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -248,7 +248,7 @@
|
||||
<string name="home_recommendation_section_recent_debut_creators">Recently debuted creators</string>
|
||||
<string name="home_recommendation_section_first_audio_contents">Grow together from the start!</string>
|
||||
<string name="home_recommendation_section_ai_characters">Chat with creators!</string>
|
||||
<string name="home_recommendation_section_genre_creator_suffix"> creators</string>
|
||||
<string name="home_recommendation_section_genre_creator_suffix">\u0020creators</string>
|
||||
<string name="home_recommendation_section_cheer_creators">Creators with recent cheers</string>
|
||||
<string name="home_recommendation_section_popular_community_posts">Popular community</string>
|
||||
<string name="home_recommendation_activity_live">Live</string>
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
<string name="home_recommendation_section_recent_debut_creators">최근 데뷔한 크리에이터</string>
|
||||
<string name="home_recommendation_section_first_audio_contents">처음부터 함께 성장!</string>
|
||||
<string name="home_recommendation_section_ai_characters">크리에이터와 이야기를 나눠요!</string>
|
||||
<string name="home_recommendation_section_genre_creator_suffix">의 크리에이터</string>
|
||||
<string name="home_recommendation_section_genre_creator_suffix">\u0020크리에이터</string>
|
||||
<string name="home_recommendation_section_cheer_creators">최근 응원이 많은 크리에이터</string>
|
||||
<string name="home_recommendation_section_popular_community_posts">인기 커뮤니티</string>
|
||||
<string name="home_recommendation_activity_live">라이브</string>
|
||||
|
||||
Reference in New Issue
Block a user