Zygote
How Android works

Input & windows

From a touch digit to a click handler, and how windows stack.

6 pages72 min6 interactive10000 words
  1. 01The input pipelineFrom a capacitive touch to a MotionEvent in your app: the kernel driver, InputReader, InputDispatcher, the InputChannel socket, and the timeout that turns a stalled app into an ANR.intermediate13 mininteractive
  2. 02Touch dispatch in the View treeDOWN goes down the tree, everything else goes up. onInterceptTouchEvent, onTouchEvent, the touch target, and the cancel that fires when an ancestor changes its mind.intermediate12 mininteractive
  3. 03Windows and WindowManagerWindows are the unit of z-order, focus and input routing. WindowManager decides where they go, what they contain, and which one gets the touch — and the answer is not always the one on top.intermediate12 mininteractive
  4. 04Multi-window and large screensSplit screen, freeform, picture-in-picture, foldables and desktop windowing: what happens to an Activity when it no longer owns the display — and why 'resizable' became the default assumption.intermediate12 mininteractive
  5. 05Insets and edge-to-edgeThe status bar, the navigation bar, the cutout and the keyboard all reserve space. Insets are the API that tells you how much — and since Android 15, drawing behind them is the default.intermediate11 mininteractive
  6. 06Input methods and accessibilityThe keyboard is a separate app that negotiates with your text field, and an accessibility service is another client of that field. Both depend on the same editable-text interface — which is why a custom view that ignores it is broken for both.intermediate12 mininteractive

Test yourself

Test yourself: Input & windows

1 / 8

What is the platform's direction for orientation and resizability restrictions on large screens?

0 answered · 0 correct