public static interface RemoteViewsService.RemoteViewsFactory
Adapter
.Adapter
,
AppWidgetManager
Modifier and Type | Method and Description |
---|---|
int |
getCount()
|
long |
getItemId(int position)
|
RemoteViews |
getLoadingView()
This allows for the use of a custom loading view which appears between the time that
getViewAt(int) is called and returns. |
RemoteViews |
getViewAt(int position)
|
int |
getViewTypeCount()
|
boolean |
hasStableIds()
|
void |
onCreate()
Called when your factory is first constructed.
|
void |
onDataSetChanged()
Called when notifyDataSetChanged() is triggered on the remote adapter.
|
void |
onDestroy()
Called when the last RemoteViewsAdapter that is associated with this factory is
unbound.
|
void onCreate()
void onDataSetChanged()
void onDestroy()
int getCount()
RemoteViews getViewAt(int position)
Adapter.getView(int, android.view.View, android.view.ViewGroup)
.
Note: expensive tasks can be safely performed synchronously within this method, and a
loading view will be displayed in the interim. See getLoadingView()
.position
- The position of the item within the Factory's data set of the item whose
view we want.RemoteViews getLoadingView()
getViewAt(int)
is called and returns. If null is returned, a default loading
view will be used.int getViewTypeCount()
long getItemId(int position)
position
- The position of the item within the data set whose row id we want.boolean hasStableIds()