Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.octo.android.robospice.spicelist;
 
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.

Parameters:
<T> the type of the data displayed in this SpiceListItemView. This class has to respect the general contrat of java.lang.Object.equals(java.lang.Object) and java.lang.Object.hashCode().
Author(s):
sni
public interface SpiceListItemView<T> {

    

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

    

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.
    ImageView getImageView(int imageIndex);

    

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

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

Parameters:
data
    void update(T data);
New to GrepCode? Check out our FAQ X