Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Display Cutout
Search
Panini
April 13, 2018
Programming
670
1
Share
Display Cutout
Panini
April 13, 2018
More Decks by Panini
See All by Panini
Kotlin 1.5 preview
panini
1
470
Java谷園から逃げ出した話
panini
0
400
Kotlin 1.4-rc
panini
0
250
Fixing Broken Robots - Android Mutation Testing
panini
0
210
Kotlin Multiplatform
panini
2
680
build.gradle.kts
panini
2
2.4k
Kotlin Multi-platform(?)
panini
1
760
Convert Java file to Kotlin file ⌥⇧⌘K
panini
0
1.1k
Introducing Android P
panini
2
850
Other Decks in Programming
See All in Programming
Smarter Angular mit Transformers.js & Prompt API
christianliebel
PRO
1
120
20260315 AWSなんもわからん🥲
chiilog
2
190
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
560
事業会社でのセキュリティ長期インターンについて
masachikaura
0
230
AI Assistants for YourAngular Solutions @Angular Graz, March 2026
manfredsteyer
PRO
0
150
GoのDB アクセスにおける 「型安全」と「柔軟性」の両立 - Bob という選択肢
tak848
0
310
KagglerがMixSeekを触ってみた
morim
0
370
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
3
440
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
530
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
290
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
340
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
220
Featured
See All Featured
sira's awesome portfolio website redesign presentation
elsirapls
0
210
Why Our Code Smells
bkeepers
PRO
340
58k
Documentation Writing (for coders)
carmenintech
77
5.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
370
The Pragmatic Product Professional
lauravandoore
37
7.2k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
170
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
160
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
200
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
120
Accessibility Awareness
sabderemane
0
93
Transcript
Introducing DisplayCutout Shibuya.apk #24
About Me • Matthew Vern / Panini • Twitter: @callipan
Github: panpanini • Mercari, Inc • Android Engineer (US) • Kotlin可愛い
Display Cutout support For devices like Essential Phone, or iPhone
X which have a cutout in the display (for camera, etc).
Display Cutout emulator Access from Developer options
Display Cutout emulator Mode: None - standard
Display Cutout emulator Mode: Narrow display cutout
Display Cutout emulator Mode: Tall display cutout
Display Cutout emulator Mode: Wide display cutout
Display Cutout emulator Cutout only covers status bar, so there
should be little affect to apps not using Fullscreen Activity
None
Important Point Status bar height has changed!
Important Point Clock has moved!
Important Point Clock has moved! Notifications only show on the
left
Important Point Clock has moved! Notifications only show on the
left Notifications will be hidden behind ..
LAYOUT_IN_DISPLAY_CUTOUT_MODE There are three layout modes for handling the cutout
in a fullscreen Activity: LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER
LAYOUT_IN_DISPLAY_CUTOUT_MODE DEFAULT NEVER ALWAYS
WindowInsetListener // API Level 20+ view.setOnApplyWindowInsetsListener { view, windowInsets ->
val cutout: DisplayCutout? = windowInsets.displayCutout // Adjust view position based on cutout windowInsets.consumeDisplayCutout() }
WindowInsetListener // API Level 20+ view.setOnApplyWindowInsetsListener { view, windowInsets ->
val cutout: DisplayCutout? = windowInsets.displayCutout cutout?.bounds?.bounds?.let { view.translationX = it.right.toFloat() view.translationY = it.exactCenterY() - (view.measuredHeight() / 2) } windowInsets.consumeDisplayCutout() }
WindowInsetListener
Summary • Most apps don’t need to worry about DisplayCutout
• Status bar height can change • WindowInsetListener to get cutout position • LAYOUT_IN_DISPLAY_CUTOUT_MODE for fullscreen Activities • Clock & Notifications only shown on the left-hand side of status bar
Introducing DisplayCutout Shibuya.apk #24