Unit3 MAD
Unit3 MAD
S.M.Sabireen
User Interface Screen Elements
User Interface Screen Elements:
• These are the fundamental building blocks you use to create the
visual interface of your Android app. Think of them as the widgets
and components the user interacts with.
example:
Views: The most basic UI component. Everything you see
on the screen inherits from the View class.
Examples:
•Toolbars/Action Bars: At the top of the screen, often containing the app title,
navigation, and actions.
.
•Notifications: Alerts displayed outside the app to inform the user of events.
LinearLayout:
Arranges views in a single row or column. Useful for simple, linear
layouts. You can control the orientation (vertical or horizontal) and
gravity (alignment within the parent).
• RelativeLayout: Positions views relative to each other or the
parent container. Provides more flexibility than LinearLayout but
can become complex for very intricate layouts. Uses rules like below, above,
toLeftOf, etc.
Constraint Layout:
• A very powerful and flexible layout. Similar to RelativeLayout but
uses constraints to define relationships between views.
• Arranges views in a grid (rows and columns). Good for displaying data
in a tabular format.
Coordinator Layout:
Designed for coordinating the behavior of multiple views,
especially with the use of components like the AppBarLayout (for
toolbars that collapse and expand). Often used for complex UI interactions.
Ex:
•AppBarLayout (to handle toolbar animations)
•CollapsingToolbarLayout (to shrink and expand toolbars)
•FloatingActionButton (FAB) (to move or hide the button when scrolling
• Canvas
• Paint
• Path
to create your own visual elements. This is useful for creating unique UI
components or for custom visualizations.
Animation:
Lottie Animations:
Allows you to easily integrate complex vector-based animations into
your app. These animations are created using Adobe After Effects and
exported in a JSON format. Lottie handles rendering them natively.
MotionLayout:
• A powerful layout type for creating complex, choreographed
animations and transitions. It integrates well with ConstraintLayout
and is often used for creating smooth and engaging UI experiences.
*Building Android UIs involves selecting and arranging the appropriate
screen elements using layouts.
*Adding custom drawing and animations can enhance the visual appeal
and user engagement.
*ConstraintLayout is the recommended layout for most cases. Property
Animations and
*MotionLayout offer the most flexibility for complex animations. Lottie
is great for integrating pre-made vector animations.
End