Posts

Showing posts from January, 2012

Android - Views, Layouts

Image
Android - What are Views, Layouts? This class represents the basic building block for user interface components. A View occupies a rectangular area on the screen and is responsible for drawing and event handling. View is the base class for   widgets , which are used to create interactive UI components (buttons, text fields, etc.). The ViewGroup   subclass is the base class for   layouts , which are invisible containers that hold other Views (or other ViewGroups) and define their layout properties. Using Views All of the views in a window are arranged in a single tree. You can add views either from code or by specifying a tree of views in one or more XML layout files. There are many specialized subclasses of views that act as controls or are capable of displaying text, images, or other content. Once you have created a tree of views, there are typically a few types of common operations you may wish to perform: Set properties:   for example set...