Fix text scroll

This commit is contained in:
h4h13 2019-10-26 13:41:08 +05:30
parent e75246ff46
commit 7576a024a6
23 changed files with 138 additions and 90 deletions

View file

@ -55,7 +55,7 @@
android:paddingBottom="16dp">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/playerTitle"
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
@ -71,7 +71,7 @@
tools:text="Title" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/playerText"
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"

View file

@ -107,8 +107,8 @@
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:textAppearance="@style/TextViewBody2"
app:layout_constraintBottom_toTopOf="@+id/playerMediaControllerContainer"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:id="@+id/playback_controls"
android:layout_width="match_parent"
@ -70,42 +71,51 @@
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="16dp"
android:gravity="center_vertical"
android:scaleType="centerCrop" />
android:padding="16dp"
android:scaleType="centerCrop"
app:srcCompat="@drawable/ic_play_circle_filled_white_24dp"
app:tint="?colorAccent" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
android:layout_weight="1.0"
android:orientation="vertical"
android:paddingStart="16dp"
android:paddingStart="0dp"
android:paddingEnd="16dp">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/songTitle"
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:ellipsize="end"
android:maxLines="1"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold"
tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/songText"
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:ellipsize="end"
android:maxLines="1"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:textStyle="bold"
tools:text="@tools:sample/lorem/random" />
</LinearLayout>
</LinearLayout>

View file

@ -79,7 +79,7 @@
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressContainer"
tools:text="@tools:sample/full_names" />
tools:text="@tools:sample/lorem/random" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
@ -88,11 +88,17 @@
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:background="@color/md_red_500"
android:ellipsize="end"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:fontFeatureSettings="smcp"
android:freezesText="true"
android:gravity="center"
android:letterSpacing="0.2"
android:maxLines="1"
android:marqueeRepeatLimit="marquee_forever"
android:padding="4dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAllCaps="true"
android:textStyle="bold"
app:layout_constrainedWidth="true"
@ -101,7 +107,7 @@
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/text"
tools:text="@tools:sample/full_names" />
tools:text="@tools:sample/lorem/random" />
<RelativeLayout

View file

@ -127,6 +127,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="16dp"
android:background="?attr/roundSelector"
android:padding="16dp"
android:scaleType="fitCenter"
@ -142,6 +143,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginEnd="16dp"
android:background="?attr/roundSelector"
android:padding="16dp"
android:scaleType="fitCenter"

View file

@ -61,7 +61,14 @@
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:maxLines="1"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewSubtitle1"
app:layout_constraintBottom_toTopOf="@+id/text"
app:layout_constraintEnd_toEndOf="parent"
@ -76,6 +83,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:ellipsize="end"
android:maxLines="2"
android:textAppearance="@style/TextViewBody2"
android:textColor="?colorOnSecondary"
@ -83,7 +91,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageContainer"
app:layout_constraintTop_toBottomOf="@+id/title"
tools:text="@tools:sample/lorem" />
tools:text="@tools:sample/lorem/random" />
<FrameLayout
android:id="@+id/playbackControlsFragmentContainer"

View file

@ -30,7 +30,7 @@
android:paddingEnd="16dp">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/playerTitle"
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
@ -46,7 +46,7 @@
tools:text="Title" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/playerText"
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"

View file

@ -57,21 +57,25 @@
android:padding="16dp">
<code.name.monkey.retromusic.views.VerticalTextView
android:id="@+id/songTitle"
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:gravity="start"
android:marqueeRepeatLimit="marquee_forever"
android:rotation="0"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="@style/TextViewHeadline3"
android:textStyle="bold"
tools:ignore="MissingPrefix"
tools:text="Song title" />
tools:text="@tools:sample/lorem/random" />
<code.name.monkey.retromusic.views.VerticalTextView
android:id="@+id/songText"
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
@ -79,7 +83,7 @@
android:maxLines="2"
android:rotation="0"
android:textAppearance="@style/TextViewHeadline6"
tools:text=" Album name \nby - Artist name" />
tools:text="@tools:sample/lorem/random" />
</LinearLayout>