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
310
Custom Tabsの高さを変更しよう
horie23
March 07, 2023
Tweet
Share
More Decks by horie23
See All by horie23
コーディングから1年離れた経験と コーディングへの再挑戦
horie23
0
99
Jetpack Compose 頑張らないPreviewParameterProvider
horie23
0
560
Other Decks in Programming
See All in Programming
GraphQL×Railsアプリのデータベース負荷分散 - 月間3,000万人利用サービスを無停止で
koxya
1
1.3k
Server Side Kotlin Meetup vol.16: 内部動作を理解して ハイパフォーマンスなサーバサイド Kotlin アプリケーションを書こう
ternbusty
3
180
SpecKitでどこまでできる? コストはどれくらい?
leveragestech
0
730
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
330
CSC305 Lecture 05
javiergs
PRO
0
210
After go func(): Goroutines Through a Beginner’s Eye
97vaibhav
0
380
私はどうやって技術力を上げたのか
yusukebe
43
18k
Railsだからできる 例外業務に禍根を残さない 設定設計パターン
ei_ei_eiichi
0
580
大規模アプリのDIフレームワーク刷新戦略 ~過去最大規模の並行開発を止めずにアプリ全体に導入するまで~
mot_techtalk
1
440
PHPに関数型の魂を宿す〜PHP 8.5 で実現する堅牢なコードとは〜 #phpcon_hiroshima / phpcon-hiroshima-2025
shogogg
1
200
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
150
アメ車でサンノゼを走ってきたよ!
s_shimotori
0
220
Featured
See All Featured
A better future with KSS
kneath
239
18k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
The Pragmatic Product Professional
lauravandoore
36
6.9k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
189
55k
The Straight Up "How To Draw Better" Workshop
denniskardys
238
140k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Code Reviewing Like a Champion
maltzj
526
40k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
Code Review Best Practice
trishagee
72
19k
How GitHub (no longer) Works
holman
315
140k
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には他にも更新されたものがあるので、 是非試してみてください