Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Yes you can able to do that.</p> <p>But for that you have to take the RelativeLayout as because LinearLayout will not able to do this for your case.</p> <p>Why you take the linearLayout for all times and for all other view ??</p> <p>Just use this xml with your translate animation and try it.</p> <p>xml:</p> <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/board_layout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#FFFFFF" android:orientation="vertical"&gt; &lt;ImageView android:id="@+id/cardsPileImage" android:layout_width="100dp" android:layout_height="wrap_content" android:src="@drawable/icon" android:layout_gravity="right" android:layout_marginTop="110dp" android:layout_marginRight="10dp" android:layout_marginLeft="10dp"&gt; &lt;/ImageView&gt; &lt;Button android:layout_below="@+id/cardsPileImage" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/icon" android:id="@+id/backButton" android:paddingLeft="60dp" android:paddingRight="60dp" android:textSize="25dp" android:text="Start Game" android:onClick="startGame"&gt; &lt;/Button&gt; &lt;ImageView android:id="@+id/discardPileImage" android:layout_below="@+id/backButton" android:layout_width="100dp" android:layout_height="wrap_content" android:src="@drawable/icon" android:layout_gravity="right" android:layout_marginTop="10dp" android:layout_marginRight="10dp" android:adjustViewBounds="true"&gt; &lt;/ImageView&gt; &lt;/RelativeLayout&gt; </code></pre> <p>If it not works then let me know. :)</p> <p><strong>Updated</strong></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/board_layout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#FFFFFF"&gt; &lt;RelativeLayout android:layout_height="fill_parent" android:layout_width="fill_parent" android:layout_margin="100dp" android:gravity="center" android:layout_gravity="center"&gt; &lt;ImageView android:id="@+id/cardsPileImage" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/icon" android:layout_gravity="right" android:layout_alignParentRight="true" &gt; &lt;/ImageView&gt; &lt;Button android:layout_below="@+id/cardsPileImage" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/icon" android:id="@+id/backButton" android:layout_centerInParent="true" android:textSize="20dp" android:layout_margin="10dp" android:text="Start Game" android:onClick="startGame"&gt; &lt;/Button&gt; &lt;ImageView android:id="@+id/discardPileImage" android:layout_below="@+id/backButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/icon" android:layout_gravity="right" android:layout_alignParentRight="true" &gt; &lt;/ImageView&gt; &lt;/RelativeLayout&gt; &lt;/LinearLayout&gt; </code></pre>
    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. 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