public abstract class

MessageViewAdapter

extends BaseAdapter
java.lang.Object
   ↳ android.widget.BaseAdapter
     ↳ com.urbanairship.messagecenter.MessageViewAdapter

Class Overview

A generic base adapter that binds items to views using the ViewBinder interface.

Summary

[Expand]
Inherited Constants
From interface android.widget.Adapter
Public Constructors
MessageViewAdapter(Context context, int layout)
Creates a ViewBinder
Public Methods
int getCount()
Object getItem(int position)
long getItemId(int position)
View getView(int position, View convertView, ViewGroup parent)
boolean hasStableIds()
void set(Collection<Message> collection)
Sets the current items in the adapter to the collection.
Protected Methods
abstract void bindView(View view, Message message, int position)
Called when a Message needs to be bound to the view.
Context getContext()
Returns the context.
[Expand]
Inherited Methods
From class android.widget.BaseAdapter
From class java.lang.Object
From interface android.widget.Adapter
From interface android.widget.ListAdapter
From interface android.widget.SpinnerAdapter

Public Constructors

public MessageViewAdapter (Context context, int layout)

Creates a ViewBinder

Parameters
context The application context
layout The layout for each line item

Public Methods

public int getCount ()

public Object getItem (int position)

public long getItemId (int position)

public View getView (int position, View convertView, ViewGroup parent)

public boolean hasStableIds ()

public void set (Collection<Message> collection)

Sets the current items in the adapter to the collection.

Parameters
collection Collection of items

Protected Methods

protected abstract void bindView (View view, Message message, int position)

Called when a Message needs to be bound to the view.

Parameters
view The view.
message The message.
position The message's position in the list.

protected Context getContext ()

Returns the context.

Returns
  • The context.