Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Relative Layout can't make image on center
    primarykey
    data
    text
    <p>Hi i manage to make the icon center same line with the text in linear view, but I wanna add in a arrow image at the right side so i have to switch to relative view. As shown in the image, I can't manage to set the relative view left icon look like linear view.</p> <p><strong>EDIT</strong><br> I want to arrow icon stay on the right.</p> <p><img src="https://i.stack.imgur.com/0eMGv.png" alt="enter image description here"> <br>Left image is linear, right is relative.</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/layercontainer" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="10dp"&gt; &lt;ImageView android:id="@+id/categoryIcon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:gravity="center_vertical" android:layout_alignParentTop="true" android:layout_alignParentLeft="true" android:layout_alignParentBottom="true" android:layout_marginRight="15dp" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" /&gt; &lt;TextView android:id="@+id/categoryTitle" android:layout_width="wrap_content" android:layout_height="fill_parent" android:gravity="center_vertical" android:layout_alignParentTop="true" android:layout_alignParentBottom="true" android:layout_toRightOf="@id/categoryIcon" android:textStyle="bold" android:textSize="22dp" android:textColor="#000000" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" /&gt; &lt;ImageView android:id="@+id/nextIcon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_vertical" android:layout_alignParentTop="true" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:layout_marginTop="5dp" android:layout_marginBottom="5dp"/&gt; &lt;/RelativeLayout&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.
 

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