Most visited

Recently visited

Added in API level 11

RemoteViewsService

public abstract class RemoteViewsService
extends Service

java.lang.Object
    android.content.Context
      android.content.ContextWrapper
        android.app.Service
          android.widget.RemoteViewsService


要连接到远程适配器以请求RemoteView的服务。 用户应扩展RemoteViewsService以提供用于填充远程集合视图(ListView,GridView等)的相应RemoteViewsFactory。

摘要(Summary)

Nested classes

interface RemoteViewsService.RemoteViewsFactory

远程集合视图(ListView,GridView等)与该视图的基础数据之间的适配器接口。

Inherited constants

From class android.app.Service
From class android.content.Context
From interface android.content.ComponentCallbacks2

Public constructors

RemoteViewsService()

公共方法(Public methods)

IBinder onBind(Intent intent)

将通信信道返回给服务。

abstract RemoteViewsService.RemoteViewsFactory onGetViewFactory(Intent intent)

由派生的服务实施,为数据生成适当的工厂。

继承方法(Inherited methods)

From class android.app.Service
From class android.content.ContextWrapper
From class android.content.Context
From class java.lang.Object
From interface android.content.ComponentCallbacks2
From interface android.content.ComponentCallbacks

Public constructors

RemoteViewsService

Added in API level 11
RemoteViewsService ()

公共方法(Public methods)

onBind

Added in API level 11
IBinder onBind (Intent intent)

将通信信道返回给服务。 如果客户端无法绑定到服务,可能会返回null。 返回IBinder通常是一个复杂的界面已经described using aidl

请注意,与其他应用程序组件不同,此处返回的IBinder接口调用可能不会发生在进程的主线程上 有关主线程的更多信息可以在Processes and Threads中找到。

参数(Parameters)
intent Intent: The Intent that was used to bind to this service, as given to Context.bindService. Note that any extras that were included with the Intent at that point will not be seen here.
返回(Returns)
IBinder Return an IBinder through which clients can call on to the service.

onGetViewFactory

Added in API level 11
RemoteViewsService.RemoteViewsFactory onGetViewFactory (Intent intent)

由派生的服务实施,为数据生成适当的工厂。

参数(Parameters)
intent Intent
返回(Returns)
RemoteViewsService.RemoteViewsFactory

Hooray!