com.octo.android.robospice.spicelist.okhttp
Class OkHttpSpiceArrayAdapter<T>

java.lang.Object
  extended by android.widget.BaseAdapter
      extended by android.widget.ArrayAdapter<T>
          extended by com.octo.android.robospice.spicelist.BaseSpiceArrayAdapter<T>
              extended by com.octo.android.robospice.spicelist.okhttp.OkHttpSpiceArrayAdapter<T>
Type Parameters:
T - the type of data displayed by the list.
All Implemented Interfaces:
android.widget.Adapter, android.widget.Filterable, android.widget.ListAdapter, android.widget.SpinnerAdapter

public abstract class OkHttpSpiceArrayAdapter<T>
extends BaseSpiceArrayAdapter<T>

An adapter that is optimized for SpiceListView instances. It offers to update ImageViews contained in SpiceListItemView instances with images loaded from the network. All you have to do is to Override #createRequest(Object) to define a bitmapRequest for each object in the list that is associated an image to display. Also please note that in your BaseSpiceArrayAdapter.getView(int, android.view.View, android.view.ViewGroup) method, you must call BaseSpiceArrayAdapter.updateListItemViewAsynchronously(Object, SpiceListItemView) in order for your SpiceListItemView to be updated automagically.

Author:
sni

Nested Class Summary
 
Nested classes/interfaces inherited from class com.octo.android.robospice.spicelist.BaseSpiceArrayAdapter
BaseSpiceArrayAdapter.ImageRequestListener, BaseSpiceArrayAdapter.ThumbnailAsynTask
 
Field Summary
 
Fields inherited from class com.octo.android.robospice.spicelist.BaseSpiceArrayAdapter
defaultDrawable, imageHeight, imageWidth, isNetworkFetchingAllowed, spiceManagerBinary
 
Fields inherited from interface android.widget.Adapter
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
 
Constructor Summary
  OkHttpSpiceArrayAdapter(android.content.Context context, OkHttpBitmapSpiceManager spiceManagerBinary)
           
protected OkHttpSpiceArrayAdapter(android.content.Context context, OkHttpBitmapSpiceManager spiceManagerBinary, List<T> objects)
          Used for testing only.
  OkHttpSpiceArrayAdapter(android.content.Context context, OkHttpBitmapSpiceManager spiceManagerBinary, T[] objects)
           
 
Method Summary
 
Methods inherited from class com.octo.android.robospice.spicelist.BaseSpiceArrayAdapter
createRequest, createView, getBitmapWorkerTask, getView, loadBitmapAsynchronously, performBitmapRequestAsync, setDefaultDrawable, updateListItemViewAsynchronously
 
Methods inherited from class android.widget.ArrayAdapter
add, addAll, addAll, clear, createFromResource, getContext, getCount, getDropDownView, getFilter, getItem, getItemId, getPosition, insert, notifyDataSetChanged, remove, setDropDownViewResource, setNotifyOnChange, sort
 
Methods inherited from class android.widget.BaseAdapter
areAllItemsEnabled, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OkHttpSpiceArrayAdapter

public OkHttpSpiceArrayAdapter(android.content.Context context,
                               OkHttpBitmapSpiceManager spiceManagerBinary)

OkHttpSpiceArrayAdapter

public OkHttpSpiceArrayAdapter(android.content.Context context,
                               OkHttpBitmapSpiceManager spiceManagerBinary,
                               T[] objects)

OkHttpSpiceArrayAdapter

protected OkHttpSpiceArrayAdapter(android.content.Context context,
                                  OkHttpBitmapSpiceManager spiceManagerBinary,
                                  List<T> objects)
Used for testing only.



Copyright © 2012-2014. All Rights Reserved.