$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Display Cutout
Search
Panini
April 13, 2018
Programming
1
660
Display Cutout
Panini
April 13, 2018
Tweet
Share
More Decks by Panini
See All by Panini
Kotlin 1.5 preview
panini
1
460
Java谷園から逃げ出した話
panini
0
390
Kotlin 1.4-rc
panini
0
240
Fixing Broken Robots - Android Mutation Testing
panini
0
200
Kotlin Multiplatform
panini
2
670
build.gradle.kts
panini
2
2.4k
Kotlin Multi-platform(?)
panini
1
740
Convert Java file to Kotlin file ⌥⇧⌘K
panini
0
1.1k
Introducing Android P
panini
2
840
Other Decks in Programming
See All in Programming
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
2.9k
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
560
TerraformとStrands AgentsでAmazon Bedrock AgentCoreのSSO認証付きエージェントを量産しよう!
neruneruo
4
1.4k
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.2k
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
180
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
290
perlをWebAssembly上で動かすと何が嬉しいの??? / Where does Perl-on-Wasm actually make sense?
mackee
0
110
DevFest Android in Korea 2025 - 개발자 커뮤니티를 통해 얻는 가치
wisemuji
0
170
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
7
2.3k
Developing static sites with Ruby
okuramasafumi
0
320
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
160
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
440
Featured
See All Featured
Reality Check: Gamification 10 Years Later
codingconduct
0
1.9k
Are puppies a ranking factor?
jonoalderson
0
2.3k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
110
WENDY [Excerpt]
tessaabrams
8
35k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
23
Done Done
chrislema
186
16k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
680
Raft: Consensus for Rubyists
vanstee
141
7.2k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.3k
BBQ
matthewcrist
89
9.9k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.8k
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