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
One screen, many BottomSheets
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Keishin Yokomaku
June 14, 2024
Technology
470
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
One screen, many BottomSheets
Keishin Yokomaku
June 14, 2024
More Decks by Keishin Yokomaku
See All by Keishin Yokomaku
Base64 in Android
keithyokoma
0
57
LazyColumnのitemがViewPortの中で占める領域の割合を知りたい
keithyokoma
0
760
Build apps for Cars
keithyokoma
0
600
Save the state
keithyokoma
0
640
Either in Kotlin
keithyokoma
0
650
持続的なアプリ開発のためのDXを支える技術
keithyokoma
2
5.6k
Make the objects serializable with kotlinx.serialization
keithyokoma
0
5.4k
Kotlin で書く Gradle Custom Tasks
keithyokoma
0
590
DX Improvements
keithyokoma
3
460
Other Decks in Technology
See All in Technology
小粒でもパワフルなJS Runtime Antjsについて
comamoca
0
120
【Aiming】共通基盤なのに「共通化しない」課金・認証基盤「LINK」が選び取ったシングルテナント戦略と運用の秘訣
saikeda
0
160
平文パスワードはログに“残り” ── 肝心の侵入は“痕跡すら残らない”
kuroneko13
0
120
Kiro Crew で始める マルチエージェント開発
miu_crescent
PRO
0
160
AIで変わるエンジニアの働き方(仮)
naoinaoi
0
470
巨大気象データと戦う ― サロゲートモデル学習を高速化する圧縮技術
gpuunite_official
0
250
AWS Blocks が楽しい #ゆるWeb札幌
tacck
PRO
0
120
SmartHR Engineering Team Deck
smarthr
1
3.6k
ハッカソンで入賞した話 @ Findy LT
asari194617
0
1.5k
フィジカルAIの知識ゼロの僕でも AIを使えばここまでできた
tatsuya1970
0
150
AI時代に、人は何を、どう学ぶのか #pbl_pub / What and How Do We Learn in the AI Era?
takaking22
1
240
【GCC2026】TrueHDRIを用いたルックデブ環境とライティングテクニック
bandainamcostudios
PRO
0
310
Featured
See All Featured
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
290
Rails Girls Zürich Keynote
gr2m
96
14k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.1k
From π to Pie charts
rasagy
0
320
Technical Leadership for Architectural Decision Making
baasie
3
520
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Designing Powerful Visuals for Engaging Learning
tmiket
1
510
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.2k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
280
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
440
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
3
480
Transcript
One screen, many BottomSheets Keishin Yokomaku(@KeithYokoma) / Drivemode, Inc.
One screen, many BottomSheets About me ▸ Keishin Yokomaku -
@KeithYokoma ▸ GitHub / Twitter / Stack Over fl ow ▸ Drivemode, Inc. / Engineer
▸ e.g. X (چ Twitter) ▸ ԡ͢Ϙλϯ͝ͱʹҧ͏ BottomSheet ͕ग़Δ One
screen, many BottomSheets Ұͭͷը໘ʹෳछྨͷ BottomSheet Λग़͍ͨ͠
One screen, many BottomSheets ߟ͑ΒΕΔ࣮ ▸ ͦΕͧΕͷ BottomSheet Λ… ▸
BottomSheetDialogFragment Ͱ࡞Δ ▸ BottomSheetScaffold ͷ sheetContent Ͱग़͚͠Δ
One screen, many BottomSheets BottomSheetDialogFragment Ͱ࡞Δ ▸ UI ͷछྨ͝ͱʹ Fragment
Λ͚Δ BottomSheetDialogFragment BottomSheetDialogFragment BottomSheetDialogFragment
One screen, many BottomSheets BottomSheetDialogFragment Ͱ࡞Δ class FooBottomSheetFragment : BottomSheetDialogFragment()
{ override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View = ComposeView(requireContext()).apply { setContent { BottomsheetTheme { FooSheetContent() } } } @Composable fun FooSheetContent() {} }
One screen, many BottomSheets BottomSheetDialogFragment Ͱ࡞Δ ▸ BottomSheetDialogFragment ͷ UI
▸ Compose Ͱ࡞ΕΔ ▸ දࣔɾඇදࣔʹ͢Δ෦͚ͩ DialogFragment ͷ API ʹै͏ ▸ BottomSheet ্Ͱͷ UI ΠϕϯτͷϋϯυϦϯά ▸ DialogFragment ͰΑ͋͘ΔίʔϧόοΫͷ࣮ํ๏Ͳ͏͢Δ͔ ▸ BottomSheetDialogFragment Λϗετ͍ͯ͠Δը໘ͱಉ͡ ViewModel Λ ೖͰ͖ΔͳΒίʔϧόοΫΛఆٛ͠ͳ͍͍ͯ͘
One screen, many BottomSheets BottomSheetDialogFragment Ͱ࡞Δ: ViewModel class MainActivity :
AppCompatActivity() { private val viewModel: MyViewModel by viewModels() } class FooBottomSheetFragment : BottomSheetDialogFragment() { private val viewModel: MyViewModel by activityViewModels() } class MyViewModel : ViewModel() {}
One screen, many BottomSheets BottomSheetScaffold ͷ sheetContent Ͱग़͚͠Δ ▸ UI
ͷछྨ͝ͱʹ Composable Λ͚Δ RepostSheetContent() PostMenuSheetContent() ShareSheetContent()
One screen, many BottomSheets BottomSheetScaffold ͷ sheetContent Ͱग़͚͠Δ BottomSheetScaffold( sheetContent
= { when (sheetType) { BottomSheetType.FOO -> { Text(text = "Hello FOO") } BottomSheetType.BAR -> { Text(text = "Hello BAR") } BottomSheetType.BAZ -> { Text(text = "Hello BAZ") } BottomSheetType.NONE -> {} } } ) enum class BottomSheetType { FOO, BAR, BAZ, NONE }
One screen, many BottomSheets BottomSheetScaffold ͷ sheetContent Ͱग़͚͠Δ ▸ Ͳ͏ͯ͠ذ͕૿͑Δ
▸ sheetContent ͕Ұ͔ͭ͠ͳ͍ͷͰ͜ͷதͰදࣔΛ͚Δ
One screen, many BottomSheets BottomSheetScaffold ͷ sheetContent Ͱग़͚͠Δ ▸ BottomSheet
ͷ UI ͕ΞϓϦͷ༷ͱ߹Θͳ͍Մೳੑ ▸ BottomNavigationView + Fragment Ͱը໘Λߏͨ͠ͱ͖ ▸ Fragment ͷதʹ BottomSheetScaffold ͕͋Δ ▸ Fragment ͕࣋ͭ Boundary Ͱܭࢉ͢ΔͷͰ BottomSheet ͕ BottomNavigationView ͷ্͔Βग़ͯ͘Δ
One screen, many BottomSheets ͲͪΒ͕Α͍͔ ▸ It depends ▸ ཁ݅ΞϓϦͷ
UI ͷߏ࣍ୈ ▸ શ෦ Compose ͳΒ BottomSheetDialogFragment Θͳͯ͘ྑ͍
One screen, many BottomSheets Keishin Yokomaku(@KeithYokoma) / Drivemode, Inc.