2026.09.03 10:20 ~ 11:00 Meerkat

Tackling newspaper layout UI with Jetpack Compose: Three hurdles of composite gestures, polygon article areas, and adaptive page layouts

Jetpack Compose 日本語

Newspaper layout UI has unique requirements that differ from typical list or card-based UIs. ・ A single newspaper page is delivered as one image ・ Composite gestures where page swiping, pinch-in/out, and double-tapping function simultaneously ・ Article areas defined by sequences of polygon coordinates matching column layouts ・ Spotlight display highlighting only the selected article ・ Paging direction changes depending on the publication, displaying a two-page spread in landscape orientation Combining these creates difficulties that cannot be easily solved using standard Compose practices. Based on implementation tested with a view toward migration in an actual product, this talk explains the three technical challenges we faced. 1. Resolving conflicts in composite gestures Attempting to implement pinch zoom inside a pager causes gesture conflicts with horizontal swiping. We present an approach to gesture detection control and zoom animation to resolve these conflicts. 2. Polygon hit testing and spotlight rendering Because article areas are defined by polygon coordinate sequences, hit testing between tap positions and polygons is required. We explain implementation strategies for coordinate transformation during zoom states and spotlight rendering to highlight selected articles. 3. Designing adaptive page configurations The paging direction changes depending on the publication type, resulting in a two-page spread in landscape mode, and changes in the number of displayed pages also affect coordinate calculations. We explore approaches to handling conditions in Compose, such as publication-specific characteristics and UI changes driven by configuration updates. Based on comparisons with View/XML implementations, we share insights gained through testing on how well Compose can meet these complex requirements. (Translated by the DroidKaigi Committee)

Intended audience

・Those with basic implementation experience in Jetpack Compose who are interested in implementing intricate UIs ・Those considering migration from View/XML to Compose who want to know its applicability in complex UI domains ・Those who love print media, or feel romance in reproducing real-world experiences through code

Sessions in the same time slot

View all sessions