Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Solution of your question.</p> <p><strong>Step 1</strong></p> <p>Take a <code>RelativeLayout</code> as parent of your <code>ScrollView</code>. And set property to left assign to your <code>ScrollView</code>.</p> <p><strong>Step 2</strong></p> <p>Instead of placing <code>ImageView</code> at the end of your <code>ScrollView</code>, place it at <code>Right Of</code> your <code>ScrollView</code>.</p> <h3>Solution 1</h3> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/RelativeLayout02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" &gt; &lt;ImageButton android:id="@+id/animal_back" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:src="@drawable/ic_launcher" /&gt; &lt;ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" android:fillViewport="true" android:orientation="vertical" android:layout_toLeftOf="@+id/animal_back" &gt; &lt;RelativeLayout android:id="@+id/RelativeLayout01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" &gt; ... &lt;/RelativeLayout&gt; &lt;/ScrollView&gt; </code></pre> <p></p> <p>I added <code>android:layout_toLeftOf="@+id/animal_back"</code> code. So that ImageView will be visible to right side. and ScrollView will be set to left side of ImageView.</p> <h3> Solution 2</h3> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/RelativeLayout02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" &gt; &lt;ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" android:fillViewport="true" android:orientation="vertical" &gt; &lt;RelativeLayout android:id="@+id/RelativeLayout01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" &gt; ... &lt;/RelativeLayout&gt; &lt;/ScrollView&gt; &lt;ImageButton android:id="@+id/animal_back" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:src="@drawable/ic_launcher" /&gt; &lt;/RelativeLayout&gt; </code></pre>
 

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