feat(widget): 라이브 썸네일 컴포넌트를 추가한다
This commit is contained in:
BIN
app/src/main/res/drawable-mdpi/ic_chat_message_count.png
Normal file
BIN
app/src/main/res/drawable-mdpi/ic_chat_message_count.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 294 B |
9
app/src/main/res/drawable/bg_live_thumbnail_badge.xml
Normal file
9
app/src/main/res/drawable/bg_live_thumbnail_badge.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/black" />
|
||||
<stroke
|
||||
android:width="2dp"
|
||||
android:color="@color/color_62cfff" />
|
||||
<corners android:radius="100dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/black" />
|
||||
<corners android:radius="100dp" />
|
||||
</shape>
|
||||
9
app/src/main/res/drawable/bg_live_thumbnail_detail.xml
Normal file
9
app/src/main/res/drawable/bg_live_thumbnail_detail.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/gray_900" />
|
||||
<stroke
|
||||
android:width="2dp"
|
||||
android:color="@color/color_62cfff" />
|
||||
<corners android:radius="90dp" />
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/bg_live_thumbnail_dot.xml
Normal file
5
app/src/main/res/drawable/bg_live_thumbnail_dot.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="@color/color_ea3a25" />
|
||||
</shape>
|
||||
8
app/src/main/res/drawable/bg_live_thumbnail_ring.xml
Normal file
8
app/src/main/res/drawable/bg_live_thumbnail_ring.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="@android:color/transparent" />
|
||||
<stroke
|
||||
android:width="2dp"
|
||||
android:color="@color/color_62cfff" />
|
||||
</shape>
|
||||
100
app/src/main/res/layout/view_live_thumbnail_detail.xml
Normal file
100
app/src/main/res/layout/view_live_thumbnail_detail.xml
Normal file
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<kr.co.vividnext.sodalive.v2.widget.livethumbnail.LiveThumbnailDetailView 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="266dp"
|
||||
android:layout_height="99dp"
|
||||
android:background="@drawable/bg_live_thumbnail_detail"
|
||||
android:clipToOutline="true">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_live_thumbnail_image"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="75dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/ic_launcher_background" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_live_thumbnail_text_container"
|
||||
android:layout_width="149dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="93dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="18dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="18dp"
|
||||
android:background="@drawable/bg_live_thumbnail_badge_capsule"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="@dimen/spacing_4">
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/spacing_8"
|
||||
android:layout_height="@dimen/spacing_8"
|
||||
android:background="@drawable/bg_live_thumbnail_dot" />
|
||||
|
||||
<TextView
|
||||
style="@style/Typography.Caption3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_4"
|
||||
android:includeFontPadding="true"
|
||||
android:text="LIVE"
|
||||
android:textColor="@color/white"
|
||||
tools:ignore="HardcodedText,SmallSp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_live_thumbnail_start_time"
|
||||
style="@style/Typography.Body6"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_8"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/gray_500"
|
||||
tools:text="00:00" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_live_thumbnail_title"
|
||||
style="@style/Typography.Heading4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_4"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
tools:text="라이브 제목" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_live_thumbnail_creator"
|
||||
style="@style/Typography.Body6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_4"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/gray_500"
|
||||
tools:text="크리에이터이름" />
|
||||
</LinearLayout>
|
||||
</kr.co.vividnext.sodalive.v2.widget.livethumbnail.LiveThumbnailDetailView>
|
||||
66
app/src/main/res/layout/view_live_thumbnail_simple.xml
Normal file
66
app/src/main/res/layout/view_live_thumbnail_simple.xml
Normal file
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<kr.co.vividnext.sodalive.v2.widget.livethumbnail.LiveThumbnailSimpleView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="76dp">
|
||||
|
||||
<View
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:background="@drawable/bg_live_thumbnail_ring" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_live_thumbnail_image"
|
||||
android:layout_width="58dp"
|
||||
android:layout_height="58dp"
|
||||
android:layout_marginStart="@dimen/spacing_6"
|
||||
android:layout_marginTop="@dimen/spacing_6"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerCrop"
|
||||
tools:src="@drawable/ic_launcher_background" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="18dp"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:background="@drawable/bg_live_thumbnail_badge"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="@dimen/spacing_8">
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/spacing_8"
|
||||
android:layout_height="@dimen/spacing_8"
|
||||
android:background="@drawable/bg_live_thumbnail_dot" />
|
||||
|
||||
<TextView
|
||||
style="@style/Typography.Caption3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_4"
|
||||
android:includeFontPadding="true"
|
||||
android:text="LIVE"
|
||||
android:textColor="@color/white"
|
||||
tools:ignore="HardcodedText,SmallSp" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_live_thumbnail_creator"
|
||||
style="@style/Typography.Body5"
|
||||
android:layout_width="70dp"
|
||||
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"
|
||||
tools:text="크리에이터이름" />
|
||||
</kr.co.vividnext.sodalive.v2.widget.livethumbnail.LiveThumbnailSimpleView>
|
||||
@@ -87,6 +87,7 @@
|
||||
<color name="color_59548f">#59548F</color>
|
||||
<color name="color_ffcb14">#FFCB14</color>
|
||||
<color name="color_4d6aa4">#4D6AA4</color>
|
||||
<color name="color_62cfff">#62CFFF</color>
|
||||
<color name="color_2d7390">#2D7390</color>
|
||||
<color name="color_548f7d">#548F7D</color>
|
||||
<color name="color_cc979797">#CC979797</color>
|
||||
|
||||
Reference in New Issue
Block a user