Мой макет Android выглядит следующим образом:
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:orientation="horizontal">
<TextView
android:id="@+id/notification_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|bottom"
android:layout_marginEnd="1dp"
android:ellipsize="end"
android:fadingEdge="horizontal"
android:maxLines="4"
android:singleLine="false"
android:textAppearance="@style/Ds6"
android:textColor="@color/notification_ds6_secondary_text"
tools:text="Watched item ends in 6 minutes in "
android:visibility="visible"
tools:ignore="Deprecated"/>
<Chronometer
android:id="@+id/notification_countdown"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:gravity="left|bottom"
android:maxLines="1"
android:textAppearance="@style/Ds6"
android:textColor="@color/notification_ds6_secondary_text"
android:textSize="@dimen/TextSizeSmall"
android:visibility="visible"
tools:text="10:02 AM" />
<Chronometer
android:id="@+id/notification_countdown_60s"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left|bottom"
android:gravity="left"
android:maxLines="1"
android:textColor="@color/alert_color"
android:textAppearance="@style/Ds6"
android:textSize="@dimen/TextSizeSmall"
android:visibility="visible"
tools:text="10:02 AM" />
<TextView
android:id="@+id/notification_time_expired"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left|bottom"
android:text="00:00"
android:textColor="@color/notification_ds6_disabled_text"
android:textAppearance="@style/Ds6"
android:textSize="@dimen/TextSizeSmall"
android:visibility="visible" />
</LinearLayout>
Я хочу, чтобы содержимое текстового представления было правильно перенесено для размещения хронометра № 1,Chrometer # 2 и Chronometer # 3 должны отображаться в одной строке.Этого не происходит для длинных текстовых строк.
Но если я уменьшу длину текстовой строки, как показано ниже, я смогу увидеть все элементы в одной строке.Как отобразить все элементы в одной строке?Я хочу, чтобы текст был перенесен, но два хронометра и текстовое представление # 2 должны находиться на той же строке, что и первое текстовое представление.
Это будет показано в удаленном представлении уведомлений, поэтому я могуне использовать ConstraintLayout.Я могу использовать только FrameLayout, RelativeLayout и LinearLayout.