From 592d0650d5bfc673082c4e58ac8ba2dc3103c842 Mon Sep 17 00:00:00 2001 From: Joe Onorato <> Date: Tue, 24 Mar 2009 22:25:52 -0700 Subject: [PATCH] Automated import from //branches/donutburger/...@142301,142301 --- core/java/android/widget/RemoteViews.java | 87 +++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java index e000d2e22781e..7936f6535d9f0 100644 --- a/core/java/android/widget/RemoteViews.java +++ b/core/java/android/widget/RemoteViews.java @@ -669,50 +669,137 @@ public class RemoteViews implements Parcelable, Filter { setInt(viewId, "setTextColor", color); } + /** + * Call a method taking one boolean on a view in the layout for this RemoteViews. + * + * @param viewId The id of the view whose text should change + * @param methodName The name of the method to call. + * @param value The value to pass to the method. + */ public void setBoolean(int viewId, String methodName, boolean value) { addAction(new ReflectionAction(viewId, methodName, ReflectionAction.BOOLEAN, value)); } + /** + * Call a method taking one byte on a view in the layout for this RemoteViews. + * + * @param viewId The id of the view whose text should change + * @param methodName The name of the method to call. + * @param value The value to pass to the method. + */ public void setByte(int viewId, String methodName, byte value) { addAction(new ReflectionAction(viewId, methodName, ReflectionAction.BYTE, value)); } + /** + * Call a method taking one short on a view in the layout for this RemoteViews. + * + * @param viewId The id of the view whose text should change + * @param methodName The name of the method to call. + * @param value The value to pass to the method. + */ public void setShort(int viewId, String methodName, short value) { addAction(new ReflectionAction(viewId, methodName, ReflectionAction.SHORT, value)); } + /** + * Call a method taking one int on a view in the layout for this RemoteViews. + * + * @param viewId The id of the view whose text should change + * @param methodName The name of the method to call. + * @param value The value to pass to the method. + */ public void setInt(int viewId, String methodName, int value) { addAction(new ReflectionAction(viewId, methodName, ReflectionAction.INT, value)); } + /** + * Call a method taking one long on a view in the layout for this RemoteViews. + * + * @param viewId The id of the view whose text should change + * @param methodName The name of the method to call. + * @param value The value to pass to the method. + */ public void setLong(int viewId, String methodName, long value) { addAction(new ReflectionAction(viewId, methodName, ReflectionAction.LONG, value)); } + /** + * Call a method taking one float on a view in the layout for this RemoteViews. + * + * @param viewId The id of the view whose text should change + * @param methodName The name of the method to call. + * @param value The value to pass to the method. + */ public void setFloat(int viewId, String methodName, float value) { addAction(new ReflectionAction(viewId, methodName, ReflectionAction.FLOAT, value)); } + /** + * Call a method taking one double on a view in the layout for this RemoteViews. + * + * @param viewId The id of the view whose text should change + * @param methodName The name of the method to call. + * @param value The value to pass to the method. + */ public void setDouble(int viewId, String methodName, double value) { addAction(new ReflectionAction(viewId, methodName, ReflectionAction.DOUBLE, value)); } + /** + * Call a method taking one char on a view in the layout for this RemoteViews. + * + * @param viewId The id of the view whose text should change + * @param methodName The name of the method to call. + * @param value The value to pass to the method. + */ public void setChar(int viewId, String methodName, char value) { addAction(new ReflectionAction(viewId, methodName, ReflectionAction.CHAR, value)); } + /** + * Call a method taking one String on a view in the layout for this RemoteViews. + * + * @param viewId The id of the view whose text should change + * @param methodName The name of the method to call. + * @param value The value to pass to the method. + */ public void setString(int viewId, String methodName, String value) { addAction(new ReflectionAction(viewId, methodName, ReflectionAction.STRING, value)); } + /** + * Call a method taking one CharSequence on a view in the layout for this RemoteViews. + * + * @param viewId The id of the view whose text should change + * @param methodName The name of the method to call. + * @param value The value to pass to the method. + */ public void setCharSequence(int viewId, String methodName, CharSequence value) { addAction(new ReflectionAction(viewId, methodName, ReflectionAction.CHAR_SEQUENCE, value)); } + /** + * Call a method taking one Uri on a view in the layout for this RemoteViews. + * + * @param viewId The id of the view whose text should change + * @param methodName The name of the method to call. + * @param value The value to pass to the method. + */ public void setUri(int viewId, String methodName, Uri value) { addAction(new ReflectionAction(viewId, methodName, ReflectionAction.URI, value)); } + /** + * Call a method taking one Bitmap on a view in the layout for this RemoteViews. + * @more + *
The bitmap will be flattened into the parcel if this object is + * sent across processes, so it may end up using a lot of memory, and may be fairly slow.
+ * + * @param viewId The id of the view whose text should change + * @param methodName The name of the method to call. + * @param value The value to pass to the method. + */ public void setBitmap(int viewId, String methodName, Bitmap value) { addAction(new ReflectionAction(viewId, methodName, ReflectionAction.BITMAP, value)); }