Скриншоты
1) Samsung J6
2) Lenovo Vibe X3 6-дюймовый экран
Проблема в том, как я могу отрегулировать текстовое представление текста песни, чтобы увеличить высоту, когда доступно больше экрана, как в модели J6, и меньше, если пространство на экране меньше ,?
Или есть какой-нибудь способ избежать этого лишнего странного пространства под кнопками управления воспроизведением / паузой в модели J6? когда я увеличиваю расстояние между textview и кнопками, J6 становится правильным и в моделях lenovo кнопки выходят из экрана ??
Мой код XML:
<?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:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/bg"
android:theme="@style/Base.Theme.AppCompat.Light.DarkActionBar"
tools:context=".MainActivity">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="660dp">
<ImageView
android:id="@+id/imageView"
android:layout_width="239dp"
android:layout_height="240dp"
android:layout_marginEnd="25dp"
android:layout_marginLeft="25dp"
android:layout_marginRight="25dp"
android:layout_marginStart="25dp"
android:layout_marginTop="25dp"
android:adjustViewBounds="false"
android:scaleType="fitCenter"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/albumcover"
tools:ignore="ContentDescription" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="34dp"
android:layout_height="32dp"
android:layout_marginLeft="25dp"
android:layout_marginStart="25dp"
android:layout_marginTop="32dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView"
app:srcCompat="@drawable/ic_baseline_surround_sound_24px" />
<ImageView
android:id="@+id/imageView3"
android:layout_width="34dp"
android:layout_height="32dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="32dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView"
app:srcCompat="@drawable/ic_baseline_more_vert_24px" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="32dp"
android:text="Human Nature"
android:textAlignment="center"
android:textColor="@android:color/white"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
<SeekBar
android:id="@+id/seekBar2"
android:layout_width="402dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:progressTint="@color/colorAccent"
android:thumbTint="@color/colorAccent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView3" />
<ImageView
android:id="@+id/imageView5"
android:layout_width="43dp"
android:layout_height="40dp"
android:layout_marginEnd="8dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/seekBar2"
app:srcCompat="@drawable/ic_baseline_pause_24px" />
<ImageView
android:id="@+id/imageView6"
android:layout_width="27dp"
android:layout_height="27dp"
android:layout_marginLeft="24dp"
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toEndOf="@+id/imageView5"
app:layout_constraintTop_toTopOf="@+id/imageView5"
app:srcCompat="@drawable/ic_baseline_skip_next_24px" />
<ImageView
android:id="@+id/imageView7"
android:layout_width="30dp"
android:layout_height="26dp"
android:layout_marginEnd="24dp"
android:layout_marginRight="24dp"
android:layout_marginTop="8dp"
app:layout_constraintEnd_toStartOf="@+id/imageView5"
app:layout_constraintTop_toTopOf="@+id/imageView5"
app:srcCompat="@drawable/ic_baseline_skip_previous_24px" />
<ImageView
android:id="@+id/imageView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="36dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="36dp"
android:layout_marginStart="8dp"
app:layout_constraintEnd_toStartOf="@+id/imageView7"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/imageView7"
app:srcCompat="@drawable/ic_baseline_shuffle_24px" />
<ImageView
android:id="@+id/imageView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginLeft="36dp"
android:layout_marginRight="8dp"
android:layout_marginStart="36dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageView6"
app:layout_constraintTop_toTopOf="@+id/imageView6"
app:srcCompat="@drawable/ic_baseline_repeat_24px" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="12dp"
android:text="Housee De Racket"
android:textAlignment="center"
android:textColor="#ffffff"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView" />
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="79dp"
android:layout_marginTop="24dp"
android:text="this space is for lyrics "
android:textAlignment="center"
android:textColor="#ffffff"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginLeft="25dp"
android:layout_marginStart="25dp"
android:layout_marginTop="8dp"
android:text="01:23"
android:textColor="#ffffff"
app:layout_constraintBottom_toTopOf="@+id/seekBar2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView2"
app:layout_constraintVertical_bias="1.0" />
<TextView
android:id="@+id/textView5"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="25dp"
android:layout_marginRight="25dp"
android:layout_marginTop="8dp"
android:text="01:24"
android:textColor="#ffffff"
app:layout_constraintBottom_toTopOf="@+id/seekBar2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView3"
app:layout_constraintVertical_bias="1.0" />
</android.support.constraint.ConstraintLayout>
</LinearLayout>