Make sure you use android:minHeight="?android:attr/listPreferredItemHeight"

Also note that a LinearLayout+Image+TextView can be replaced by one
TextView only. You can add images to TextViews.

On Mon, Feb 8, 2010 at 11:15 AM, Mark Wyszomierski <[email protected]> wrote:
> Hi,
>
> I am trying to use SimpleAdapter to make a list which has rows
> containing an icon, then a textview, like:
>
>  <LinearLayout>
>     <ImageView /> <TextView />
>  </LinearLayout>
>
> it looks like SimpleAdapter is almost perfect for this:
>
>  SimpleAdapter adapter = new SimpleAdapter(
>       this,
>       list,
>       android.R.layout.activity_list_item,
>       new String[] { "LABEL", "ICON" },
>       new int[] { android.R.id.text1, android.R.id.icon }
>  );
>
> it works, but the row item is so short, vertically. I think this is
> just the nature of "activity_list_item". It would be nice if there
> were some padding above and below each row item. I know I can just
> create my own Adapter class and use whatever layout I like for the
> row, but was hoping to use some predefined stuff if possible,
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Romain Guy
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to