Skip to content
AD-703 (B) · Mobile Application Development/Quick Revision Short Notes

Mobile Application Development (AD-703 (B)) - Unit 3 Short Notes

How unit 3 is examined

This unit covers screen elements (views and widgets), layouts and animation; no past question has been asked on any of them, so learn the definitions and the class names.

User Interface Screen elements

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. <mark>A View is the basic building block of an Android UI: a rectangular screen area that draws itself and handles user events, and widgets such as TextView, EditText, Button and ImageView are its subclasses.</mark>

Key points.

  1. TextView displays text and EditText is its editable form for user input.
  2. Button, CheckBox, RadioButton and Spinner take user choices, and each fires a listener such as onClick.
  3. ImageView shows pictures, and ListView or RecyclerView shows scrolling lists.
  4. Views are declared in XML with attributes like android:id, android:text, layout_width and layout_height, and are fetched in code with findViewById().

Designing User Interfaces with Layouts

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. <mark>A layout is a ViewGroup, an invisible container that defines how its child views are arranged on the screen.</mark>

Key points.

  1. LinearLayout places children in one row or column, set by android:orientation.
  2. RelativeLayout positions children relative to each other or to the parent.
  3. ConstraintLayout positions views with constraints to siblings and the parent, giving a flat, efficient hierarchy.
  4. FrameLayout stacks children on top of each other, and TableLayout arranges them in rows and columns.
  5. match_parent fills the parent, wrap_content fits the content, and layout_weight shares leftover space.

Drawing and Working with Animation

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. <mark>Android animation changes a view's properties such as position, size, rotation or transparency over time, and drawing is done by painting shapes and bitmaps on a Canvas with a Paint object.</mark>

Key points.

  1. Frame (drawable) animation plays a sequence of images one after another using AnimationDrawable.
  2. Tween (view) animation applies translate, scale, rotate and alpha to a view, defined in XML under res/anim.
  3. Property animation with ValueAnimator or ObjectAnimator changes any property of any object.
  4. Custom drawing overrides onDraw(Canvas) in a View, using Paint for colour and style.

Last-minute revision

  • A View is the basic UI block, and a ViewGroup (layout) is a container of views.
  • TextView shows text, EditText takes input, Button fires onClick.
  • findViewById() links an XML view to Java code.
  • LinearLayout is one row or column, set by orientation.
  • ConstraintLayout gives a flat hierarchy using constraints.
  • wrap_content fits content, match_parent fills the parent.
  • Frame animation plays images, tween animation transforms a view.
  • Tween types are translate, scale, rotate and alpha.
  • Custom drawing uses Canvas, Paint and onDraw().

Memory hooks

  • View is the brick, ViewGroup is the box of bricks.
  • Tween types spell STRA: Scale, Translate, Rotate, Alpha.
  • Frame animation is a flip-book, tween is a stretch of one picture.

Coverage checklist

  • User Interface Screen elements: no past questions.
  • Designing User Interfaces with Layouts: no past questions.
  • Drawing and Working with Animation: no past questions.
Go to where you left off?

Quick Add to Notes

Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.

Create free account

Have an account? Log in