What distinguishes a widget from an app or a shortcut? I can understand the concept of an app, as something that runs on Android to provide a particular use or function. I can also understand the concept of a shortcut, to provide a way of accessing an app.
Is a widget a special type of app or a special type of shortcut or is it characterised in a way that is distinct from both an app and a shortcut?
Answer
There are two different kinds of Widget in Android:
- AppWidget: a small view of an application (e.g. Weather widget) that can be embedded inside another application (e.g. Home Screen)
- GUI Widget: buttons, textbox, etc; any visual interface element.
I believe you're talking about the former (AppWidget). An AppWidget always belongs to an App. An App that acts as a AppWidgetHost (e.g. HomeScreen apps) can lend a part of its UI to be managed by the App that provides an AppWidget.
In short, it is a way of embedding an application inside another application.
An AppWidget is usually used as a "smart shortcut"; a shortcut that provides additional logic other than just being clickable and launching an Activity. Typical examples of AppWidget is Recent Email/SMS/Facebook/Twitter/whatever-your-favorite-messaging-app Widgets, Astrid's Task List, Calendar Widget, etc.
An AppWidget is conceptually a GUI Widget, except that AppWidget is a GUI Widget that is not provided by Android's framework, instead it is provided by some other application installed in the system.
No comments:
Post a Comment