I am working on my android project to input the text in two textviews and display the Inbox text next to the email_subject textview. I have got a problem with the textview because when the text is short and large it will not move the Inbox next to the textview.
Here is what it show:
Here is what I want to achieve:
Here is the content_main.xml:
<?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"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    android:orientation="horizontal">
    <FrameLayout
        android:id="@+id/flString"
        android:layout_width="295dp"
        android:layout_height="135dp"
        tools:layout_editor_absoluteX="10dp"
        tools:ignore="MissingConstraints">
        <TextView
            android:id="@+id/email_subject"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="4dp"
            android:layout_marginTop="19dp"
            android:text="Mail delivery failed: returning message to sender"
            android:textColor="#757575"
            android:textSize="20sp"
            android:textStyle="bold" />
        <RelativeLayout
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">
            <TextView
                android:id="@+id/mailbox_name"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/rounded_mailbox"
                android:text="Inbox"
                android:textColor="#757575"
                android:textSize="12sp"
                android:layout_alignParentRight="true"
                android:layout_alignParentBottom="true" />
        </RelativeLayout>
    </FrameLayout>
    <ImageView
        android:id="@+id/ivFavorite"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="284dp"
        android:layout_marginTop="16dp"
        android:padding="5dp"
        android:src="@drawable/ic_star_black_24dp"
        app:layout_constraintHorizontal_bias="0.723"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />
    <ImageView
        android:id="@+id/more_menu"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="284dp"
        android:layout_marginTop="54dp"
        android:padding="5dp"
        android:src="@drawable/ic_baseline_3_dots_24"
        app:layout_constraintHorizontal_bias="0.723"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />
    <TextView
        android:id="@+id/from_me"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="72dp"
        android:layout_marginTop="8dp"
        android:text="to me"
        android:textColor="#757575"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/from_sender" />
    <ImageView
        android:id="@+id/dropdown_btn"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="114dp"
        android:layout_marginTop="8dp"
        android:src="@drawable/ic_arrow_down"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/from_sender" />
</androidx.constraintlayout.widget.ConstraintLayout>
Can you please show me an example how I can get the Inbox text to display at the end of the text when the text is short and large??
EDIT: When I try this:
<androidx.constraintlayout.widget.ConstraintLayout
    android:id="@+id/flString1"
    android:layout_width="295dp"
    android:layout_height="wrap_content"
    tools:ignore="MissingConstraints">
    <TextView
        android:id="@+id/email_subject"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="RE: SRX1517391641ID - [EXTERNAL] Re: Reported deliverability problem to Outlook.com SRX1517391641ID "
        android:textColor="#757575"
        android:textSize="20sp"
        android:textStyle="bold"
        tools:ignore="MissingConstraints" />
    <TextView
        android:id="@+id/mailbox_name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="false"
        android:layout_alignParentBottom="false"
        android:layout_marginBottom="83dp"
        android:background="@drawable/rounded_mailbox"
        android:text="Inbox"
        android:textColor="#757575"
        android:textSize="12sp"
        android:gravity="bottom|end" />
</androidx.constraintlayout.widget.ConstraintLayout>
It will not move the inbox text to the end of the text. Any idea??


