RemoteViews.RemoteResponse
public
static
class
RemoteViews.RemoteResponse
extends Object
Class representing a response to an action performed on any element of a RemoteViews.
Summary
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Public constructors
RemoteResponse
public RemoteResponse ()
Public methods
addSharedElement
public RemoteViews.RemoteResponse addSharedElement (int viewId,
String sharedElementName)
Adds a shared element to be transferred as part of the transition between Activities
using cross-Activity scene animations. The position of the first element will be used as
the epicenter for the exit Transition. The position of the associated shared element in
the launched Activity will be the epicenter of its entering Transition.
Parameters |
viewId |
int : The id of the view to be shared as part of the transition |
sharedElementName |
String : The shared element name for this view
This value cannot be null . |
fromFillInIntent
public static RemoteViews.RemoteResponse fromFillInIntent (Intent fillIntent)
When using collections (eg. ListView
, StackView
etc.) in widgets, it is
very costly to set PendingIntents on the individual items, and is hence not recommended.
Instead a single PendingIntent template can be set on the collection, see RemoteViews.setPendingIntentTemplate(int, android.app.PendingIntent)
, and the individual on-click
action of a given item can be distinguished by setting a fillInIntent on that item. The
fillInIntent is then combined with the PendingIntent template in order to determine the
final intent which will be executed when the item is clicked. This works as follows: any
fields which are left blank in the PendingIntent template, but are provided by the
fillInIntent will be overwritten, and the resulting PendingIntent will be used. The rest
of the PendingIntent template will then be filled in with the associated fields that are
set in fillInIntent. See Intent#fillIn(Intent, int)
for more details.
Creates a response which sends a pending intent as part of the response. The source
bounds (Intent#getSourceBounds()
) of the intent will be set to the bounds of the
target view in screen space.
Note that any activity options associated with the mPendingIntent may get overridden
before starting the intent.
Parameters |
fillIntent |
Intent : The intent which will be combined with the parent's PendingIntent in
order to determine the behavior of the response
This value cannot be null . |
fromPendingIntent
public static RemoteViews.RemoteResponse fromPendingIntent (PendingIntent pendingIntent)
Creates a response which sends a pending intent as part of the response. The source
bounds (Intent#getSourceBounds()
) of the intent will be set to the bounds of the
target view in screen space.
Note that any activity options associated with the mPendingIntent may get overridden
before starting the intent.
Parameters |
pendingIntent |
PendingIntent : The PendingIntent to send as part of the response
This value cannot be null . |