Working with Fragments in Androids App Development subclasses in the views group class provides a unique way to display the fragment views. The fragments are nested within the common layout types of the Androids Apps that are built on the android platform (Griffiths & Griffiths, 2015) . The layouts created when a developer utilizes the fragment option in the android design library are relative layout, table layout, and absolute layout.
Relative layout
In the relative view group that displays child views in relative positions, the position of each view can be specified as relative sibling elements. As such the elements appear on the left or below another view or position relative to the parent bottom left or center. As noted by Burd, (2015), the relative layout is powerful for designing a user interface because it can eliminate nested user groups and keep layout hierarchy flat thus improves performance replaces linear layout.
Delegate your assignment to our experts and they will do the rest.
Components
Android: id this is the id that uniquely identifies the layout
Android: gravity: this specifies how an object should position the content on both X and Y axes possible values are top bottom left right-center center-vertical, and center-horizontal.
Android: ignore Gravity: this indicates what view should not be affected by gravity.
Usage of the Components
When using relative layout one aligns two elements by right border or make one below the other, centered left .by default all child views are drawn to the top left of the layout so one must define the position of each view using the virus layout properties available from relativelayout.layoutparams and few important attributes or components.table a children layout.
Table layout
Table layout is a view that groups view into rows and columns. A table layout consists of a number of table row objects where each defining a row can have another child .table row containers do not display border lines for their rows columns or cells.
.
Components
Android: id this is the unique identifier of the layout
Android: collapsecollumns: this specifies the zero based index of the columns to collapse the column indices must be separate
Android:shrinkcolumns:the zero based index of the columns to shrink the column indeces they must be separated by a comma
Android: stechcolumns: this stretch the columns indices they must be separated by a comma
Absolute layout
Absolute layout enables you to specify the exact location of its children it consists of a number of table rows and columns using the x and y coordinates of its children they are less flexible and harder to maintain than other types of layouts without absolute positioning
Components
Android: id: this uniquely identifies the layout
Android: layout_x: this specifies the coordinate if the view
Android: Layout_y: this specifies the y coordinate
Usage of the Components
When one has an element in the Absolute position you can control it's because the important feature is the position in conjunction with the z index property is used to control the stacking order.
Reference
Burd, B. (2015). Android application development all-in-one for dummies . John Wiley & Sons.
Griffiths, D., & Griffiths, D. (2015). Head First Android Development (p. 166). "O'Reilly Media, Inc."