Note that there are some explanatory texts on larger screens.

plurals
  1. POAuto adjust TextView length which is in between an image and ImageView
    primarykey
    data
    text
    <p>I have created a <code>Listview</code>. Each row contains an <code>ImageView</code> , <code>TextView</code> and an <code>ImageButton</code>. I want the <code>ImageButton</code> to be of fixed size irrespective of the <code>TextView's</code> text length. This is supposed to be simple but i could not get it to work. </p> <p>Here is my layout file.</p> <p><a href="http://i.stack.imgur.com/C3jFa.png" rel="nofollow">http://i.stack.imgur.com/C3jFa.png</a></p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="?android:attr/listPreferredItemHeight" android:padding="6dip"&gt; &lt;ImageView android:id="@+id/androidAccountImage" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_gravity="center_vertical" android:layout_marginRight="10dp" android:src="@drawable/droidalt" /&gt; &lt;TextView android:id="@+id/profileName" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_toRightOf="@id/androidAccountImage" android:bufferType="spannable" android:ellipsize="end" android:gravity="center_vertical" android:singleLine="true" android:text="@string/strTryDemo" android:textAppearance="?android:attr/textAppearanceLarge" /&gt; &lt;ImageButton android:id="@+id/androidProfileEdit" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_gravity="center_vertical" android:layout_toRightOf="@+id/profileName" android:src="@drawable/edit_account_button" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    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