public abstract class

SCBaseControllerCursorAdapter

extends SCSectionCursorAdapter
java.lang.Object
   ↳ android.widget.BaseAdapter
     ↳ android.widget.CursorAdapter
       ↳ com.c2call.sdk.lib.controlfoundation.adapters.SCBaseSectionCursorAdapter
         ↳ com.c2call.sdk.lib.controlfoundation.adapters.SCSectionCursorAdapter
           ↳ com.c2call.sdk.pub.gui.core.adapter.SCBaseControllerCursorAdapter<T, M extends com.c2call.sdk.pub.gui.core.controller.IListItemController<T, ? extends com.c2call.sdk.pub.gui.core.controller.IListItemViewHolder>, F extends com.c2call.sdk.pub.gui.core.controller.IListItemControllerFactory<T, M>, D extends com.c2call.sdk.pub.gui.core.decorator.IDecorator<M>>
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

This is the base class for all lists within the C2Call SDK whose items are controlled by an IController

Summary

[Expand]
Inherited Constants
From class com.c2call.sdk.lib.controlfoundation.adapters.SCSectionCursorAdapter
From class com.c2call.sdk.lib.controlfoundation.adapters.SCBaseSectionCursorAdapter
From class android.widget.CursorAdapter
From interface android.widget.Adapter
[Expand]
Inherited Fields
From class com.c2call.sdk.lib.controlfoundation.adapters.SCBaseSectionCursorAdapter
Public Constructors
SCBaseControllerCursorAdapter(Context context, Cursor c, int itemLayout, String sortColName, F controllerFactory, SCViewDescription vd, int flags)
Instantiates a new SCBaseControllerCursorAdapter.
SCBaseControllerCursorAdapter(Context context, Cursor c, int itemLayout, int headerLayout, int headerLayoutTitleId, String sortColName, F controllerFactory, SCViewDescription vd, int flags)
Instantiates a new SCBaseControllerCursorAdapter.
SCBaseControllerCursorAdapter(Context context, Cursor c, int itemLayout, String sortColName, F controllerFactory, int flags)
Instantiates a new SCBaseControllerCursorAdapter.
Public Methods
void bindItemView(View view, Context context, Cursor cursor)
Binds data to an item view
View newItemView(Context context, Cursor cursor, ViewGroup parent)
Creates a new item view to use within a section.
synchronized void notifyDataSetChanged()
Clears out all section data before rebuilding it.
Protected Methods
abstract T onCreateData(Cursor cursor)
Creates a data object for the given cursor at the current cursor's position.
abstract D onCreateDecorator(M controller)
Creates a decorator for given controller.
SCViewDescription onCreateViewDescription(T data)
Creates a SCViewDescription for the given data
View onInflateView(LayoutInflater inflater, Cursor cursor, T data, ViewGroup parent)
Inflates a view for the given data.
M onNewController(Context context, View view, Cursor cursor, T data)
Called to create a new controller for a given data
void onUpdateView(M controller, View v, T data)
called in bindView(View, Context, Cursor) and after the controller took control of the item
[Expand]
Inherited Methods
From class com.c2call.sdk.lib.controlfoundation.adapters.SCSectionCursorAdapter
From class com.c2call.sdk.lib.controlfoundation.adapters.SCBaseSectionCursorAdapter
From class android.widget.CursorAdapter
From class android.widget.BaseAdapter
From class java.lang.Object
From interface android.widget.Adapter
From interface android.widget.Filterable
From interface android.widget.ListAdapter
From interface android.widget.SectionIndexer
From interface android.widget.SpinnerAdapter

Public Constructors

public SCBaseControllerCursorAdapter (Context context, Cursor c, int itemLayout, String sortColName, F controllerFactory, SCViewDescription vd, int flags)

Instantiates a new SCBaseControllerCursorAdapter.

Parameters
context the context
c the cursor of this adapter
itemLayout the item layout
sortColName the cursor column this cursor is sorted by
controllerFactory the controller factory for the items
vd the view description of the items. May be null, if onCreateViewDescription(Object) is overridden
flags additional flags that will be passed to each item

public SCBaseControllerCursorAdapter (Context context, Cursor c, int itemLayout, int headerLayout, int headerLayoutTitleId, String sortColName, F controllerFactory, SCViewDescription vd, int flags)

Instantiates a new SCBaseControllerCursorAdapter.

Parameters
context the context
c the cursor of this adapter
itemLayout the item layout
headerLayout the section header layout
headerLayoutTitleId the TextView resource ID of the title within the headerLayout
sortColName the cursor column this cursor is sorted by
controllerFactory the controller factory for the items
vd the view description of the items. May be null, if onCreateViewDescription(Object) is overridden
flags additional flags that will be passed to each item

public SCBaseControllerCursorAdapter (Context context, Cursor c, int itemLayout, String sortColName, F controllerFactory, int flags)

Instantiates a new SCBaseControllerCursorAdapter. If using this constructor you should really override onCreateViewDescription(Object)!

Parameters
context the context
c the cursor of this adapter
itemLayout the item layout
sortColName the cursor column this cursor is sorted by
controllerFactory the controller factory for the items
flags additional flags that will be passed to each item

Public Methods

public void bindItemView (View view, Context context, Cursor cursor)

Binds data to an item view

Parameters
view Existing view, returned earlier by newView
context Interface to application's global information
cursor The cursor from which to get the data. The cursor is already moved to the correct position.

public View newItemView (Context context, Cursor cursor, ViewGroup parent)

Creates a new item view to use within a section.

Parameters
cursor The cursor from which to get the data. The cursor is already moved to the correct position.
parent The parent to which the new view is attached to

public synchronized void notifyDataSetChanged ()

Clears out all section data before rebuilding it.

Protected Methods

protected abstract T onCreateData (Cursor cursor)

Creates a data object for the given cursor at the current cursor's position. This data will be set in the items Controller

protected abstract D onCreateDecorator (M controller)

Creates a decorator for given controller. This decorator will be used to decorate the item.

Parameters
controller of the current item
Returns
  • a decortator.

protected SCViewDescription onCreateViewDescription (T data)

Creates a SCViewDescription for the given data

Parameters
data the data to create a SCViewDescription for
Returns

protected View onInflateView (LayoutInflater inflater, Cursor cursor, T data, ViewGroup parent)

Inflates a view for the given data. This method is called by newView(Context, Cursor, ViewGroup)

Parameters
inflater the inflater that is used the inflate the view
cursor the cursor and its current position to inflate a view for
data the result of onCreateData(Cursor)
parent the parent View where this view will be atteched to. May be null.

protected M onNewController (Context context, View view, Cursor cursor, T data)

Called to create a new controller for a given data

Parameters
context the context.
view the view that is needed to create a controller
cursor the cursor and its current position to create a controller for
data the data to create a controller for
Returns
  • a controller that will control the current item

protected void onUpdateView (M controller, View v, T data)

called in bindView(View, Context, Cursor) and after the controller took control of the item

Parameters
controller the controller of the item
v the view of the item
data the data of the item