feat(creator): 채널 홈 후원 카드를 추가한다
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
package kr.co.vividnext.sodalive.v2.creator.channel.ui
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.graphics.Outline
|
||||||
|
import android.util.AttributeSet
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewOutlineProvider
|
||||||
|
import android.widget.LinearLayout
|
||||||
|
import kr.co.vividnext.sodalive.R
|
||||||
|
|
||||||
|
class CreatorChannelDonationCardView @JvmOverloads constructor(
|
||||||
|
context: Context,
|
||||||
|
attrs: AttributeSet? = null,
|
||||||
|
defStyleAttr: Int = 0
|
||||||
|
) : LinearLayout(context, attrs, defStyleAttr) {
|
||||||
|
|
||||||
|
init {
|
||||||
|
clipToOutline = true
|
||||||
|
outlineProvider = object : ViewOutlineProvider() {
|
||||||
|
override fun getOutline(view: View, outline: Outline) {
|
||||||
|
outline.setRoundRect(0, 0, view.width, view.height, resources.getDimension(R.dimen.radius_14))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
app/src/main/res/drawable-mdpi/ic_new_donation.png
Normal file
BIN
app/src/main/res/drawable-mdpi/ic_new_donation.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 393 B |
@@ -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="999dp" />
|
||||||
|
</shape>
|
||||||
@@ -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,56 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/black"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="@dimen/spacing_20">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/layout_donation_section_title"
|
||||||
|
layout="@layout/view_section_title" />
|
||||||
|
|
||||||
|
<HorizontalScrollView
|
||||||
|
android:id="@+id/hsv_donation_items"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/spacing_14"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
android:paddingStart="@dimen/spacing_14"
|
||||||
|
android:paddingEnd="@dimen/spacing_14"
|
||||||
|
android:scrollbars="none">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_donation_items"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal" />
|
||||||
|
</HorizontalScrollView>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/layout_donation_button"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:layout_marginHorizontal="@dimen/spacing_14"
|
||||||
|
android:layout_marginTop="@dimen/spacing_14"
|
||||||
|
android:background="@drawable/bg_creator_channel_outline_button"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:contentDescription="@null"
|
||||||
|
android:src="@drawable/ic_new_donation" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/Typography.Body2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="@dimen/spacing_6"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/creator_channel_donation_button"
|
||||||
|
android:textColor="@color/white" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<kr.co.vividnext.sodalive.v2.creator.channel.ui.CreatorChannelDonationCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/layout_donation_card"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/bg_creator_channel_donation_card"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/layout_donation_header"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="70dp"
|
||||||
|
android:padding="@dimen/spacing_14"
|
||||||
|
tools:background="#73FF01">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_donation_profile"
|
||||||
|
android:layout_width="42dp"
|
||||||
|
android:layout_height="42dp"
|
||||||
|
android:contentDescription="@null"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/ic_placeholder_profile"
|
||||||
|
tools:src="@drawable/ic_placeholder_profile" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="178dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="50dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_donation_nickname"
|
||||||
|
style="@style/Typography.Body5"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
tools:text="팬 이름" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_donation_created_at"
|
||||||
|
style="@style/Typography.Body6"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColor="@color/gray_700"
|
||||||
|
tools:text="2분 전" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="28dp"
|
||||||
|
android:layout_gravity="center_vertical|end"
|
||||||
|
android:background="@drawable/bg_creator_channel_donation_can_capsule"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingHorizontal="@dimen/spacing_6">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="18dp"
|
||||||
|
android:contentDescription="@null"
|
||||||
|
android:src="@drawable/ic_can" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_donation_can"
|
||||||
|
style="@style/Typography.Body6"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="2dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
tools:text="20캔" />
|
||||||
|
</LinearLayout>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_donation_message"
|
||||||
|
style="@style/Typography.Body3"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:paddingHorizontal="@dimen/spacing_14"
|
||||||
|
android:paddingTop="@dimen/spacing_14"
|
||||||
|
android:paddingBottom="@dimen/spacing_14"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
tools:text="팬이 후원한 글이 보이는 부분 팬이 후원한 글이 보이는 부분" />
|
||||||
|
</kr.co.vividnext.sodalive.v2.creator.channel.ui.CreatorChannelDonationCardView>
|
||||||
Reference in New Issue
Block a user