feat(home): 최근 데뷔 크리에이터 카드를 정리한다
This commit is contained in:
@@ -20,7 +20,7 @@ class HomeRecentDebutCreatorAdapter : RecyclerView.Adapter<HomeRecentDebutCreato
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): CreatorViewHolder {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_home_recent_debut_creator, parent, false)
|
||||
view.layoutParams = recyclerItemLayoutParams(parent)
|
||||
view.layoutParams = recentDebutItemLayoutParams(parent)
|
||||
return CreatorViewHolder(view)
|
||||
}
|
||||
|
||||
@@ -39,4 +39,11 @@ class HomeRecentDebutCreatorAdapter : RecyclerView.Adapter<HomeRecentDebutCreato
|
||||
nicknameText.text = item.nickname
|
||||
}
|
||||
}
|
||||
|
||||
private fun recentDebutItemLayoutParams(parent: ViewGroup): RecyclerView.LayoutParams {
|
||||
return RecyclerView.LayoutParams(
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT
|
||||
).apply { marginEnd = parent.resources.getDimensionPixelSize(R.dimen.spacing_4) }
|
||||
}
|
||||
}
|
||||
|
||||
5
app/src/main/res/drawable/bg_home_recent_debut_card.xml
Normal file
5
app/src/main/res/drawable/bg_home_recent_debut_card.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/gray_900" />
|
||||
<corners android:radius="@dimen/radius_14" />
|
||||
</shape>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:startColor="#00000000"
|
||||
android:centerColor="#00000000"
|
||||
android:centerY="0.64"
|
||||
android:endColor="#B3000000" />
|
||||
<corners android:radius="@dimen/radius_14" />
|
||||
</shape>
|
||||
@@ -1,30 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="112dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
android:layout_width="205dp"
|
||||
android:layout_height="259dp"
|
||||
android:background="@drawable/bg_home_recent_debut_card"
|
||||
android:outlineProvider="background">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_home_recent_debut_creator_profile"
|
||||
android:layout_width="88dp"
|
||||
android:layout_height="88dp"
|
||||
android:background="@drawable/bg_round_corner_999_263238"
|
||||
android:layout_width="205dp"
|
||||
android:layout_height="259dp"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerCrop"
|
||||
tools:src="@drawable/ic_launcher_background" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_home_recent_debut_dim_gradient" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_home_recent_debut_creator_nickname"
|
||||
style="@style/Typography.Body5"
|
||||
style="@style/Typography.Heading1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_8"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginHorizontal="@dimen/spacing_14"
|
||||
android:layout_marginBottom="31dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:lineSpacingMultiplier="1.45"
|
||||
android:maxLines="1"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/white"
|
||||
tools:text="신규 크리에이터" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
Reference in New Issue
Block a user