← Soner Dönmez's projects
Repo

Matryoshka-Focus-Architecture

@sodonetworkby Soner Dönmez · sodonetwork

A deterministic UI/UX architecture that eliminates focus trapping/loss and screen freezes in deeply nested lists on Android TV and remote control (D-Pad) environments.

Comments · 1

Soner DönmezBuilder1h ago

Overview and Mental Model
One of the most chronic problems in Android TV apps (especially IPTV, VOD and streaming platforms) is focus disappearing from the screen while navigating multi-level lists with a D-Pad remote, and the state being lost when the back button is pressed.

The Matryoshka Focus Architecture adapts the traditional logic of nested Russian dolls to the user interface hierarchy:

[ Area ] ➔ [ List ] ➔ [ Sub-List ] ➔ [ Media Template ]

As the user navigates deeper layers, they move from the outermost shell toward the innermost core. When they want to go back, focus is deterministically handed off to the parent object without being lost.

🚀 Core Problems Solved
Zero Focus Loss: Prevents focus from disappearing and the interface from locking up when the Back (Back/DPAD_LEFT) button is pressed or list boundaries are reached.

Stateful Restoration (State Restoration): When exiting sub-lists (season/episode grid), the user is instantly returned to the active cell where they last left off (focusRestorer).

Verified Stability: When this architecture was applied to the IptvPlayerScreen.kt and MatryoshkaVodArea.kt components in the tvlauncher codebase, it permanently resolved 19 build and logic errors in one go.

Sign in to comment

More from members

All projects

See what other members are building and what each project is looking for.