Added material desing theme improvements

This commit is contained in:
h4h13 2020-05-06 03:50:15 +05:30
parent 16d256e210
commit 58e29691cb
6 changed files with 72 additions and 231 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
@ -7,14 +7,25 @@
android:clickable="true"
android:focusable="true">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface" />
<include layout="@layout/shadow_statusbar_toolbar" />
<LinearLayout
android:id="@+id/playerContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/status_bar" />
</FrameLayout>
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -24,101 +35,33 @@
android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout="@layout/fragment_album_full_cover" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/status_bar" />
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/playerToolbar"
style="@style/Toolbar"
android:layout_gravity="bottom"
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" />
</FrameLayout>
tools:layout="@layout/fragment_album_cover" />
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<FrameLayout
android:id="@+id/playerQueueSheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="bottom"
app:behavior_hideable="false"
app:layout_behavior="code.name.monkey.retromusic.CustomBottomSheetBehavior">
<fragment
android:id="@+id/playbackControlsFragment"
android:name="code.name.monkey.retromusic.fragments.player.material.MaterialControlsFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout="@layout/fragment_material_playback_controls" />
</FrameLayout>
<LinearLayout
android:id="@+id/sheetContent"
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurface"
android:orientation="vertical">
android:layout_weight="0">
<LinearLayout
android:id="@+id/playerControlsContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<fragment
android:id="@+id/playbackControlsFragment"
android:name="code.name.monkey.retromusic.fragments.player.material.MaterialControlsFragment"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="match_parent"
tools:layout="@layout/fragment_material_playback_controls" />
<LinearLayout
android:layout_weight="0"
android:id="@+id/upComing"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
app:srcCompat="@drawable/ic_shuffle_sharp_white_24dp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/player_queue_sub_header"
android:layout_width="match_parent"
android:layout_height="?attr/listPreferredItemHeightSmall"
android:background="?attr/colorSurface"
android:gravity="center_vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:text="@string/up_next"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:textColor="?android:attr/textColorSecondary" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface"
tools:listitem="@layout/item_list" />
</LinearLayout>
</LinearLayout>
</FrameLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/playerToolbar"
style="@style/Toolbar"
android:layout_gravity="bottom"
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" />
</FrameLayout>
</LinearLayout>
</FrameLayout>

View file

@ -30,10 +30,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:labelBehavior="gone"
app:layout_constraintBottom_toTopOf="@id/playPauseButton"
app:layout_constraintEnd_toStartOf="@id/songTotalTime"
app:layout_constraintStart_toEndOf="@id/songCurrentProgress"
app:layout_constraintTop_toBottomOf="@id/songInfo"
app:layout_constraintTop_toTopOf="parent"
app:thumbRadius="@dimen/slider_thumb_radius"
app:trackHeight="@dimen/slider_track_height"
tools:ignore="RtlHardcoded,UnusedAttribute"
@ -62,7 +61,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
app:layout_constraintTop_toBottomOf="@+id/progressSlider">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
@ -115,10 +114,7 @@
android:paddingEnd="16dp"
android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp"
app:layout_constraintBottom_toTopOf="@+id/progressSlider"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@+id/playPauseButton"
app:layout_constraintTop_toBottomOf="@+id/text"
tools:text="@tools:sample/lorem/random" />
@ -159,11 +155,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/roundSelector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toTopOf="@+id/volumeFragmentContainer"
app:layout_constraintEnd_toStartOf="@+id/nextButton"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/previousButton"
app:layout_constraintTop_toBottomOf="@+id/progressSlider"
app:layout_constraintTop_toBottomOf="@+id/songInfo"
app:srcCompat="@drawable/ic_pause_sharp_white_64dp"
tools:tint="@color/md_black_1000" />
@ -198,12 +194,15 @@
tools:ignore="MissingPrefix"
tools:tint="@color/md_black_1000" />
<FrameLayout
android:id="@+id/volumeFragmentContainer"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:paddingStart="8dp"
android:paddingEnd="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
tools:backgroundTint="@color/md_red_400"
tools:layout_height="52dp" />
</androidx.constraintlayout.widget.ConstraintLayout>