0% found this document useful (0 votes)
26 views27 pages

CH03MAD

The document outlines the components and layouts essential for mobile application development, specifically within the context of Android. It covers the roles of Activities, Services, Content Providers, and Broadcast Receivers, along with the directory structure of an Android project and various layout types such as Linear, Absolute, and Relative Layouts. Additionally, it emphasizes the importance of the AndroidManifest.xml file and includes details on UI design fundamentals and interface elements.

Uploaded by

kambleyamini15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views27 pages

CH03MAD

The document outlines the components and layouts essential for mobile application development, specifically within the context of Android. It covers the roles of Activities, Services, Content Providers, and Broadcast Receivers, along with the directory structure of an Android project and various layout types such as Linear, Absolute, and Relative Layouts. Additionally, it emphasizes the importance of the AndroidManifest.xml file and includes details on UI design fundamentals and interface elements.

Uploaded by

kambleyamini15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

YASHWANTRAO CHAVAN POLYTECHNIC

ICHALKARANJI

DEPARTMENT : COMPUTER SCIENCE AND ENGINEERING

CLASS : TY CSE

SUBJECT : Mobile Application Development(22617)


TOPIC NO.3–Components and Layouts(8Marks)

FACULTY NAME: Ms. S. B. Ketkale

YASHWANTRAO CHAVAN POLYTECHNIC


ICHALKARANJI
• Unit Outcomes
• Describe Function of the given Components to operate the
specified IDE
• Explain the given term related to virtual machine.
• Explain the given basic term related to android development
tools
• Describe the features of given android emulator.
• Describe the steps to configure the given android development
environment.
• Control Flow,
• Directory Structure,
• Components of screen ,
• Fundamentals of UI design
• Linear Layout
• Absolute layout,
• Frame Layout,
• Table Layout ,
• Relative Layout.
• Control Flow
• Activities
• Activities are said to be the presentation layer of our applications. The UI of our
application is built around one or more extensions of the Activity class. By using
Fragments and Views, activities set the layout and display the output and also
respond to the user’s actions. An activity is implemented as a subclass of class
Activity.
• Syntax- public class MainActivity extends Activity { }

• Services
• Services are like invisible workers of our app. These components run at the
backend, updating your data sources and Activities, triggering Notification, and
also broadcast Intents. They also perform some tasks when applications are not
active. A service can be used as a subclass of class Service.
• public class ServiceName extends Service { }
• Content Providers
• It is used to manage and persist the application data also typically interacts
with the SQL database. They are also responsible for sharing the data
beyond the application boundaries. The Content Providers of a particular
application can be configured to allow access from other applications, and
the Content Providers exposed by other applications can also be
configured.
• Syntax-public class contentProviderName extends ContentProvider { public void
onCreate(){} }
• Broadcast Receiver
• They are known to be intent listeners as they enable your application to
listen to the Intents that satisfy the matching criteria specified by us.
Broadcast Receivers make our application react to any received Intent
thereby making them perfect for creating event-driven applications.
• Directory structure
• some important files/folders, and their for the easy understanding of the Android studio work
environment are shown in following figure.
• AndroidManifest.xml:
• Every project in Android includes a manifest file,
which is AndroidManifest.xml, stored in the root directory
of its project hierarchy.

• The manifest file is an important part of our app because it


defines the structure and metadata of our application, its
components, and its requirements.

• This file includes nodes for each of the Activities, Services,


Content Providers and Broadcast Receiver that make the
application and using Intent Filters and Permissions,
determines how they co-ordinate with each other and other
applications.
•Java:

•The Java folder contains the Java source code files.


These files are used as a controller for controlled UI
(Layout file). It gets the data from the Layout file and
after processing that data output will be shown in the
UI layout. It works on the backend of an Android
application.
•drawable:

•A Drawable folder contains resource type file


(something that can be drawn). Drawables may take a
variety of file like Bitmap (PNG, JPEG), Nine Patch,
Vector (XML), Shape, Layers, States, Levels, and Scale.
•layout:
A layout defines the visual structure for a user
interface, such as the UI for an Android application.
This folder stores Layout files that are written in
XML language.
Layout types are linear layout, Absolut layout,
constraint layout, frame layout,table & relative
layout
• build.gradle(Module: app):
This defines the module-specific build configurations. Here you
can add dependencies what you need in your Android
application.
•mipmap:

•Mipmap folder contains the Image Asset file that can


be used in Android Studio application. You can
generate the icon types like Launcher icons, Action
bar and tab icons, and Notification icons.

•colors.xml:

•colors.xml file contains color resources of the Android


application. Different color values are identified by a
unique name that can be used in the Android
application program.
strings.xml:

The strings.xml file contains string resources of the Android application. The
different string value is identified by a unique name that can be used in the Android
application program. This file also stores string array by using XML language.
Below is a sample strings.xml file:

styles.xml:
The styles.xml file contains resources of the theme style in the Android application.
This file is written in XML language.
• 3.2 Components of a screen
•Application components are the essential building blocks of an
Android application. These components are loosely coupled by the
application manifest file AndroidManifest.xml that describes each
component of the application and how they interact.

•Interface elements include but are not limited to:


•Input Controls: checkboxes, radio buttons, dropdown lists, list
boxes, buttons, toggles, text fields, date field
•Navigational Components: breadcrumb, slider, search field,
pagination, slider, tags, icons
•Informational Components: tooltips, icons, progress bar,
notifications, message boxes, modal windows
•Containers: accordion
• fundamental UI design
• Views- Views are the basic User Interface class
for visual interface elements (commonly
known as controls or widgets). All User
Interface controls, and the layout classes, are
derived from Views
•ViewGroups- View Groups are extensions of the
View class that can contain multiple child Views.
By extending the ViewGroup class, you can
create compound controls that are made up of
interconnected child Views. The ViewGroup class
is also extended to provide the layout
managers, such as LinearLayout, that help
you compose User Interfaces
•There are many types of layout. Some
of which are listed below −

Linear Layout

Absolute Layout

Table Layout

Frame Layout
Relative Layout
•Linear layout
•Linear layout is further divided into horizontal and vertical
layout. It means it can arrange views in a single column or in a
single row. Here is the code of linear layout(vertical) that
includes a text view.
•A layout that organizes its children into a single horizontal or
vertical row. It creates a scrollbar if the length of the window
exceeds the length of the screen
•AbsoluteLayout
•The AbsoluteLayout enables you to specify the exact location of
its children. It can be declared like this.
•<AbsoluteLayout
•android:layout_width=”fill_parent”
android:layout_height=”fill_parent” xmlns:android=”http://sch
emas.android.com/apk/res/android” >
•<Button
android:layout_width=”188d
p”
•android:layout_height=”wrap_content”
android:text=”Button” android:layout_x=”126px”
android:layout_y=”361px” />
•</AbsoluteLayout>
• RelativeLayout
• RelativeLayout enforces to display
elements in relations to each other.
You can specify that, for instance,
one UI element can be said to be
placed on the left of another
element, or on the bottom of another
etc. Each UI element can also be
positioned according to the layout’s
borders (e.g. aligned to the right)

You might also like