На Samsung S6 установка layout_width в 0dp в макете ограничений, потому что значок не виден
У меня есть две кнопки в макете ограничений с layout_width to 0dp и layout_constraintHorizont_weight установлен.Его работы прекрасно работают практически со всеми устройствами.Но в Samsung s6 значок для рисования не отображается.
Макет
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/icon1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginStart="@dimen/default_4x_padding_margin"
android:layout_marginTop="@dimen/default_4x_padding_margin"
android:layout_marginBottom="@dimen/default_4x_padding_margin"
android:background="@drawable/add2"
android:gravity="center_horizontal|bottom"
android:paddingBottom="@dimen/default_2x_padding_margin"
android:text="@string/add2"
android:textAlignment="gravity"
android:textSize="14sp"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/icon2"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="parent"
app:layout_constraintVertical_bias="0.0"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/icon2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/default_2x_padding_margin"
android:layout_marginTop="@dimen/default_4x_padding_margin"
android:layout_marginEnd="@dimen/default_4x_padding_margin"
android:layout_marginBottom="@dimen/default_4x_padding_margin"
android:layout_toEndOf="@id/icon1"
android:background="@drawable/add"
android:gravity="center_horizontal|bottom"
android:paddingBottom="@dimen/default_2x_padding_margin"
android:text="@string/add"
android:textAlignment="gravity"
android:textSize="14sp"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@id/icon1"
app:layout_constraintTop_toBottomOf="parent"
app:layout_constraintVertical_bias="0.0" />
</androidx.constraintlayout.widget.ConstraintLayout>
Если я установил для android: layout_width значение wrap_content, значок будет виден, но я не смогу использовать приложение:. layout_constraintHorizontal_weight