Activities and UI Widgets

Harry · 11 Sep 2026 · 10 views

Activities

An Activity represents one screen. The launcher activity is declared in the manifest and can start further activities with intents.

First activity running

Tabs and ViewFlipper

TabHost groups screens; a ViewFlipper animates between child views.

Tabs example first tab

Tabs example second tab

Common Widgets

  • ToggleButton - on/off switch.
  • AutoCompleteTextView - text entry with suggestions.
  • DatePicker - date selection.
  • ColorPicker / SeekBar - visual choices and sliders.

Toggle button example

Auto complete example

Date picker example

Color picker example

Sliders and Flippers

A slider/SeekBar drives a changing value; a flipper shows the next screen.

Slider first state

Slider second state

ViewFlipper first view

ViewFlipper second view

Key Points

  • Activities plus widgets combine into real screens instantly.
  • Use intents to navigate; adapters feed lists and auto-completes.
  • Small demo apps are the fastest way to learn a widget.
Share this post:

Comments (0)

Please login or register to comment.