com.github.droidfu.adapters
Class WebGalleryAdapter
java.lang.Object
android.widget.BaseAdapter
com.github.droidfu.adapters.WebGalleryAdapter
- All Implemented Interfaces:
- android.widget.Adapter, android.widget.ListAdapter, android.widget.SpinnerAdapter
public class WebGalleryAdapter
- extends android.widget.BaseAdapter
Can be used as an adapter for an Android Gallery
view. This adapter loads the images to
be shown from the web.
- Author:
- Matthias Kaeppler
Fields inherited from interface android.widget.Adapter |
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION |
Methods inherited from class android.widget.BaseAdapter |
areAllItemsEnabled, getDropDownView, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetChanged, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserver |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NO_DRAWABLE
public static final int NO_DRAWABLE
- See Also:
- Constant Field Values
WebGalleryAdapter
public WebGalleryAdapter(android.content.Context context)
WebGalleryAdapter
public WebGalleryAdapter(android.content.Context context,
List<String> imageUrls)
- Parameters:
context
- the current contextimageUrls
- the set of image URLs which are to be loaded and displayed
WebGalleryAdapter
public WebGalleryAdapter(android.content.Context context,
List<String> imageUrls,
int progressDrawableResId)
- Parameters:
context
- the current contextimageUrls
- the set of image URLs which are to be loaded and displayedprogressDrawableResId
- the resource ID of the drawable that will be used for rendering progress
WebGalleryAdapter
public WebGalleryAdapter(android.content.Context context,
List<String> imageUrls,
int progressDrawableResId,
int errorDrawableId)
- Parameters:
context
- the current contextimageUrls
- the set of image URLs which are to be loaded and displayedprogressDrawableResId
- the resource ID of the drawable that will be used for rendering progresserrorDrawableId
- the resource ID of the drawable that will be used if a download error occurs
getCount
public int getCount()
getItem
public Object getItem(int position)
getItemId
public long getItemId(int position)
setImageUrls
public void setImageUrls(List<String> imageUrls)
getImageUrls
public List<String> getImageUrls()
setProgressDrawable
public void setProgressDrawable(android.graphics.drawable.Drawable progressDrawable)
getProgressDrawable
public android.graphics.drawable.Drawable getProgressDrawable()
getView
public android.view.View getView(int position,
android.view.View convertView,
android.view.ViewGroup parent)
onGetView
protected void onGetView(int position,
android.view.View convertView,
android.view.ViewGroup parent)
Copyright © 2011. All Rights Reserved.