Note that there are some explanatory texts on larger screens.

plurals
  1. POcenter align imageview with above textview
    primarykey
    data
    text
    <p>I want to center align my imageview with the above textview here's an image of what I'm getting.</p> <p><img src="https://i.stack.imgur.com/w9NSL.jpg" alt="enter image description here"></p> <p>I need something like this in a relative layout</p> <pre><code>&lt;TextView android:id="@+id/strength" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/hero_class" android:textColor="#0095FF" android:text="Strength" android:textAppearance="?android:attr/textAppearanceMedium" /&gt; &lt;TextView android:id="@+id/agility" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/hero_class" android:layout_centerHorizontal="true" android:text="Agility" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#0095FF" /&gt; &lt;TextView android:id="@+id/intl" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/agility" android:layout_alignBottom="@+id/agility" android:layout_alignParentRight="true" android:text="Intelligence" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#0095FF" /&gt; &lt;ImageView android:id="@+id/img_int" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_alignTop="@+id/img_str" android:src="@drawable/intelligence" /&gt; &lt;ImageView android:id="@+id/img_agi" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@+id/img_int" android:layout_centerHorizontal="true" android:src="@drawable/agility" /&gt; &lt;ImageView android:id="@+id/img_str" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/strength" android:layout_alignParentLeft="true" android:src="@drawable/strength" /&gt; </code></pre> <p>This is what i have done but the problem is that i can have the middle imageview centered align but the left and right one are with align to the most right and most left not in the center of above textview</p>
    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.
 

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