IT. Expert System.

Android Reference

RemoteViewsService.RemoteViewsFactory


android.widget

Interface RemoteViewsService.RemoteViewsFactory

  • Enclosing class:
    RemoteViewsService


    public static interface RemoteViewsService.RemoteViewsFactory
    An interface for an adapter between a remote collection view (ListView, GridView, etc) and the underlying data for that view. The implementor is responsible for making a RemoteView for each item in the data set. This interface is a thin wrapper around Adapter.
    See Also:
    Adapter, AppWidgetManager
    • Method Detail

      • onCreate

        void onCreate()
        Called when your factory is first constructed. The same factory may be shared across multiple RemoteViewAdapters depending on the intent passed.
      • onDataSetChanged

        void onDataSetChanged()
        Called when notifyDataSetChanged() is triggered on the remote adapter. This allows a RemoteViewsFactory to respond to data changes by updating any internal references. Note: expensive tasks can be safely performed synchronously within this method. In the interim, the old data will be displayed within the widget.
        See Also:
        AppWidgetManager.notifyAppWidgetViewDataChanged(int[], int)
      • onDestroy

        void onDestroy()
        Called when the last RemoteViewsAdapter that is associated with this factory is unbound.
      • getViewAt

        RemoteViews getViewAt(int position)
        See 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().
        Parameters:
        position - The position of the item within the Factory's data set of the item whose view we want.
        Returns:
        A RemoteViews object corresponding to the data at the specified position.
      • getLoadingView

        RemoteViews getLoadingView()
        This allows for the use of a custom loading view which appears between the time that getViewAt(int) is called and returns. If null is returned, a default loading view will be used.
        Returns:
        The RemoteViews representing the desired loading view.
      • getViewTypeCount

        int getViewTypeCount()
        Returns:
        The number of types of Views that will be returned by this factory.
      • getItemId

        long getItemId(int position)
        Parameters:
        position - The position of the item within the data set whose row id we want.
        Returns:
        The id of the item at the specified position.
      • hasStableIds

        boolean hasStableIds()
        Returns:
        True if the same id always refers to the same object.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 3722 / . Delta: 0.03504 с