Merge pull request #40 from eddyizm/18-show-rating-on-song-view

feat: show rating on song view
This commit is contained in:
eddyizm 2025-08-14 22:08:35 -07:00 committed by GitHub
commit 06a52afa18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 63 additions and 5 deletions

View file

@ -104,6 +104,37 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/player_media_title_label" />
<LinearLayout
android:id="@+id/rating_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal"
android:gravity="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/player_artist_name_label">
<RatingBar
android:id="@+id/song_rating_bar"
style="?android:attr/ratingBarStyleIndicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:numStars="5"
android:stepSize="1"
android:rating="0"
android:isIndicator="false" />
<TextView
android:id="@+id/rating_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:textSize="12sp"
android:textColor="?attr/colorOnSurfaceVariant"
android:text=""/>
</LinearLayout>
<ToggleButton
android:id="@+id/button_favorite"
android:layout_width="26dp"
@ -136,13 +167,14 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="20dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
app:bar_height="2dp"
app:buffered_color="?attr/colorOnSecondaryContainer"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/player_artist_name_label"
app:layout_constraintTop_toBottomOf="@+id/rating_container"
app:played_color="?attr/colorOnPrimaryContainer"
app:scrubber_color="?attr/colorOnPrimaryContainer"
app:unplayed_color="?attr/colorPrimaryContainer" />