Scrollable App widgets are included in ICS and honeycomb ...for example the mail widget and bookmark widget
I want to code a custom scrollable widget for me for ICS ...
But I am unable to find any source and references..please suggest
App Widgets can be used with collections: http://developer.android.com/guide/topics/appwidgets/index.html#collections
For example android.widget.ListView and android.widget.GridView
Related
I looked up this library which lets the developer overlay the app icon with a badge. Can it be used to overlay a widget? Is there any other coffee example that lets you overlay a widget with badge as simply as this?
Thanks
This won't work on widgets. Widgets implement their on view so no luck here.
i'm developing a SMS Widget.So came to across messages-widget
When i tried to replicate, the scroll feature is not available to that widget.
when i surfed, results where http://stackoverflow.com/questions/3879748/scrollable-textview-in-android-widget
Note i'm using Android 2.2 API Level 8.
Can anyone tell me how textview is scrollable with that opensource coding.
Is it possible to make a scrollable textview in widget ?
The link you provided is not a scrollable widget. It has buttons to move to the next/previous message.
HTC (and maybe others) have scrollable widgets, but it's their own implementation.
Scrollable widgets (with ListView and GridView) are available in Android 3.0+ (API 11+).
I m trying to show map in android widget . But as far as i see there is no mapview in android widget. Anybody please tell me is there any possible way to display a map in android widget?
a Mapview is NOT a view that is supported in a widget. As can be noted here:
http://developer.android.com/guide/topics/appwidgets/index.html
Creating the App Widget layout is simple if you're familiar with XML
Layouts. However, you must be aware that App Widget layouts are based
on RemoteViews, which do not support every kind of layout or view
widget.
A RemoteViews object (and, consequently, an App Widget) can support
the following layout classes:
FrameLayout
LinearLayout
RelativeLayout
And the following widget classes:
AnalogClock
Button
Chronometer
ImageButton
ImageView
ProgressBar
TextView
ViewFlipper
ListView
GridView
StackView
AdapterViewFlipper
Descendants of these classes are not supported.
You can use simple ImageView with Static Maps API and draw over returned image from Google Maps. It's not exactly Google Maps, but it's extremely light weight (which is perfect for app widgets).
If you are app developer, there is no way.
If you can modify the framework, you can.
I'm trying to realize an Android home screen widget. I am interested to know why I should use RemoteViews in implementing widgets?
Refer this link site.
Creating the App Widget layout is simple if you're familiar with Declaring Layout in XML. However, you must be aware that App Widget layouts are based on RemoteViews, which do not support every kind of layout or view widget.
A RemoteViews object (and, consequently, an App Widget) can support the following layout classes:
FrameLayout
LinearLayout
RelativeLayout
And the following widget classes:
AnalogClock
Button
Chronometer
ImageButton
ImageView
ProgressBar
TextView
Descendants of these classes are not supported.
Most of the time Widget is hosted within another application, like Launcher, which is run within that parent application's process.
RemoteViews describes a view hierarchy that can be displayed in another process. The hierarchy is inflated from a layout resource file, and this class provides some basic operations for modifying the content of the inflated hierarchy.
The main reason behind this choice is related to security and performance.
RemoteViews is used for the app widgets. They are part of separate process but bind to the main process i.e. why when we click over widgets it redirects to the associated application with more detailed information.
The Samsung Galaxy S includes the custom widget "Buddies Now". This widget implements a carousel that can be rotated with a a press-drag. Here's a description of the widget:
http://www.phonescoop.com/articles/article.php?a=389&p=2830&g=3054&h=25816
This widget exhibits features not commonly seen in other widgets: animated images and interactivity beyond a simple click. Does this widget take advantage of Samsung's custom launcher (TwLauncher), or is it a standard widget? If it is a standard widget, what API does it use for the animation and interactivity?
It's using Samsung's custom launcher to provide those features.
To see what can/can't be done with app widgets currently look here: http://developer.android.com/guide/topics/appwidgets/index.html
Specifically this section:
A RemoteViews object (and,
consequently, an App Widget) can
support the following layout classes:
FrameLayout
LinearLayout
RelativeLayout
And the following
widget classes:
AnalogClock Button Chronometer
ImageButton ImageView ProgressBar
TextView
So you don't have the UI components at your disposal when creating app widgets to design something with that level of interactivity. Not if you are targeting the stock launcher anyway.
However, from what I've seen of the Android 3.0 SDK, I think this level of interactivity will be possible on the stock Android 3.0 (Honeycomb) launcher.