mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 09:33:33 +00:00
Edit playerBottomSheetLayout to include a PlayerControlView
This commit is contained in:
parent
2a11fedf65
commit
f9ac2f2646
7 changed files with 89 additions and 71 deletions
3
.idea/misc.xml
generated
3
.idea/misc.xml
generated
|
|
@ -16,6 +16,7 @@
|
|||
<entry key="app/src/main/res/drawable/bottom_nav_selector.xml" value="0.36203703703703705" />
|
||||
<entry key="app/src/main/res/drawable/bottom_nav_shape.xml" value="0.28055555555555556" />
|
||||
<entry key="app/src/main/res/drawable/button_favorite_selector.xml" value="0.46296296296296297" />
|
||||
<entry key="app/src/main/res/drawable/button_play_pause_selector.xml" value="0.2722222222222222" />
|
||||
<entry key="app/src/main/res/drawable/dialog_shape.xml" value="0.27685185185185185" />
|
||||
<entry key="app/src/main/res/drawable/ic_arrow_back.xml" value="0.28055555555555556" />
|
||||
<entry key="app/src/main/res/drawable/ic_bottom_sheet_down.xml" value="0.4425925925925926" />
|
||||
|
|
@ -114,7 +115,7 @@
|
|||
<entry key="app/src/main/res/layout/item_placeholder_year.xml" value="0.3229166666666667" />
|
||||
<entry key="app/src/main/res/layout/item_player_now_playing_song.xml" value="0.3229166666666667" />
|
||||
<entry key="app/src/main/res/layout/item_player_queue_song.xml" value="0.1" />
|
||||
<entry key="app/src/main/res/layout/player_body_bottom_sheet.xml" value="0.528125" />
|
||||
<entry key="app/src/main/res/layout/player_body_bottom_sheet.xml" value="0.7184241019698725" />
|
||||
<entry key="app/src/main/res/layout/player_body_new_bottom_sheet.xml" value="0.528125" />
|
||||
<entry key="app/src/main/res/layout/player_header_bottom_sheet.xml" value="0.3229166666666667" />
|
||||
<entry key="app/src/main/res/menu/bottom_nav_menu.xml" value="0.3229166666666667" />
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/titleTextColor" android:drawable="@drawable/ic_play" android:state_checked="true" />
|
||||
<item android:color="@color/titleTextColor" android:drawable="@drawable/ic_pause" android:state_checked="false" />
|
||||
<item android:color="@color/titleTextColor" android:drawable="@drawable/ic_play" android:state_checked="false" />
|
||||
<item android:color="@color/titleTextColor" android:drawable="@drawable/ic_pause" android:state_checked="true" />
|
||||
</selector>
|
||||
|
|
@ -11,6 +11,16 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.media3.ui.PlayerControlView
|
||||
android:id="@+id/player_body_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:controller_layout_id="@layout/player_body_bottom_sheet"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:show_timeout="0"/>
|
||||
|
||||
<include
|
||||
android:id="@+id/player_header_layout"
|
||||
layout="@layout/player_header_bottom_sheet"
|
||||
|
|
@ -19,14 +29,5 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<include
|
||||
android:id="@+id/player_body_layout"
|
||||
layout="@layout/player_body_bottom_sheet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</FrameLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
|
@ -65,41 +65,42 @@
|
|||
android:id="@+id/player_big_timer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/player_big_song_time_in"
|
||||
android:id="@+id/exo_position"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:paddingTop="4dp"
|
||||
android:text="@string/label_placeholder"
|
||||
android:textColor="@color/titleTextColor"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/player_big_seek_bar"
|
||||
<androidx.media3.ui.DefaultTimeBar
|
||||
android:id="@id/exo_progress"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_weight="1"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingRight="12dp"
|
||||
android:progressBackgroundTint="@color/colorAccentLight" />
|
||||
app:bar_height="2dp"
|
||||
app:buffered_color="@color/seekBarBufferedColor"
|
||||
app:played_color="@color/seekBarPlayedColor"
|
||||
app:scrubber_color="@color/seekBarPlayedColor"
|
||||
app:scrubber_dragged_size="8dp"
|
||||
app:unplayed_color="@color/seekBarUnPlayedColor" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/player_big_song_duration"
|
||||
android:id="@+id/exo_duration"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:paddingTop="4dp"
|
||||
android:text="@string/label_placeholder"
|
||||
android:textColor="@color/titleTextColor"
|
||||
android:textSize="12sp" />
|
||||
|
|
@ -185,60 +186,67 @@
|
|||
android:visibility="gone"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false">
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/player_big_previous_button"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/player_big_play_pause_button"
|
||||
app:layout_constraintEnd_toStartOf="@+id/player_big_play_pause_button"
|
||||
app:layout_constraintTop_toTopOf="@+id/player_big_play_pause_button"
|
||||
app:srcCompat="@drawable/ic_skip_previous" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/player_big_play_pause_button"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="@drawable/button_play_pause_selector"
|
||||
android:checked="true"
|
||||
android:foreground="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:text=""
|
||||
android:textOff=""
|
||||
android:textOn=""
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<ImageButton
|
||||
android:id="@+id/exo_prev"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:scaleType="fitCenter"
|
||||
app:srcCompat="@drawable/ic_skip_previous" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/player_big_next_button"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/player_big_play_pause_button"
|
||||
app:layout_constraintStart_toEndOf="@+id/player_big_play_pause_button"
|
||||
app:layout_constraintTop_toTopOf="@+id/player_big_play_pause_button"
|
||||
app:srcCompat="@drawable/ic_skip_next" />
|
||||
<ImageButton
|
||||
android:id="@id/exo_play"
|
||||
style="@style/ExoMediaButton.Play"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_play" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@id/exo_pause"
|
||||
style="@style/ExoMediaButton.Pause"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_pause" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/exo_next"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:scaleType="fitCenter"
|
||||
app:srcCompat="@drawable/ic_skip_next" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/player_divider_bottom"
|
||||
style="@style/Divider"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="18dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/player_big_play_pause_button" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
android:layout_marginEnd="18dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:background="@drawable/button_play_pause_selector"
|
||||
android:checked="true"
|
||||
android:checked="false"
|
||||
android:foreground="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:text=""
|
||||
android:textOff=""
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
app:layout_constraintEnd_toStartOf="@+id/player_header_next_song_button"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
<ImageButton
|
||||
android:id="@+id/player_header_next_song_button"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
|
|
|
|||
|
|
@ -36,5 +36,9 @@
|
|||
<color name="starBackgroundTintColor">#1D1D1D</color>
|
||||
|
||||
<color name="placeholderColor">#1D1D1D</color>
|
||||
|
||||
<color name="seekBarPlayedColor">#7C00BB</color>
|
||||
<color name="seekBarUnPlayedColor">#4C2A5D</color>
|
||||
<color name="seekBarBufferedColor">#533364</color>
|
||||
</resources>
|
||||
|
||||
|
|
|
|||
|
|
@ -42,5 +42,9 @@
|
|||
|
||||
<color name="placeholderColor">#F1F3F4</color>
|
||||
|
||||
<color name="seekBarPlayedColor">#4B0089</color>
|
||||
<color name="seekBarUnPlayedColor">#D8C0E1</color>
|
||||
<color name="seekBarBufferedColor">#CCAED7</color>
|
||||
|
||||
<!-- <color name="iconLauncher">https://icon.kitchen/i/H4sIAAAAAAAAAzWQu27DMAxF%2F4VdPbhBsmTt0LVAuxVFIUuUIoAWDT36gJF%2Fz5WCcJCow8uXdvox0rjQeScfXiRuJtf%2BKIyLHHvTpNJE0WoCEE7le5GW6TrREj7%2BNwYN2bjIqevA%2BK%2B2DLxTfbi0ajHR3pNeH2oorIrmZwiejmaevUeFgQ4dzcOATAqCKscT8jFlF%2FS4H4a4D2%2FGuZjCaKobnQ%2BniXIMFzTp7qK16nr3hf2gY5b3ixkb2JgtWoCt6pr0D%2FlEW5c1ur69Fpy%2FvNDX9QZCITMSMwEAAA%3D%3D</color> -->
|
||||
</resources>
|
||||
Loading…
Add table
Add a link
Reference in a new issue