mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
feat: add functionality to delete podcast episodes and channels via bottom sheet
This commit is contained in:
parent
675ad1e9a6
commit
0248187f41
13 changed files with 336 additions and 82 deletions
|
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:clipChildren="false">
|
||||
|
||||
<!-- Header -->
|
||||
<ImageView
|
||||
android:id="@+id/podcast_cover_image_view"
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="54dp"
|
||||
android:layout_margin="2dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/podcast_title_text_view"
|
||||
style="@style/LabelMedium"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:maxLines="3"
|
||||
android:text="@string/label_placeholder"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/podcast_cover_image_view"
|
||||
app:layout_constraintTop_toTopOf="@+id/podcast_cover_image_view"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/podcast_cover_image_view"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/option_linear_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="12dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/delete_text_view"
|
||||
style="@style/LabelMedium"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:text="@string/podcast_bottom_sheet_delete" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
@ -28,27 +28,15 @@
|
|||
style="@style/LabelMedium"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:ellipsize="marquee"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:singleLine="true"
|
||||
android:text="@string/label_placeholder"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/podcast_cover_image_view"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/podcast_cover_image_view"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/podcast_artist_text_view"
|
||||
style="@style/LabelSmall"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:text="@string/label_placeholder"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/podcast_cover_image_view"
|
||||
app:layout_constraintTop_toBottomOf="@+id/podcast_title_text_view" />
|
||||
app:layout_constraintTop_toTopOf="@+id/podcast_cover_image_view" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
|
@ -73,7 +61,8 @@
|
|||
android:paddingTop="12dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:text="@string/podcast_bottom_sheet_play_next" />
|
||||
android:text="@string/podcast_bottom_sheet_play_next"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/add_to_queue_text_view"
|
||||
|
|
@ -86,7 +75,8 @@
|
|||
android:paddingTop="12dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:text="@string/podcast_bottom_sheet_add_to_queue" />
|
||||
android:text="@string/podcast_bottom_sheet_add_to_queue"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/download_text_view"
|
||||
|
|
@ -99,7 +89,8 @@
|
|||
android:paddingTop="12dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:text="@string/podcast_bottom_sheet_download" />
|
||||
android:text="@string/podcast_bottom_sheet_download"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/remove_text_view"
|
||||
|
|
@ -112,7 +103,21 @@
|
|||
android:paddingTop="12dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:text="@string/podcast_bottom_sheet_remove" />
|
||||
android:text="@string/podcast_bottom_sheet_remove"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/delete_text_view"
|
||||
style="@style/LabelMedium"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:text="@string/podcast_bottom_sheet_delete" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/go_to_channel_text_view"
|
||||
|
|
@ -124,6 +129,7 @@
|
|||
android:paddingStart="20dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:visibility="gone"
|
||||
android:paddingBottom="12dp"
|
||||
android:text="@string/podcast_bottom_sheet_go_to_channel" />
|
||||
|
||||
|
|
@ -313,8 +313,13 @@
|
|||
android:label="AlbumBottomSheetDialog"
|
||||
tools:layout="@layout/bottom_sheet_album_dialog" />
|
||||
<dialog
|
||||
android:id="@+id/podcastBottomSheetDialog"
|
||||
android:name="com.cappielloantonio.play.ui.fragment.bottomsheetdialog.PodcastBottomSheetDialog"
|
||||
android:label="PodcastBottomSheetDialog"
|
||||
tools:layout="@layout/bottom_sheet_podcast_dialog" />
|
||||
android:id="@+id/podcastEpisodeBottomSheetDialog"
|
||||
android:name="com.cappielloantonio.play.ui.fragment.bottomsheetdialog.PodcastEpisodeBottomSheetDialog"
|
||||
android:label="PodcastEpisodeBottomSheetDialog"
|
||||
tools:layout="@layout/bottom_sheet_podcast_episode_dialog" />
|
||||
<dialog
|
||||
android:id="@+id/podcastChannelBottomSheetDialog"
|
||||
android:name="com.cappielloantonio.play.ui.fragment.bottomsheetdialog.PodcastChannelBottomSheetDialog"
|
||||
android:label="PodcastChannelBottomSheetDialog"
|
||||
tools:layout="@layout/bottom_sheet_podcast_channel_dialog" />
|
||||
</navigation>
|
||||
|
|
@ -243,6 +243,7 @@
|
|||
<string name="home_title_podcast_channels">Channels</string>
|
||||
<string name="artist_adapter_radio_station_starting">Searching…</string>
|
||||
<string name="podcast_bottom_sheet_go_to_channel">Go to channel</string>
|
||||
<string name="podcast_bottom_sheet_delete">Delete</string>
|
||||
<string name="podcast_bottom_sheet_remove">Remove</string>
|
||||
<string name="podcast_bottom_sheet_download">Download</string>
|
||||
<string name="podcast_bottom_sheet_add_to_queue">Add to queue</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue