What are viewgroups and their difference with views in android?

CWC
2 Min Read

When designing android application it is a requirement for a developer to understand what view groups are and their difference with views in android.here is what you have to know about views and view groups in android programming language and their differences

The android language views

Each item in a designed user interface is a subclass of the android view class just precisely known as “view”. The android SDK offers a set of pre-created views that can be applied to build a user interface. Common examples incorporate standard products such as the checkbox, TextView and button ProgressBar classes. These views are also known as widgets. For perquisites are not completed by the widgets provided with the SDK , new views may be built either by dividing classes and extending or modifying an prevailing class , or making an completely new component by creating directly on top the class of view.

View groups as applied in android programming

A view, on the other hand, can also be made of multiple other sub views .This kind of views is known as composite views. This kind of views is derived from subdividing android ViewGroup which is itself a subclass of existing views.

To give an example take the view such as RadioGroup which is anticipated to hold multiple RadioButton objects with the end goal that just a single can be in the “on” point at any one time. As far as structure, composite views comprise of a solitary parent view (got from the ViewGroup class and also called a compartment view or root component) that is equipped for containing different views (referred as child views). Another classification of ViewGroup based holder view is that of the layout manager.

Final note
Indeed the term view and ViewGroup in android is sometimes challenging and requires an expert to comprehend what it general means.

TAGGED:
Share This Article
1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

English
Exit mobile version