Can someone please tell me why this GridView does not scroll smoothly even when the images are grabbed from the Droidfu cache?
I've tried WebImageView, my own defaulthandler with ImageLoader, removed the sqlLite calls and just used static URLs, tried hiding and fading in the image after it is loaded, etc. Can't seem to get smooth scrolling (getting jerkiness). Is it DroidFu that is causing this? I would hate to dump Droidfu since I already invested in it. Obviously local image resources inserted into the GridView scroll fine. I've spent way too long on this problem.
public View getView(int position, View convertView, ViewGroup parent) {
mCursor.moveToPosition(position);
String thumbUrl=imagePath+mCursor.getString(mCursor.getColumnIndex("imagename"));
if (convertView == null) {
convertView=(View)mInflater.inflate(R.layout.grid_thumb_layout, null);
}
WebImageView thumb=(WebImageView)convertView.findViewById(R.id.thumb);
thumb.reset();
thumb.setImageUrl(thumbUrl);
thumb.loadImage();
return convertView;
}
xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<GridView android:id="@+id/gridview" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:numColumns="auto_fit"
android:verticalSpacing="2dp" android:horizontalSpacing="2dp"
android:columnWidth="150dp"
android:rowHeight="150dp"
android:fadingEdge="vertical"
android:paddingLeft="2dp" android:paddingRight="2dp"
android:gravity="center" />
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="150dp"
android:layout_height="150dp">
<com.github.droidfu.widgets.WebImageView android:id="@+id/thumb"
android:scaleType="fitCenter" android:layout_weight="1"
android:layout_width="150dp"
android:layout_height="150dp" xmlns:android="http://schemas.android.com/apk/res/android" >
</com.github.droidfu.widgets.WebImageView>
</RelativeLayout>