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
Custom Tabsの高さを変更しよう
Search
horie23
March 07, 2023
Programming
0
320
Custom Tabsの高さを変更しよう
horie23
March 07, 2023
Tweet
Share
More Decks by horie23
See All by horie23
コーディングから1年離れた経験と コーディングへの再挑戦
horie23
0
100
Jetpack Compose 頑張らないPreviewParameterProvider
horie23
0
590
Other Decks in Programming
See All in Programming
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
340
gunshi
kazupon
1
140
ゲームの物理 剛体編
fadis
0
390
Graviton と Nitro と私
maroon1st
0
160
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
620
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
240
PostgreSQLで手軽にDuckDBを使う!DuckDB&pg_duckdb入門/osc25hi-duckdb
takahashiikki
0
230
re:Invent 2025 トレンドからみる製品開発への AI Agent 活用
yoskoh
0
570
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
210
クラウドに依存しないS3を使った開発術
simesaba80
0
210
Patterns of Patterns
denyspoltorak
0
410
Combinatorial Interview Problems with Backtracking Solutions - From Imperative Procedural Programming to Declarative Functional Programming - Part 2
philipschwarz
PRO
0
130
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
527
40k
Designing Experiences People Love
moore
143
24k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
120
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
35
We Are The Robots
honzajavorek
0
130
The Mindset for Success: Future Career Progression
greggifford
PRO
0
200
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
76
How Software Deployment tools have changed in the past 20 years
geshan
0
31k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
2
280
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
65
Transcript
We are the future. www.team-lab.com チームラボ株式会社 teamLab inc. Custom Tabsの高さを変更しよう
チームラボ 堀江
We are the future. www.team-lab.com チームラボ株式会社 teamLab inc. 自己紹介 堀江
達矢 チームラボ 2013年入社 スマホアプリエンジニア https://www.wantedly.com/id/tatsuya_horie_c
We are the future. www.team-lab.com チームラボ株式会社 teamLab inc. Custom Tabs紹介
Webページを開くときに - アプリから離脱させたくない - WebViewでは動かないかもしれない という悩みを解決するために、 ブラウザ側でAndroidアプリ向けに提供される機能 管理しているドメイン以外のWebページを開くときに利用が推奨されている refs:https://developer.chrome.com/docs/android/custom-tabs/
We are the future. www.team-lab.com チームラボ株式会社 teamLab inc. Custom Tabsの新しい機能
Custom Tabs起動時の高さを設定できる
We are the future. www.team-lab.com チームラボ株式会社 teamLab inc. 注意点 -
ブラウザによって対応状況が異なるため、 Chromeの場合は最新版を利用する - 端末横向きでは表示できない - マルチウィンドウモードでは表示できない
We are the future. www.team-lab.com チームラボ株式会社 teamLab inc. 起動時の高さの設定方法 2種類の方法
1. CustomTabsServiceConnectionを利用 2. ActivityResultLauncherを利用
We are the future. www.team-lab.com チームラボ株式会社 teamLab inc. CustomTabsServiceConnectionを利用 ※CustomTabsSessionは
利用シーンに合わせて作成
We are the future. www.team-lab.com チームラボ株式会社 teamLab inc. CustomTabsServiceConnectionを利用
We are the future. www.team-lab.com チームラボ株式会社 teamLab inc. 高さが変更されたイベント CustomTabsCallback
#onActivityResized でハンドリング
We are the future. www.team-lab.com チームラボ株式会社 teamLab inc. ActivityResultLauncherを利用
We are the future. www.team-lab.com チームラボ株式会社 teamLab inc. ActivityResultLauncherを利用
We are the future. www.team-lab.com チームラボ株式会社 teamLab inc. 項目の説明:Toolbarの角丸 角丸の設定は現状
0dp ~ 16dp の範囲のみ対応 それ以外を設定す るとクラッシュ refs:https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsIntent#EXTRA_TOOLBAR_CORNER_RADIUS_DP()
We are the future. www.team-lab.com チームラボ株式会社 teamLab inc. 項目の説明:起動時の高さ 起動時の高さは
画面の高さの 50% ~ 100% の範囲のみ対応 それ以外を設定し ても50%か100% 表示になる refs:https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsIntent#EXTRA_INITIAL_ACTIVITY_HEIGHT_PX()
We are the future. www.team-lab.com チームラボ株式会社 teamLab inc. 項目の説明:起動時の高さ追加設定 refs:https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsIntent.Builder#setInitialActivityHeightPx(int)
ActivityHeightRe sizeBehaviorを 指定可能 - DEFAULT - ADJUSTABLE - FIXED の3種
We are the future. www.team-lab.com チームラボ株式会社 teamLab inc. 項目の説明:閉じるボタンの位置 閉じるボタンの
表示位置 - DEFAULT - START - END の3種 refs:https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsIntent.Builder#setCloseButtonPosition(int)
We are the future. www.team-lab.com チームラボ株式会社 teamLab inc. 最後に androidx.Browserのバージョン
1.5には他にも更新されたものがあるので、 是非試してみてください