Android - ConstraintLayout - ellipsize end for large text : <p>I need some help regarding an Android layout.
I have the following code:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;android.support.constraint.ConstraintLayout 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="wrap_content"&gt;

&lt;android.support.constraint.Guideline
    android:id="@+id/guideline"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    app:layout_constraintGuide_percent="0.5" /&gt;

&lt;android.support.constraint.Guideline
    android:id="@+id/guideline2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    app:layout_constraintGuide_percent="0.725" /&gt;

&lt;TextView
    android:id="@+id/data_field_1_name"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_marginEnd="10dip"
    android:layout_marginTop="10dip"
    app:layout_constraintLeft_toLeftOf="@id/guideline"
    app:layout_constraintRight_toLeftOf="@id/guideline2"
    app:layout_constraintTop_toTopOf="parent"
    tools:text="ACTIVE" /&gt;

&lt;TextView
    android:id="@+id/data_field_1_value"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_marginEnd="15dip"
    android:layout_toEndOf="@id/data_field_1_name"
    app:layout_constraintBaseline_toBaselineOf="@id/data_field_1_name"
    app:layout_constraintLeft_toLeftOf="@id/guideline2"
    app:layout_constraintRight_toRightOf="parent"
    tools:text="1750" /&gt;

&lt;TextView
    android:id="@+id/data_field_2_name"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_marginEnd="10dip"
    android:layout_marginTop="8dip"
    app:layout_constraintLeft_toLeftOf="@id/guideline"
    app:layout_constraintRight_toLeftOf="@id/guideline2"
    app:layout_constraintTop_toBottomOf="@id/data_field_1_name"
    tools:text="ACTIVE" /&gt;

&lt;TextView
    android:id="@+id/data_field_2_value"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_marginEnd="15dip"
    android:layout_toEndOf="@id/data_field_2_name"
    app:layout_constraintBaseline_toBaselineOf="@id/data_field_2_name"
    app:layout_constraintLeft_toLeftOf="@id/guideline2"
    app:layout_constraintRight_toRightOf="parent"
    tools:text="1750" /&gt;


&lt;TextView
    android:id="@+id/data_field_3_name"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_marginEnd="10dip"
    android:layout_marginTop="8dip"
    app:layout_constraintLeft_toLeftOf="@id/guideline"
    app:layout_constraintRight_toLeftOf="@id/guideline2"
    app:layout_constraintTop_toBottomOf="@id/data_field_2_name"
    tools:text="ACTIVE" /&gt;

&lt;TextView
    android:id="@+id/data_field_3_value"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_marginEnd="15dip"
    android:layout_toEndOf="@id/data_field_3_name"
    app:layout_constraintBaseline_toBaselineOf="@id/data_field_3_name"
    app:layout_constraintLeft_toLeftOf="@id/guideline2"
    app:layout_constraintRight_toRightOf="parent"
    tools:text="1750" /&gt;

&lt;TextView
    android:id="@+id/value"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_marginEnd="15dip"
    android:layout_marginStart="15dip"
    android:textSize="25sp"
    app:layout_constraintBaseline_toBaselineOf="@id/data_field_2_name"
    app:layout_constraintHorizontal_bias="0.0"
    app:layout_constraintLeft_toLeftOf="parent"
    tools:text="17.40" /&gt;

&lt;ImageView
    android:id="@+id/flag"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginEnd="0dp"
    android:layout_marginTop="2dp"
    android:src="@drawable/ic_launcher_background"
    app:layout_constraintEnd_toEndOf="@+id/unit"
    app:layout_constraintStart_toStartOf="@+id/unit"
    app:layout_constraintTop_toTopOf="parent" /&gt;

&lt;android.support.v7.widget.AppCompatTextView
    android:id="@+id/unit"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_marginStart="2dp"
    android:gravity="center_horizontal"
    app:layout_constraintBaseline_toBaselineOf="@id/value"
    app:layout_constraintStart_toEndOf="@+id/value"
    tools:text="KG" /&gt;

&lt;TextView
    android:id="@+id/label"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_marginStart="15dip"
    app:layout_constraintBaseline_toBaselineOf="@id/data_field_3_name"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toLeftOf="@id/guideline"
    tools:text="TOTAL" /&gt;
&lt;/android.support.constraint.ConstraintLayout&gt;
</code></pre>

<p>The output is: <a href="https://i.stack.imgur.com/8ZFsL.png" rel="noreferrer"><img src="https://i.stack.imgur.com/8ZFsL.png" alt="enter image description here"></a></p>

<p>My problem is: If the main value(17.40) is too large, that value should be "ellipsized" to end, but it goes over the "Active" text.</p>

<p>The input for large text is:<a href="https://i.stack.imgur.com/sGEBM.png" rel="noreferrer"><img src="https://i.stack.imgur.com/sGEBM.png" alt="enter image description here"></a></p>

<p>I need something like that for large value:
<a href="https://i.stack.imgur.com/1b096.png" rel="noreferrer"><img src="https://i.stack.imgur.com/1b096.png" alt="enter image description here"></a></p>

<p>PS: the unit and and the flag should be always displayed at the end of the main value.</p>

<p>Could you please help me with suggestions? I tried a lot of ideas, but didn't find a solution. </p>
