Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Simply add <code>android:layout_toLeftOf="@+id/button"</code> to your TextView to keep it from colliding with your Button.</p> <p>It will look like this:</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"&gt; &lt;TextView android:id="@+id/text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@+id/button" android:text="11111111111111111111111111111111111111111111111111111111111111111111111111111111111"/&gt; &lt;Button android:id="@+id/button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:text="Potatoe"/&gt; &lt;/RelativeLayout&gt; </code></pre> <hr> <p>You have changed the question... but I'll answer this new one too. You might be trying to squeeze <em>too much</em> into one row. However let's change your layout to a horizontal LinearLayout and use a couple <code>layout_weight</code> attributes:</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal"&gt; &lt;ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="10dp" android:scaleType="fitXY" android:src="@drawable/ic_launcher"/&gt; &lt;TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="5dp" android:layout_weight="1" android:text="111111111111111111111111111111111" android:textSize="22dp"/&gt; &lt;TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="5dp" android:layout_weight="1" android:ellipsize="end" android:text="222222222222222222222222222222222" android:textSize="22dp"/&gt; &lt;Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:focusable="false" android:text="Button"/&gt; &lt;/LinearLayout&gt; </code></pre> <p>As a note: <code>textView2</code> does not wrap around to a new line because you used the <code>ellipse</code> attribute. Good luck!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload