mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 18:03:33 +00:00
Saving play history. The tracks are saved in the db at the time of playback and every week a list of the most played tracks is generated in the home page in grid format
This commit is contained in:
parent
6a1c5d2ce3
commit
ff8bf4f6bf
14 changed files with 646 additions and 55 deletions
|
|
@ -171,6 +171,55 @@
|
|||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<!-- Grid tracks -->
|
||||
<LinearLayout
|
||||
android:id="@+id/home_grid_tracks_sector"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/grid_tracks_pre_text_view"
|
||||
style="@style/TitleMedium"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:text="Last week"
|
||||
android:textAllCaps="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/grid_tracks_text_view"
|
||||
style="@style/TitleLarge"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:text="Your top songs" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/grid_tracks_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="8dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/after_grid_divider"
|
||||
style="@style/Divider"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<!-- Favorites -->
|
||||
<LinearLayout
|
||||
android:id="@+id/starred_tracks_sector"
|
||||
|
|
|
|||
11
app/src/main/res/layout/item_home_grid_track.xml
Normal file
11
app/src/main/res/layout/item_home_grid_track.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.cappielloantonio.play.helper.recyclerview.SquareLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/track_cover_image_view"
|
||||
android:layout_width="156dp"
|
||||
android:layout_height="156dp"
|
||||
android:layout_gravity="center" />
|
||||
</com.cappielloantonio.play.helper.recyclerview.SquareLayout>
|
||||
Loading…
Add table
Add a link
Reference in a new issue