feat: added ui for radio stations and podcast channels existence check

This commit is contained in:
antonio 2023-06-04 18:37:53 +02:00
parent ff1fb78d4a
commit a57487d38d
8 changed files with 589 additions and 85 deletions

View file

@ -1,95 +1,163 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="match_parent">
<LinearLayout
<androidx.core.widget.NestedScrollView
android:id="@+id/home_podcast_sector"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/global_padding_bottom">
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:id="@+id/home_podcast_channels_sector"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="8dp">
android:paddingBottom="@dimen/global_padding_bottom">
<!-- Label and button -->
<LinearLayout
android:id="@+id/home_podcast_channels_sector"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:orientation="vertical"
android:paddingBottom="8dp">
<!-- Label and button -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
style="@style/TitleLarge"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingStart="16dp"
android:paddingTop="16dp"
android:paddingEnd="16dp"
android:text="@string/home_title_podcast_channels" />
<TextView
android:id="@+id/podcast_channels_text_view_clickable"
style="@style/TitleMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="8dp"
android:paddingTop="12dp"
android:paddingEnd="16dp"
android:text="@string/home_title_podcast_channels_see_all_button" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/podcast_channels_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:clipToPadding="false"
android:nestedScrollingEnabled="false"
android:paddingTop="8dp"
android:paddingBottom="8dp" />
</LinearLayout>
<View
android:id="@+id/upper_button_divider"
style="@style/Divider"
android:layout_marginHorizontal="16dp" />
<LinearLayout
android:id="@+id/home_newest_podcasts_sector"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
style="@style/TitleLarge"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginBottom="8dp"
android:paddingStart="16dp"
android:paddingTop="16dp"
android:paddingEnd="16dp"
android:text="@string/home_title_podcast_channels" />
android:text="@string/home_title_newest_podcasts" />
<TextView
android:id="@+id/podcast_channels_text_view_clickable"
style="@style/TitleMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="8dp"
android:paddingTop="12dp"
android:paddingEnd="16dp"
android:text="@string/home_title_podcast_channels_see_all_button" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/newest_podcasts_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:clipToPadding="false"
android:nestedScrollingEnabled="false"
android:paddingTop="8dp" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/podcast_channels_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:clipToPadding="false"
android:nestedScrollingEnabled="false"
android:paddingTop="8dp"
android:paddingBottom="8dp" />
<include
android:id="@+id/podcast_episodes_placeholder"
layout="@layout/item_placeholder_horizontal"
android:visibility="gone" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<LinearLayout
android:id="@+id/empty_podcast_layout"
android:layout_width="match_parent"
android:layout_height="0dp"
android:gravity="center"
android:orientation="vertical"
android:paddingBottom="@dimen/global_padding_bottom"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/empty_description_image_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:maxWidth="240dp"
android:maxHeight="240dp"
android:scaleType="centerInside"
android:src="@drawable/ui_empty_podcast" />
<TextView
android:id="@+id/title_empty_description_label"
style="@style/LabelMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="12dp"
android:text="@string/podcast_info_empty_title" />
<TextView
android:id="@+id/subtitle_empty_description_label"
style="@style/LabelSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="56dp"
android:paddingEnd="56dp"
android:text="@string/podcast_info_empty_subtitle" />
<View
android:id="@+id/upper_button_divider"
style="@style/Divider"
android:layout_marginHorizontal="16dp" />
android:layout_width="64dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp" />
<LinearLayout
android:id="@+id/home_newest_podcasts_sector"
<TextView
android:id="@+id/hide_section_button"
style="@style/LabelMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
style="@style/TitleLarge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:paddingStart="16dp"
android:paddingTop="16dp"
android:paddingEnd="16dp"
android:text="@string/home_title_newest_podcasts" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/newest_podcasts_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:clipToPadding="false"
android:nestedScrollingEnabled="false"
android:paddingTop="8dp" />
</LinearLayout>
<include
android:id="@+id/podcast_episodes_placeholder"
layout="@layout/item_placeholder_horizontal"
android:visibility="gone" />
android:background="?attr/selectableItemBackground"
android:gravity="center"
android:text="@string/podcast_info_empty_button" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -1,18 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="match_parent">
<LinearLayout
<androidx.core.widget.NestedScrollView
android:id="@+id/home_radio_station_sector"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:id="@+id/internet_radio_station_sector"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/global_padding_bottom">
@ -45,13 +48,64 @@
android:paddingTop="8dp"
android:paddingBottom="8dp" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<include
android:id="@+id/internet_radio_station_placeholder"
layout="@layout/item_placeholder_horizontal"
android:visibility="gone" />
<LinearLayout
android:id="@+id/empty_radio_station_layout"
android:layout_width="match_parent"
android:layout_height="0dp"
android:gravity="center"
android:orientation="vertical"
android:paddingBottom="@dimen/global_padding_bottom"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/empty_description_image_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:maxWidth="240dp"
android:maxHeight="240dp"
android:scaleType="centerInside"
android:src="@drawable/ui_empty_radio_station" />
<TextView
android:id="@+id/title_empty_description_label"
style="@style/LabelMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="12dp"
android:text="@string/radio_station_info_empty_title" />
<TextView
android:id="@+id/subtitle_empty_description_label"
style="@style/LabelSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="56dp"
android:paddingEnd="56dp"
android:text="@string/radio_station_info_empty_subtitle" />
<View
style="@style/Divider"
android:layout_width="64dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp" />
<TextView
android:id="@+id/hide_section_button"
style="@style/LabelMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:gravity="center"
android:text="@string/radio_station_info_empty_button" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>