sk.baka.ambient.activity.search
Class StringListController
java.lang.Object
sk.baka.ambient.activity.main.AbstractController
sk.baka.ambient.activity.main.AbstractListController
sk.baka.ambient.activity.search.StringListController
- All Implemented Interfaces:
- IGestureListViewListener
public class StringListController
- extends AbstractListController
Shows an immutable list of strings.
- Author:
- Martin Vysny
Methods inherited from class sk.baka.ambient.activity.main.AbstractListController |
canComputeItems, canHighlight, computeTracks, destroy, dropItems, getClipboard, getHint, highlightChanged, isComputeTracksLong, isComputeTracksOnlineOp, isReadOnly, moveItems, moveItemsByOne, performZoom, removeItems, setClipboard, update |
Methods inherited from class sk.baka.ambient.activity.main.AbstractController |
equals, flipVisibility, hashCode, hide, initButtonBar, initButtonBar, initButtonBar, isDestroyed, isVisible, isZoomed, onAction, setVisibility, show, visibilityChanged, zoom |
StringListController
public StringListController(int listViewId,
SearchActivity mainActivity)
- Creates new controller.
- Parameters:
listViewId
- the list view id.mainActivity
- owning activity.
setContent
public void setContent(List<String> content)
- Sets the content and updates the list view.
- Parameters:
content
- the content.
recomputeListItems
protected void recomputeListItems()
- Description copied from class:
AbstractListController
- Recomputes the
model
. You don't have
to call the ModelHolder.notifyModified()
- it is called
automatically after the method finishes.
- Specified by:
recomputeListItems
in class AbstractListController
itemActivated
public void itemActivated(int index,
Object model)
- Description copied from interface:
IGestureListViewListener
- The item was activated, either by clicking on it or using a keyboard.
- Parameters:
index
- the index of the item.model
- the model for the item.
update
public void update(GesturesListView listView,
View itemView,
int index,
Object model)
- Description copied from interface:
IGestureListViewListener
- An item view is being drawn (or re-drawn) on screen. The implementation
should correctly set the view contents, based on the model object. The
model object is taken from the
GesturesListView.getModel()
list.
The only exception is the EOP special item. For more information please
read here
.
- Parameters:
listView
- the listview containing the viewitemView
- the view representing a single itemindex
- the index in the GesturesListView.getModel()
list. May
point outside of the model list only when drawing an EOP item.model
- The model object, taken from the
GesturesListView.getModel()
list. This value may
optionally be the MutableListAdapter.EOP_MODEL_MARKER
object - in this case the special EndOfPlaylist item must be
drawn.
Copyright © 2007-2008. All Rights Reserved.