24 Dec 2022

132

How to Use Fragments in Android App Development

Format: APA

Academic level: College

Paper type: Critical Thinking

Words: 442

Pages: 1

Downloads: 0

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. 

It’s time to jumpstart your paper!

Delegate your assignment to our experts and they will do the rest.

Get custom essay

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." 

Illustration
Cite this page

Select style:

Reference

StudyBounty. (2023, September 15). How to Use Fragments in Android App Development.
https://studybounty.com/how-to-use-fragments-in-android-app-development-critical-thinking

illustration

Related essays

We post free essay examples for college on a regular basis. Stay in the know!

Security Implication of the Internet of Things

The Internet of Things (IoT) can be described as s system of interconnected devices that have the ability to transfer information over a computer network without the need of human-to-computer or human-to-human...

Words: 892

Pages: 3

Views: 97

Modern Day Attacks Against Firewalls and VPNs

Introduction The need to have an enhanced security of the computer connectivity happens to be one of the reasons that attract companies and organizations towards wide usage of VPNs. Several simple techniques...

Words: 2025

Pages: 7

Views: 135

How to Deploy and Administer Windows Server 2012

Securing a reliable, and expandable configuration for a company is important to build a strong network. The new and enhanced features of the Windows Server 2012 can be used to implement the network. In this...

Words: 1673

Pages: 6

Views: 88

Deployment Model in Cloud Computing

Deployment model is a representation of a cloud environment primarily distinguished by parameters such as accessibility, proprietorship, and storage size. The National Institute of Standards and Technology gives the...

Words: 254

Pages: 1

Views: 82

How to Use Web Search Engines for Business Research

The advancement of technology has made it possible for many people around the world to have easy access to information whenever they want. The development of the Wide World Web-enabled different kinds of information...

Words: 773

Pages: 3

Views: 87

Distributed Database Management System (DDBMS)

Introduction Data management has been a headache to many technology enthusiasts for quite a long period of time. They have successfully managed to logically collect interrelated data and share it. If the data is...

Words: 799

Pages: 3

Views: 128

illustration

Running out of time?

Entrust your assignment to proficient writers and receive TOP-quality paper before the deadline is over.

Illustration