Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>In Your xml files, You set realtive parameters like this</p> <pre><code>android:layout_alignRight="@+id/textView1" </code></pre> <p>should be</p> <pre><code>android:layout_alignRight="@id/textView1" </code></pre> <p>without '+' sign.</p> <p>'+' sign means that android should generate new id for this value. If You don't use + it means the id already exists or is generated somewhere else.</p> <p>To be more precise. If You use an id for first time in xml file You need + if You used it already don't use +</p> <p>So if You need first element to be align to 2nd element You will use + sign within first element align attribute and later for 2nd element You don't use + when assigning id value. If You align 2nd element to 1st You set id of first element with + and 2nd element align parameter without +. It may sound a bit confusing but I hope You understand.</p> <p>Your author xml will look like thi</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/background" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".Author" &gt; &lt;ImageButton android:id="@+id/next" android:layout_width="140dp" android:layout_height="50dp" android:layout_alignRight="@+id/textView1" android:layout_below="@id/textView1" android:layout_marginTop="14dp" android:background="@drawable/buttonpress" android:contentDescription="@string/Next" android:onClick="NextQuote" android:src="@drawable/navigationnextitem" /&gt; &lt;ImageButton android:id="@+id/share" android:layout_width="140dp" android:layout_height="50dp" android:layout_alignLeft="@id/textView1" android:layout_alignTop="@id/next" android:background="@drawable/buttonpress" android:contentDescription="@string/share" android:onClick="Sharing" android:src="@drawable/socialshare" /&gt; &lt;TextView android:id="@id/textView1" android:layout_width="300dp" android:layout_height="300dp" android:layout_centerHorizontal="true" android:layout_marginTop="14dp" android:background="@drawable/button_shape" android:text="@string/Getstarted" android:textColor="#FF6900" android:textSize="23sp" /&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