Improved alignments & Add classic player'

This commit is contained in:
Hemanth S 2020-05-06 19:49:16 +05:30
parent 21d59f0274
commit c3c5f7e829
14 changed files with 217 additions and 190 deletions

View file

@ -54,14 +54,17 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<code.name.monkey.retromusic.views.WidthFitSquareCardView
<com.google.android.material.card.MaterialCardView
android:id="@+id/albumCoverContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:transitionName="@string/transition_album_art"
app:cardCornerRadius="24dp"
app:cardElevation="8dp"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
@ -73,8 +76,7 @@
android:scaleType="centerCrop"
tools:srcCompat="@tools:sample/backgrounds/scenic[5]" />
</code.name.monkey.retromusic.views.WidthFitSquareCardView>
</com.google.android.material.card.MaterialCardView>
<code.name.monkey.retromusic.views.RetroShapeableImageView
android:id="@+id/artistImage"
@ -88,7 +90,7 @@
app:retroCornerSize="26dp"
tools:srcCompat="@tools:sample/backgrounds/scenic[11]" />
<com.google.android.material.textview.MaterialTextView
<code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@+id/albumTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
@ -105,7 +107,7 @@
tools:ignore="MissingPrefix"
tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView
<code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@+id/albumText"
android:layout_width="0dp"
android:layout_height="wrap_content"
@ -119,6 +121,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/artistImage"
app:layout_constraintTop_toBottomOf="@id/albumTitle"
app:lineHeightHint="24sp"
tools:ignore="MissingPrefix"
tools:text="@tools:sample/lorem/random" />

View file

@ -10,7 +10,7 @@
android:id="@+id/playAction"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="4dp"
android:text="@string/action_play_all"
android:textColor="?android:attr/textColorPrimary"
@ -26,7 +26,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginEnd="8dp"
android:layout_marginEnd="16dp"
android:text="@string/shuffle"
android:textColor="?android:attr/textColorPrimary"
app:backgroundTint="?attr/colorSurface"

View file

@ -10,7 +10,7 @@
android:id="@+id/playAction"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="4dp"
android:text="@string/action_play_all"
app:backgroundTint="?attr/colorSurface"
@ -25,7 +25,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_marginEnd="16dp"
android:text="@string/shuffle"
app:backgroundTint="?attr/colorSurface"
app:icon="@drawable/ic_shuffle_white_24dp"
@ -39,7 +39,7 @@
android:id="@+id/albumTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:padding="12dp"
android:padding="16dp"
android:text="@string/albums"
android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold"

View file

@ -54,14 +54,17 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<code.name.monkey.retromusic.views.WidthFitSquareCardView
<com.google.android.material.card.MaterialCardView
android:id="@+id/artistCoverContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:transitionName="@string/transition_artist_image"
app:cardCornerRadius="24dp"
app:cardElevation="8dp"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
@ -73,10 +76,10 @@
android:scaleType="centerCrop"
tools:srcCompat="@tools:sample/backgrounds/scenic[16]" />
</code.name.monkey.retromusic.views.WidthFitSquareCardView>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.textview.MaterialTextView
<code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@+id/artistTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
@ -93,7 +96,7 @@
tools:ignore="MissingPrefix"
tools:text="Title" />
<com.google.android.material.textview.MaterialTextView
<code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@+id/text"
android:layout_width="0dp"
android:layout_height="wrap_content"

View file

@ -18,8 +18,8 @@
</FrameLayout>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:id="@+id/mainContent"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
@ -35,8 +35,10 @@
android:id="@+id/toolbarContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="8dp"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
app:cardUseCompatPadding="true"
app:cardCornerRadius="8dp"
app:layout_scrollFlags="scroll|enterAlways">
<FrameLayout
@ -49,8 +51,8 @@
android:layout_height="@dimen/toolbar_height"
android:background="?attr/colorSurface"
app:popupTheme="?attr/toolbarPopupTheme"
app:titleTextColor="?attr/colorControlNormal"
app:titleTextAppearance="@style/TextViewHeadline6"
app:titleTextColor="?attr/colorControlNormal"
tools:ignore="UnusedAttribute">
<com.google.android.material.textview.MaterialTextView
@ -59,8 +61,8 @@
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/app_name"
android:textColor="?attr/colorControlNormal"
android:textAppearance="@style/TextViewHeadline6" />
android:textAppearance="@style/TextViewHeadline6"
android:textColor="?attr/colorControlNormal" />
</androidx.appcompat.widget.Toolbar>
<ViewStub

View file

@ -7,7 +7,6 @@
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="vertical"
android:paddingBottom="12dp"
tools:ignore="MissingPrefix">
@ -159,6 +158,7 @@
android:id="@+id/playPauseButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:background="?attr/roundSelector"
app:layout_constraintBottom_toTopOf="@+id/volumeFragmentContainer"
app:layout_constraintEnd_toStartOf="@+id/nextButton"

View file

@ -18,15 +18,14 @@
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="8dp"
android:paddingEnd="8dp">
>
<com.google.android.material.button.MaterialButton
android:id="@+id/playAction"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="2dp"
android:layout_weight="1"
android:text="@string/action_play_all"
app:backgroundTint="?attr/colorSurface"
@ -36,8 +35,8 @@
android:id="@+id/shuffleAction"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="2dp"
android:layout_weight="1"
android:text="@string/shuffle"
app:backgroundTint="?attr/colorSurface"