Fix text alignment

This commit is contained in:
h4h13 2019-10-02 22:04:39 +05:30
parent 612e58ee87
commit 034767dfda
14 changed files with 256 additions and 292 deletions

View file

@ -13,8 +13,8 @@ android {
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
applicationId "code.name.monkey.retromusic" applicationId "code.name.monkey.retromusic"
versionCode 376 versionCode 377
versionName '3.4.100-beta02' versionName '3.4.200-beta03'
multiDexEnabled true multiDexEnabled true

View file

@ -53,6 +53,11 @@ class ClassicPlayerPlaybackControlsFragment : AbsPlayerControlsFragment() {
updateShuffleState() updateShuffleState()
updatePrevNextColor() updatePrevNextColor()
updateProgressTextColor() updateProgressTextColor()
val fabColor = Color.WHITE
TintHelper.setTintAuto(playerPlayPauseFab, fabColor, true)
TintHelper.setTintAuto(playerPlayPauseFab, MaterialValueHelper.getPrimaryTextColor(requireContext(), ColorUtil.isColorLight(fabColor)), false)
} }
@ -63,7 +68,7 @@ class ClassicPlayerPlaybackControlsFragment : AbsPlayerControlsFragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return inflater.inflate(code.name.monkey.retromusic.R.layout.fragment_classic_player_playback_controls, container, false) return inflater.inflate(R.layout.fragment_classic_player_playback_controls, container, false)
} }
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
@ -103,10 +108,6 @@ class ClassicPlayerPlaybackControlsFragment : AbsPlayerControlsFragment() {
} }
private fun setUpPlayPauseFab() { private fun setUpPlayPauseFab() {
val fabColor = Color.WHITE
TintHelper.setTintAuto(playerPlayPauseFab, fabColor, true)
playerPlayPauseFab.setColorFilter(MaterialValueHelper.getPrimaryTextColor(context, ColorUtil.isColorLight(fabColor)), PorterDuff.Mode.SRC_IN)
playerPlayPauseFab.setOnClickListener(PlayPauseButtonOnClickHandler()) playerPlayPauseFab.setOnClickListener(PlayPauseButtonOnClickHandler())
playerPlayPauseFab.post { playerPlayPauseFab.post {
if (playerPlayPauseFab != null) { if (playerPlayPauseFab != null) {

View file

@ -65,7 +65,7 @@
android:marqueeRepeatLimit="marquee_forever" android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true" android:scrollHorizontally="true"
android:singleLine="true" android:singleLine="true"
android:textSize="24sp" android:textAppearance="@style/TextViewHeadline5"
android:textStyle="bold" android:textStyle="bold"
tools:ignore="MissingPrefix" tools:ignore="MissingPrefix"
tools:text="Title" /> tools:text="Title" />
@ -76,6 +76,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="1" android:maxLines="1"
android:paddingTop="8dp"
tools:text="Text" /> tools:text="Text" />
</LinearLayout> </LinearLayout>

View file

@ -75,55 +75,46 @@
tools:text="00:22" /> tools:text="00:22" />
</RelativeLayout> </RelativeLayout>
<LinearLayout <com.google.android.material.textview.MaterialTextView
android:id="@id/titleContainer" android:id="@+id/title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:layout_gravity="center"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
app:layout_constraintBottom_toTopOf="@+id/text"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressContainer"
tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:textAppearance="@style/TextViewBody2"
app:layout_constraintBottom_toTopOf="@+id/playerMediaControllerContainer" app:layout_constraintBottom_toTopOf="@+id/playerMediaControllerContainer"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressContainer"> app:layout_constraintTop_toBottomOf="@+id/title"
tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewHeadline6"
tools:text="@string/bug_report_summary" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:paddingStart="16dp"
android:paddingTop="24dp"
android:paddingEnd="16dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewNormal"
android:textColor="?colorOnSecondary"
tools:text="@string/bug_report_summary" />
</LinearLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/playerMediaControllerContainer" android:id="@+id/playerMediaControllerContainer"
@ -136,7 +127,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/titleContainer" app:layout_constraintTop_toBottomOf="@+id/text"
tools:ignore="ContentDescription,UnusedAttribute" tools:ignore="ContentDescription,UnusedAttribute"
tools:showIn="@layout/fragment_player_playback_controls"> tools:showIn="@layout/fragment_player_playback_controls">

View file

@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/playback_controls" android:id="@+id/playback_controls"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true"
android:orientation="vertical" android:orientation="vertical"
@ -54,7 +54,6 @@
android:id="@+id/volumeFragmentContainer" android:id="@+id/volumeFragmentContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0"
android:paddingStart="8dp" android:paddingStart="8dp"
android:paddingEnd="8dp" /> android:paddingEnd="8dp" />

View file

@ -99,7 +99,7 @@
android:name="code.name.monkey.retromusic.fragments.player.color.ColorPlaybackControlsFragment" android:name="code.name.monkey.retromusic.fragments.player.color.ColorPlaybackControlsFragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:layout="@layout/fragment_player_playback_controls" /> tools:layout="@layout/fragment_color_player_playback_controls" />
</FrameLayout> </FrameLayout>
<FrameLayout <FrameLayout

View file

@ -58,48 +58,47 @@
tools:progress="20" /> tools:progress="20" />
</RelativeLayout> </RelativeLayout>
<LinearLayout <com.google.android.material.textview.MaterialTextView
android:id="@id/titleContainer" android:id="@+id/title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:layout_gravity="center"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
app:layout_constraintBottom_toTopOf="@+id/text"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressContainer"
tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:textAppearance="@style/TextViewBody2"
app:layout_constraintBottom_toTopOf="@+id/playerMediaControllerContainer" app:layout_constraintBottom_toTopOf="@+id/playerMediaControllerContainer"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressContainer"> app:layout_constraintTop_toBottomOf="@+id/title"
tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:textAppearance="@style/TextViewBody2"
tools:text="@tools:sample/lorem/random" />
</LinearLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/playerMediaControllerContainer" android:id="@+id/playerMediaControllerContainer"
@ -112,7 +111,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/titleContainer" app:layout_constraintTop_toBottomOf="@+id/text"
tools:ignore="ContentDescription,UnusedAttribute" tools:ignore="ContentDescription,UnusedAttribute"
tools:showIn="@layout/fragment_player_playback_controls"> tools:showIn="@layout/fragment_player_playback_controls">

View file

@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/playback_controls" android:id="@+id/playback_controls"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="vertical" android:orientation="vertical"
tools:ignore="MissingPrefix"> tools:ignore="MissingPrefix">
@ -80,12 +80,13 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginTop="4dp"
android:ellipsize="end" android:ellipsize="end"
android:gravity="center" android:gravity="center"
android:maxLines="1" android:maxLines="1"
android:paddingStart="16dp" android:paddingStart="24dp"
android:paddingEnd="16dp" android:paddingTop="12dp"
android:paddingEnd="24dp"
android:textAppearance="@style/TextViewBody2"
tools:text="@tools:sample/lorem/random" /> tools:text="@tools:sample/lorem/random" />
</LinearLayout> </LinearLayout>

View file

@ -56,52 +56,53 @@
tools:progress="20" /> tools:progress="20" />
</RelativeLayout> </RelativeLayout>
<LinearLayout
android:id="@id/titleContainer" <com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent" android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:layout_marginStart="16dp"
android:paddingStart="16dp" android:layout_marginEnd="16dp"
android:paddingEnd="16dp" android:background="@color/md_red_500"
android:ellipsize="end"
android:fontFeatureSettings="smcp"
android:letterSpacing="0.1"
android:maxLines="1"
android:padding="4dp"
android:textAllCaps="true"
android:textAppearance="@style/TextViewBody2"
android:textSize="12sp"
android:textStyle="bold"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toTopOf="@+id/title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressContainer"
tools:text="@tools:sample/full_names" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:background="@color/md_red_500"
android:ellipsize="end"
android:fontFeatureSettings="smcp"
android:letterSpacing="0.2"
android:maxLines="1"
android:padding="4dp"
android:textAllCaps="true"
android:textStyle="bold"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toTopOf="@+id/playerMediaControllerContainer" app:layout_constraintBottom_toTopOf="@+id/playerMediaControllerContainer"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressContainer"> app:layout_constraintTop_toBottomOf="@+id/text"
tools:text="@tools:sample/full_names" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/md_red_500"
android:ellipsize="end"
android:fontFeatureSettings="smcp"
android:letterSpacing="0.1"
android:maxLines="1"
android:padding="4dp"
android:textAllCaps="true"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:textSize="12sp"
android:textStyle="bold"
tools:text="Title" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:background="@color/md_red_500"
android:ellipsize="end"
android:fontFeatureSettings="smcp"
android:letterSpacing="0.2"
android:maxLines="1"
android:padding="4dp"
android:textAllCaps="true"
android:textColor="?android:attr/textColorPrimary"
android:textStyle="bold"
tools:text="Title" />
</LinearLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/playerMediaControllerContainer" android:id="@+id/playerMediaControllerContainer"
@ -114,7 +115,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/titleContainer" app:layout_constraintTop_toBottomOf="@+id/title"
tools:ignore="ContentDescription,UnusedAttribute" tools:ignore="ContentDescription,UnusedAttribute"
tools:showIn="@layout/fragment_player_playback_controls"> tools:showIn="@layout/fragment_player_playback_controls">

View file

@ -25,7 +25,6 @@
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/title" android:id="@+id/title"
style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="marquee" android:ellipsize="marquee"
@ -34,6 +33,7 @@
android:paddingStart="8dp" android:paddingStart="8dp"
android:paddingEnd="8dp" android:paddingEnd="8dp"
android:singleLine="true" android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
android:textColor="@color/md_white_1000" android:textColor="@color/md_white_1000"
app:layout_constraintEnd_toStartOf="@+id/songFavourite" app:layout_constraintEnd_toStartOf="@+id/songFavourite"
app:layout_constraintStart_toEndOf="@+id/playerMenu" app:layout_constraintStart_toEndOf="@+id/playerMenu"
@ -49,6 +49,7 @@
android:gravity="center" android:gravity="center"
android:maxLines="1" android:maxLines="1"
android:paddingStart="8dp" android:paddingStart="8dp"
android:paddingTop="12dp"
android:paddingEnd="8dp" android:paddingEnd="8dp"
android:textColor="@color/md_white_1000" android:textColor="@color/md_white_1000"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"

View file

@ -62,49 +62,46 @@
tools:progress="20" /> tools:progress="20" />
</RelativeLayout> </RelativeLayout>
<LinearLayout <com.google.android.material.textview.MaterialTextView
android:id="@id/titleContainer" android:id="@+id/title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:layout_gravity="center"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
app:layout_constraintBottom_toTopOf="@+id/text"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressContainer"
tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:textAppearance="@style/TextViewBody2"
app:layout_constraintBottom_toTopOf="@+id/playerMediaControllerContainer" app:layout_constraintBottom_toTopOf="@+id/playerMediaControllerContainer"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressContainer"> app:layout_constraintTop_toBottomOf="@+id/title"
tools:text="@tools:sample/lorem/random" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="?android:attr/textColorPrimary"
tools:text="Title" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:paddingStart="12dp"
android:paddingTop="24dp"
android:paddingEnd="12dp"
android:textColor="?android:attr/textColorSecondary" />
</LinearLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/playerMediaControllerContainer" android:id="@+id/playerMediaControllerContainer"
@ -117,7 +114,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/titleContainer" app:layout_constraintTop_toBottomOf="@+id/text"
tools:ignore="ContentDescription,UnusedAttribute" tools:ignore="ContentDescription,UnusedAttribute"
tools:showIn="@layout/fragment_player_playback_controls"> tools:showIn="@layout/fragment_player_playback_controls">

View file

@ -40,7 +40,7 @@
android:marqueeRepeatLimit="marquee_forever" android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true" android:scrollHorizontally="true"
android:singleLine="true" android:singleLine="true"
android:textSize="22sp" android:textAppearance="@style/TextViewHeadline5"
android:textStyle="bold" android:textStyle="bold"
tools:ignore="MissingPrefix" tools:ignore="MissingPrefix"
tools:text="Title" /> tools:text="Title" />
@ -50,6 +50,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end" android:ellipsize="end"
android:paddingTop="8dp"
android:maxLines="1" android:maxLines="1"
android:textColor="?colorOnBackground" android:textColor="?colorOnBackground"
tools:text="Text" /> tools:text="Text" />

View file

@ -62,48 +62,49 @@
tools:text="00:22" /> tools:text="00:22" />
</RelativeLayout> </RelativeLayout>
<LinearLayout
android:id="@id/titleContainer" <com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:layout_gravity="center"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
android:textColor="?android:attr/textColorPrimary"
app:layout_constraintBottom_toTopOf="@+id/text"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressContainer"
tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:padding="16dp"
android:textAppearance="@style/TextViewBody1"
android:textColor="?android:attr/textColorSecondary"
app:layout_constraintBottom_toTopOf="@+id/playerMediaControllerContainer" app:layout_constraintBottom_toTopOf="@+id/playerMediaControllerContainer"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressContainer"> app:layout_constraintTop_toBottomOf="@+id/title"
tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
android:textColor="?android:attr/textColorPrimary"
tools:text="Title" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:padding="16dp"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
android:textColor="?android:attr/textColorSecondary" />
</LinearLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/playerMediaControllerContainer" android:id="@+id/playerMediaControllerContainer"
@ -116,7 +117,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/titleContainer" app:layout_constraintTop_toBottomOf="@+id/text"
tools:ignore="ContentDescription,UnusedAttribute" tools:ignore="ContentDescription,UnusedAttribute"
tools:showIn="@layout/fragment_player_playback_controls"> tools:showIn="@layout/fragment_player_playback_controls">

View file

@ -6,96 +6,68 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/titleContainer" <com.google.android.material.textview.MaterialTextView
android:layout_width="0dp" android:id="@+id/title"
android:layout_height="0dp" android:layout_width="match_parent"
android:gravity="center_vertical" android:layout_height="wrap_content"
android:orientation="vertical" android:layout_gravity="center"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingEnd="16dp" android:paddingEnd="16dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
android:textColor="?android:attr/textColorPrimary"
app:layout_constraintBottom_toTopOf="@+id/text"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="16dp"
tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:textAppearance="@style/TextViewBody2"
app:layout_constraintBottom_toTopOf="@+id/songCurrentProgress"
app:layout_constraintTop_toBottomOf="@+id/title"
tools:layout_editor_absoluteX="16dp"
tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/songCurrentProgress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:textAppearance="@style/TextViewSubtitle2"
app:layout_constraintBottom_toTopOf="@+id/playerMediaControllerContainer" app:layout_constraintBottom_toTopOf="@+id/playerMediaControllerContainer"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@+id/text"
app:layout_constraintStart_toStartOf="parent" tools:layout_editor_absoluteX="16dp"
app:layout_constraintTop_toTopOf="parent"> tools:text="22.00/ 33.00" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textColor="?android:attr/textColorPrimary"
app:layout_constraintBottom_toTopOf="@+id/text"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
style="@style/TextAppearance.MaterialComponents.Body2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:paddingStart="16dp"
android:paddingEnd="16dp"
app:layout_constraintBottom_toTopOf="@+id/songCurrentProgress"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/title"
tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/songCurrentProgress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:gravity="center"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:textColor="?android:attr/textColorSecondary"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/text"
tools:text="22.00/ 33.00" />
</androidx.constraintlayout.widget.ConstraintLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/playerMediaControllerContainer" android:id="@+id/playerMediaControllerContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="wrap_content"
android:layoutDirection="ltr" android:layoutDirection="ltr"
android:paddingStart="4dp" android:paddingStart="4dp"
android:paddingEnd="4dp" android:paddingEnd="4dp"
app:layout_constraintBottom_toTopOf="@+id/volumeFragmentContainer" app:layout_constraintBottom_toTopOf="@+id/volumeFragmentContainer"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@+id/songCurrentProgress"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/titleContainer"
tools:ignore="ContentDescription,UnusedAttribute" tools:ignore="ContentDescription,UnusedAttribute"
tools:showIn="@layout/fragment_player_playback_controls"> tools:showIn="@layout/fragment_player_playback_controls">
@ -181,7 +153,6 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/playerMediaControllerContainer"
tools:backgroundTint="@color/md_red_400" tools:backgroundTint="@color/md_red_400"
tools:layout_height="52dp" /> tools:layout_height="52dp" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>