1

I found some conflicting definitions on the term. On http://developer.android.com/reference/android/view/View.html, the author defined widgets as "View is the base class for widgets, which are used to create interactive UI components (buttons, text fields, etc.)", bascially used to create interactive UI components. However on on another StackOverFlow question https://stackoverflow.com/questions/11911249/what-exactly-defines-a-widget, an answer was "application that can be interacted with from the home screen". My question is that in terms of android, does the term widget refer to the tool used to create the ui components or the ui components themselves? Can anyone clarify this?

1

1 Answer 1

5

I'm not surprised you're confused: the term is indeed used for two different things, as you've found.

For developers, a widget means a View: a single GUI control inside an activity, which can show information or be manipulated by the user. Examples include Button, TextView, and SeekBar.

The app component that lives on the home screen (or lock screen) is properly called an appwidget. Stock Android ships with appwidgets for the calendar and email apps, amongst others.

However, terms are used differently in user-facing documentation and labels. Views don't need to be described to the user, so the term widget is used for appwidgets, presumably because it's shorter. But because it's in the user-facing documentation, and app authors have to label their appwidgets as widgets, they tend to use the term widget for both, when it's possible to tell from context which is meant.

It's common for the same thing to be described differently to users and developers; the only confusion in this case is that the users' word for one thing is the same as the developers' word for something different. It's almost always clear which one is meant, because the two components are used in different circumstances: if you need to be unambiguous, you can say "View" or "appwidget".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .