Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to put view below a textview which has dynamic text
    primarykey
    data
    text
    <p>I have recently started learning android. I am creating a layout which is something like</p> <p><img src="https://i.stack.imgur.com/itH53.png" alt="Layout"></p> <p>In the image: which i click on <strong>Button</strong> ,<strong>Text</strong> will get populated with some value And then i want the position of 2nd <strong>Text</strong> to be dynamically adjusted.</p> <p>Currently both gets overlapped.</p> <p>My XML file is</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="0dip" android:layout_weight="2.5" &gt; &lt;Button android:id="@+id/get_address_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:onClick="getAddress" android:text="@string/get_address" /&gt; &lt;TextView android:id="@+id/label_address" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@+id/get_address_button" android:layout_marginTop="21dp" android:text="@string/address" android:textSize="12sp" /&gt; &lt;ProgressBar android:id="@+id/address_progress" style="@android:style/Widget.ProgressBar.Large" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/label_address" android:layout_centerHorizontal="true" android:indeterminate="true" android:visibility="gone" /&gt; &lt;TextView android:id="@+id/address" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/label_address" android:layout_marginLeft="10dp" android:layout_toRightOf="@+id/label_address" android:textIsSelectable="true" android:textSize="20sp" /&gt; &lt;TextView android:id="@+id/label_distance" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@+id/label_address" android:layout_marginTop="21dp" android:text="@string/distance" android:textSize="12sp" /&gt; &lt;Spinner android:id="@+id/location_spinner" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/label_distance" android:layout_toRightOf="@+id/label_distance" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>Any help.</p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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