Implemented offline mode functionality

This commit is contained in:
CappielloAntonio 2021-04-26 19:17:42 +02:00
parent 658e69dcb9
commit e0569c3901
21 changed files with 635 additions and 23 deletions

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/titleTextColor"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM16.59,7.58L10,14.17l-2.59,-2.58L6,13l4,4 8,-8z"/>
</vector>

View file

@ -59,7 +59,7 @@
android:textColor="@color/titleTextColor"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@id/button_favorite"
app:layout_constraintEnd_toStartOf="@id/bottom_sheet_song_dowanload_indicator_image_view"
app:layout_constraintStart_toEndOf="@+id/song_cover_image_view"
app:layout_constraintTop_toTopOf="parent" />
@ -73,10 +73,22 @@
android:text="@string/label_placeholder"
android:textColor="@color/subtitleTextColor"
android:textSize="12sp"
app:layout_constraintEnd_toStartOf="@id/button_favorite"
app:layout_constraintEnd_toStartOf="@id/bottom_sheet_song_dowanload_indicator_image_view"
app:layout_constraintStart_toEndOf="@+id/song_cover_image_view"
app:layout_constraintTop_toBottomOf="@+id/song_title_text_view" />
<ImageView
android:id="@+id/bottom_sheet_song_dowanload_indicator_image_view"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:background="@drawable/ic_check_circle"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toStartOf="@+id/button_favorite"
android:visibility="gone"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout

View file

@ -34,7 +34,7 @@
android:scrollHorizontally="true"
android:singleLine="true"
android:text="@string/label_placeholder"
app:layout_constraintEnd_toStartOf="@+id/search_result_song_more_button"
app:layout_constraintEnd_toStartOf="@+id/search_result_dowanload_indicator_image_view"
app:layout_constraintStart_toEndOf="@+id/song_cover_image_view"
app:layout_constraintTop_toTopOf="parent" />
@ -44,7 +44,7 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingEnd="12dp"
app:layout_constraintEnd_toStartOf="@+id/search_result_song_more_button"
app:layout_constraintEnd_toStartOf="@+id/search_result_dowanload_indicator_image_view"
app:layout_constraintStart_toEndOf="@+id/song_cover_image_view"
app:layout_constraintTop_toBottomOf="@+id/search_result_song_title_text_view">
@ -74,6 +74,18 @@
android:text="@string/label_placeholder" />
</LinearLayout>
<ImageView
android:id="@+id/search_result_dowanload_indicator_image_view"
android:layout_width="18dp"
android:layout_height="18dp"
android:layout_gravity="center"
android:layout_margin="8dp"
android:background="@drawable/ic_check_circle"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/search_result_song_more_button"
app:layout_constraintTop_toTopOf="parent"
android:visibility="gone"/>
<ImageView
android:id="@+id/search_result_song_more_button"
android:layout_width="18dp"

View file

@ -36,4 +36,6 @@
<color name="chipUnelectedBackgroundColor">#FFFFFF</color>
<color name="white">#FFFFFF</color>
<color name="downloadIconColor">#77DD77</color>
</resources>

View file

@ -49,4 +49,6 @@
<string name="playing_notification_description">The playing notification provides actions for play/pause etc.</string>
<string name="playing_notification_name">Playing Notification</string>
<string name="exo_download_notification_channel_name">Downloads</string>
</resources>