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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Keishin Yokomaku
June 14, 2024
Technology
460
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
53
LazyColumnのitemがViewPortの中で占める領域の割合を知りたい
keithyokoma
0
750
Build apps for Cars
keithyokoma
0
580
Save the state
keithyokoma
0
630
Either in Kotlin
keithyokoma
0
640
持続的なアプリ開発のためのDXを支える技術
keithyokoma
2
5.6k
Make the objects serializable with kotlinx.serialization
keithyokoma
0
5.3k
Kotlin で書く Gradle Custom Tasks
keithyokoma
0
590
DX Improvements
keithyokoma
3
450
Other Decks in Technology
See All in Technology
中期計画、2回作ってみた ~業務委託と正社員、両方の視点から~
demaecan
1
820
Kubernetesにおける学習基盤とLLMOpsの概要
ry
1
310
非エンジニアがClaudeと挑んだ「1ヶ月間プロダクト30本ノック」
askokc
0
530
自律型AIエージェントは何を破壊するのか
kojira
0
160
20260619 私の日常業務での生成 AI 活用
masaruogura
1
210
入門!AWS Blocks
ysuzuki
1
120
AI駆動開発を通して感じた、 AI時代のデザイナーの役割変化
whisaiyo
3
2.1k
AIの性能が向上しても未解決な組織の重大問題は何か?/An Unsolved Organizational Problem in the Age of AI
moriyuya
4
680
ルールやカスタム機能、どう活かす?ハンズオンで体感するIBM Bobの出力コントロール
muehara
1
160
2026TECHFRESH畢業分享會 - 葬送的通靈師:化系統與用戶雜訊成行動訊號
line_developers_tw
PRO
0
1k
スキルと MCP ツール、責務をどう分けるか? AI が迷わないインターフェース設計の戦略
cdataj
1
1.1k
機械学習を「社会実装」するということ 2026年夏版 / Social Implementation of Machine Learning June 2026 Version
moepy_stats
5
2.4k
Featured
See All Featured
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
610
The Cult of Friendly URLs
andyhume
79
6.9k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2k
Balancing Empowerment & Direction
lara
6
1.2k
エンジニアに許された特別な時間の終わり
watany
107
250k
Crafting Experiences
bethany
1
180
The Curious Case for Waylosing
cassininazir
1
390
My Coaching Mixtape
mlcsv
0
150
Building an army of robots
kneath
306
46k
Test your architecture with Archunit
thirion
1
2.3k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
480
Building a Scalable Design System with Sketch
lauravandoore
463
34k
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.