LinearLayout
that can have up to 20 child views (see xml below).<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation:"horizontal">
<!--
This LinearLayout is going to contain one or more
Views which will be added progammatically on runtime.
The number of children views added to it depend on the
data to be displayed, and the only assumption that can
be made is that there's will be no more than 20 child
views for one particular instance of this LinearLayout.
-->
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginRight="25dp"/>
<ImageButton
android:layout_width="25dip"
android:layout_height="25dip"
android:layout_gravity="center|top"
android:layout_marginLeft="-25dp"/>
</LinearLayout>
ListView
for a layout that has such freedom
in its structure (like the one above), and still being able to make use of theListView#getView(...)
?LinearLayout
and put this within a ScrollView
? By doing this, I wouldn't get
caching abilities of the ListView
, but maybe it wouldn't be so heavy given the
assumptions about the list? (see top). (Any pointers on how to make this alternative look and feel like a ListView
? I'm thinking of applying standard colors and selectors etc.)If you know some of your 10 elemets will be the same, you could use
To be sure that the convertView will match your item type convertView