com.octo.android.robospice.spicelist
Interface SpiceListItemView<T>

Type Parameters:
T - the type of the data displayed in this SpiceListItemView. This class has to respect the general contrat of Object.equals(Object) and Object.hashCode().

public interface SpiceListItemView<T>

Describes the behavior of a "List Item View" that contains an ImageView that is used to display a given piece of data. The image will be download from the network and will be managed in an optimal way via RoboSpice.

Author:
sni

Method Summary
 T getData()
           
 android.widget.ImageView getImageView(int imageIndex)
           
 int getImageViewCount()
           
 void update(T data)
          Updates the view with given data.
 

Method Detail

getData

T getData()
Returns:
the object that is displayed by this list item.

getImageView

android.widget.ImageView getImageView(int imageIndex)
Parameters:
imageIndex - the index of the image in case there are multiple bitmap used to represent every piece of data.
Returns:
the imageView that is displaying the drawable associated to this view's data. This ImageView will be update by the SpiceManager.

getImageViewCount

int getImageViewCount()
Returns:
the number of image views used to represent each piece of data. Usually 1.

update

void update(T data)
Updates the view with given data. Overrides of this method should not deal with images. Only update other fields here.

Parameters:
data -


Copyright © 2012-2014. All Rights Reserved.