|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.widget.BaseAdapter
com.drismo.gui.quickaction.QuickActionAdapter
public class QuickActionAdapter
BaseAdapter class to handle and set the layout and content of the whole archive list.
Arrays with filenames, durations and timestamp should be sorted correctly in relation to each other,
before they are shipped to this class.
ViewArchive
Nested Class Summary | |
---|---|
(package private) static class |
QuickActionAdapter.ViewHolder
Inner class of QuickActionAdapter , to store the TextView with the filename. |
Field Summary | |
---|---|
private android.content.Context |
c
|
private java.lang.String[] |
data
|
private java.lang.String[] |
duration
|
private android.view.LayoutInflater |
mInflater
|
private java.lang.String[] |
timestamp
|
Fields inherited from interface android.widget.Adapter |
---|
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION |
Constructor Summary | |
---|---|
QuickActionAdapter(android.content.Context context)
When constructing the QuickActionAdapter ,
get the LayoutInflater to populate the ListView
with the archive items as specified in the xml. |
Method Summary | |
---|---|
int |
getCount()
Get the count of the data array, to determine how many trip files we have in the archive. |
java.lang.Object |
getItem(int item)
Get filename for a specific trip, based on where it is in the sort order. |
long |
getItemId(int position)
Unused function, but implemented as required for BaseAdapter . |
android.view.View |
getView(int position,
android.view.View convertView,
android.view.ViewGroup parent)
Build the content for each list element in the archive. |
void |
setData(java.lang.String[] data)
Set the array with all the file names for the trips in the archive. |
void |
setDuration(java.lang.String[] dura)
Set the array with converted duration strings for the trips in the archive. |
void |
setTimestamp(java.lang.String[] ts)
Set the array with all the timestamps for the trips in the archive. |
Methods inherited from class android.widget.BaseAdapter |
---|
areAllItemsEnabled, getDropDownView, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetChanged, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserver |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private android.view.LayoutInflater mInflater
private java.lang.String[] data
private java.lang.String[] timestamp
private java.lang.String[] duration
private android.content.Context c
Constructor Detail |
---|
public QuickActionAdapter(android.content.Context context)
QuickActionAdapter
,
get the LayoutInflater
to populate the ListView
with the archive items as specified in the xml.
context
- Context to get the LayoutInflater from.Method Detail |
---|
public void setData(java.lang.String[] data)
data
- A string array containing the file names for all the stored trips.public void setTimestamp(java.lang.String[] ts)
ts
- Array with timestamps for all the archive files.public void setDuration(java.lang.String[] dura)
dura
- Array with duration information for archive files.public int getCount()
public java.lang.Object getItem(int item)
item
- Trip position in the sort order.
public long getItemId(int position)
BaseAdapter
.
position
- Integer
public android.view.View getView(int position, android.view.View convertView, android.view.ViewGroup parent)
position
- The element's position in the list.convertView
- A view holding the list item layout, filled with content.parent
- The parent that this view will be attached to.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |