我试图将三个甚至四个GridView
放在一个布局中并同时滚动它们。
由于GridView
拥有自己的ScrollView
小部件,我需要通过ScrollView
属性禁用该android:isScrollContainer="false"
并覆盖GrideView
个度{{1}功能,这是我的扩展GrideView:
wrap_content
它正在运行,但它禁用了一些public class ExpandedGridView extends GridView
{
public ExpandedGridView (Context context)
{
super(context);
}
public ExpandedGridView (Context context, AttributeSet attrs)
{
super(context, attrs);
}
public gridView(Context context, AttributeSet attrs, int defStyle)
{
super(context, attrs, defStyle);
}
@Override
public void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
{
// Calculate entire height by providing a very large height hint.
// But do not use the highest 2 bits of this integer; those are
// reserved for the MeasureSpec mode.
int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE / 2, MeasureSpec.AT_MOST);
super.onMeasure(widthMeasureSpec, expandSpec);
}
}
的服务器,比如回收,重用等等......所以这会让我的BaseAdapter
慢慢滚动而且不够顺畅!
有关如何加快速度的想法吗?
更新1:添加了我的GridView
课程:
GridAdapter