Selasa, 16 Mei 2017

View & View Group

Views and View Groups

Every item in a user interface is a subclass of the Android View class (to be precise android.view.View). The Android SDK provides a set of pre-built views that can be used to construct a user interface. Typical examples include standard items such as Button, CheckBox, ProgressBar and TextView classes. Such views are also as referred to as widgets. For requirements that are not updated by the SDK, new views may be created by subclassing and extending an existing class, or creating an entirely new component by building directly on top of the View class.

A view can also be comprised of some other views (otherwise known as a composite view). Such views are subclassed from the Android ViewGroup class (android.view.ViewGroup) which is itself a subclass of View. An example of such a view is the RadioGroup, which is meant to contain multiple RadioButton objects such as the one that can be in the "on" position at any one time. In terms of structure, composite views consist of a single view parent view (derived from the ViewGroup class and otherwise known as a container view or root element) that is capable of containing other views (known as child views). Another category of ViewGroup based container view is that of the layout manager.

Tidak ada komentar:

Posting Komentar