> Is it possible to disable a button on a Cupcake desktop widget?

Not directly, but you could send a widget update that swaps out the
drawable used and clears the PendingIntent.  Or, keep two buttons in
your layout, and visible/gone them as needed.


> The current Google Search widget disables the search button until a
> user enters text, then the button is disabled.  Is this only allowed
> for "special widgets", or is there an approach available to third-
> party widgets?

The Google Search bar on the desktop looks and feels like a widget,
but it isn't a real widget.  It lives directly in the Launcher app,
which is how it does things like auto completion.  Other
AppWidgetHosts are free to include their custom elements like this:

http://d.android.com/reference/android/appwidget/AppWidgetManager.html#EXTRA_CUSTOM_INFO


> More generally, is there a list somewhere of the allowed / disallowed
> calls to widget views via the RemoteViews.set<Type>() approach?  I've
> also encountered that "setSelected" and some others are not allowed.

The allowed methods are simply marked with the @RemotableViewMethod
annotation, here's a quick grep across the Cupcake tree:

http://pastebin.com/f45b5130a


-- 
Jeff Sharkey
jshar...@android.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to