Note that there are some explanatory texts on larger screens.

plurals
  1. PORelativeLayout layout_below issue in android
    primarykey
    data
    text
    <p>I am having an issue with getting my date TextView to be below my unit TextView when the activity name is too long in the rows for my ListView.</p> <p>Here is my row layout code for my listview:</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:layout_width="wrap_content" android:layout_height="wrap_content" android:text="New Name" android:id="@+id/activityName" android:textSize="25dp" android:layout_centerVertical="true" android:layout_alignParentLeft="true" android:layout_toLeftOf="@+id/pound"/&gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="unit" android:id="@+id/unit" android:layout_centerVertical="true" android:layout_alignParentRight="true" android:layout_marginRight="5dp" android:textSize="20dp" /&gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="/" android:id="@+id/slash" android:layout_toLeftOf="@+id/unit" android:layout_centerVertical="true" android:layout_marginRight="2dp" android:textSize="20dp" /&gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Number" android:id="@+id/number" android:layout_centerVertical="true" android:layout_toLeftOf="@+id/slash" android:layout_marginRight="5dp" android:textSize="20dp" /&gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="#" android:id="@id/pound" android:layout_centerVertical="true" android:layout_toLeftOf="@+id/number" android:layout_marginRight="2dp" android:textSize="20dp" /&gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Date" android:id="@+id/date" android:layout_below="@+id/unit" android:layout_alignRight="@+id/unit" android:textSize="10sp" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>My ListView rows look like this: <img src="https://i.stack.imgur.com/BoWvq.png" alt="enter image description here"></p> <h2>Question:</h2> <p>How do I get my date TextView to always be below my unit TextView? Also for the pound, number, slash, and unit TextViews to be all on the same line and all above the date Textview. As well as the activityName TextView to be the left of the pound TextView so it does not overlap with the pound, number, slash, and unit TextViews. Like what the walk and exercise rows look like.</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.
 

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