LinearLayout
,最多可包含 20个子视图 (请参阅下面的xml)。 <?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
用于具有此类自由的布局是否有意义
在其结构(如上面的那个)中,仍然能够利用这个
convertView传入ListView#getView(...)
?LinearLayout
并将其置于ScrollView
之内?通过这样做,我不会得到
缓存ListView
的能力,但也许它不会那么沉重
关于清单的假设? (见上)。 (有关如何使这种替代外观和感觉像ListView
的任何指示?我正在考虑应用标准颜色和选择器等。) 答案 0 :(得分:1)