Layout Fundamentals Android_UI

 

In this tutorial we use, What is Layout in Android? The layout defines the visual structure for UI – user interface. The layout declares in two ways:1: Declare UI elements in XML and 2: Instantiate layout elements at runtime. How to create Layout? The basic building block of UI is View object which is created from the view class. The view is the base class for widgets, which are used to create interactive UI components like buttons, text fields, etc. The ViewGroup in layout provides an invisible container that holds other Views and ViewGroups. It is a subclass of View. What is the type of Layout?? – Linear, Relative, Table, Absolute, Frame, ListView, GridView Layout. Attributes of Layout : ID, layout_width, layout_height, layout_marginTop, layout_marginBottom, layout_marginLeft, layout_marginRight, layout_gravity, layout_weight, layout_x, layout_y, paddingLeft, paddingRight, paddingTop, paddingBottom etc.


Leave a Reply

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