Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between Views and widgets?

Tags:

android

If I am not wrong, View is the superclass for all widgets, but how do I differentiate between a View and a widget? For example, a button or a text box, what should I call them (a View or a widget)?

like image 900
Nav Avatar asked Jan 17 '12 18:01

Nav


1 Answers

Calling them either is fine.

I tend to use the term "widget" for subclasses of View that have a visual representation to the user by default -- things like TextView, Button, ListView, etc.

I tend to use the term "view" for something that could be any subclass of View, including pure containers like LinearLayout.

But, again, there is no particular harm in referring to them by either term.

like image 170
CommonsWare Avatar answered Nov 15 '22 07:11

CommonsWare