The idea is to have TextView and ImageButton to the right of it. TextView is multiline, both are centered verically (depends on who is higher). All goes well until some long texts are moved to the next line, leaving huge hole between (visible) right edge of TextView. It works good, but looks not. How can you suggest to do this?

Too make it more clear: the button should be **to the right visible edge of TextView, not to the right of parent**. The problem is to understand TextView's visible width, I mean the width of it's content. 

[![enter image description here](https://i.stack.imgur.com/Is9u8.png)](https://i.stack.imgur.com/Is9u8.png)

```
<?xml version="1.0" encoding="utf-8"?>
<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">

    <TextView
        android:id="@+id/title"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:fontFamily="@font/proxima_nova_regular"
        android:textSize="14sp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:text="Some title"/>

    <RelativeLayout
        android:id="@+id/holder"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/title">

        <TextView
            android:id="@+id/name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="false"
            android:layout_centerVertical="true"
            android:fontFamily="@font/proxima_nova_regular"
            android:paddingEnd="40dp"
            android:textSize="20sp"
            tools:text="aaaaaaaa bbbbb ddddddddddddddddd eeee"/>

        <ImageButton
            android:id="@+id/btn"
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:layout_centerVertical="true"
            android:layout_marginStart="-40dp"
            android:layout_toEndOf="@id/name"
            android:clickable="true"
            android:contentDescription="@string/standard_content_description"
            android:focusable="true"
            android:padding="4dp"
            app:srcCompat="@android:drawable/btn_star_big_on"/>
    </RelativeLayout>

</android.support.constraint.ConstraintLayout>

```