1.

What is View Group? How are they different from Views

Answer»

View is a BASIC building block of UI (User Interface) in android. A view is a small rectangular box which responds to user inputs. For example, a Text View is used to display some text to the user that is a subclass of View. In Android, we are using many View subclass like EditText, Button, CheckBox, Radio Button, ImageView, DatePicker etc.

ViewGroup is an invisible container of other child view. ViewGroup is a special kind of view which is extended from View as its base CLASS. ViewGroup is the base class for LAYOUTS. Viewgroups can contain other views in it. For example LinearLayout, it is a group of many views those are arranging in LINEAR or Veridical way.  In Android, we have other layouts as well like Relative Layout, Table Layout, Frame Layout etc.



Discussion

No Comment Found

Related InterviewSolutions