From 684c08ee131a2fbe485cf9665aa1dd8e00af195f Mon Sep 17 00:00:00 2001 From: FongMi Date: Tue, 18 Apr 2023 23:20:55 +0800 Subject: [PATCH] [mobile] support live - part 2 --- app/src/mobile/res/color/channel.xml | 6 ++++++ app/src/mobile/res/color/group.xml | 1 + .../mobile/res/drawable/selector_channel.xml | 4 ---- app/src/mobile/res/drawable/shape_channel.xml | 19 +++++++++---------- app/src/mobile/res/drawable/shape_group.xml | 10 ++++++++++ app/src/mobile/res/layout/activity_live.xml | 12 ++++++++++++ app/src/mobile/res/layout/adapter_channel.xml | 16 ++++++++++------ app/src/mobile/res/layout/adapter_group.xml | 16 ++++++++++------ 8 files changed, 58 insertions(+), 26 deletions(-) create mode 100644 app/src/mobile/res/color/channel.xml delete mode 100644 app/src/mobile/res/drawable/selector_channel.xml create mode 100644 app/src/mobile/res/drawable/shape_group.xml diff --git a/app/src/mobile/res/color/channel.xml b/app/src/mobile/res/color/channel.xml new file mode 100644 index 000000000..1d23cc3b8 --- /dev/null +++ b/app/src/mobile/res/color/channel.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/mobile/res/color/group.xml b/app/src/mobile/res/color/group.xml index 8e39ee992..6be396f57 100644 --- a/app/src/mobile/res/color/group.xml +++ b/app/src/mobile/res/color/group.xml @@ -1,5 +1,6 @@ + \ No newline at end of file diff --git a/app/src/mobile/res/drawable/selector_channel.xml b/app/src/mobile/res/drawable/selector_channel.xml deleted file mode 100644 index 573186658..000000000 --- a/app/src/mobile/res/drawable/selector_channel.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/app/src/mobile/res/drawable/shape_channel.xml b/app/src/mobile/res/drawable/shape_channel.xml index dcc9b23dc..1a5d3149b 100644 --- a/app/src/mobile/res/drawable/shape_channel.xml +++ b/app/src/mobile/res/drawable/shape_channel.xml @@ -1,11 +1,10 @@ - - - - - - - \ No newline at end of file + + + + + + + + \ No newline at end of file diff --git a/app/src/mobile/res/drawable/shape_group.xml b/app/src/mobile/res/drawable/shape_group.xml new file mode 100644 index 000000000..7560a6c4e --- /dev/null +++ b/app/src/mobile/res/drawable/shape_group.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/mobile/res/layout/activity_live.xml b/app/src/mobile/res/layout/activity_live.xml index 66a8d918d..b3fac39f7 100644 --- a/app/src/mobile/res/layout/activity_live.xml +++ b/app/src/mobile/res/layout/activity_live.xml @@ -64,6 +64,12 @@ android:id="@+id/group" android:layout_width="120dp" android:layout_height="match_parent" + android:clipChildren="false" + android:clipToPadding="false" + android:paddingStart="8dp" + android:paddingTop="8dp" + android:paddingEnd="8dp" + android:paddingBottom="8dp" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" tools:itemCount="5" tools:listitem="@layout/adapter_group" /> @@ -77,6 +83,12 @@ android:id="@+id/channel" android:layout_width="260dp" android:layout_height="match_parent" + android:clipChildren="false" + android:clipToPadding="false" + android:paddingStart="8dp" + android:paddingTop="8dp" + android:paddingEnd="8dp" + android:paddingBottom="8dp" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" tools:itemCount="5" tools:listitem="@layout/adapter_channel" /> diff --git a/app/src/mobile/res/layout/adapter_channel.xml b/app/src/mobile/res/layout/adapter_channel.xml index 380110e14..d46dd8ddc 100644 --- a/app/src/mobile/res/layout/adapter_channel.xml +++ b/app/src/mobile/res/layout/adapter_channel.xml @@ -2,12 +2,16 @@ + android:paddingStart="12dp" + android:paddingTop="8dp" + android:paddingEnd="12dp" + android:paddingBottom="8dp"> @@ -34,7 +38,7 @@ android:duplicateParentState="true" android:ellipsize="marquee" android:singleLine="true" - android:textColor="@color/white" + android:textColor="@color/channel" android:textSize="14sp" tools:text="CNN" /> diff --git a/app/src/mobile/res/layout/adapter_group.xml b/app/src/mobile/res/layout/adapter_group.xml index a39335d88..d54ddbe09 100644 --- a/app/src/mobile/res/layout/adapter_group.xml +++ b/app/src/mobile/res/layout/adapter_group.xml @@ -2,20 +2,24 @@ + android:paddingStart="12dp" + android:paddingTop="8dp" + android:paddingEnd="12dp" + android:paddingBottom="8dp"> + android:visibility="gone" />