java.lang.Object | ||
↳ | android.widget.BaseAdapter | |
↳ | com.urbanairship.messagecenter.MessageViewAdapter |
A generic base adapter that binds items to views using the ViewBinder interface.
[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
|
Creates a ViewBinder
context | The application context |
---|---|
layout | The layout for each line item |
Sets the current items in the adapter to the collection.
collection | Collection of items |
---|
Called when a Message
needs to be bound to the view.
view | The view. |
---|---|
message | The message. |
position | The message's position in the list. |