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
Jetpack Compose + design systems
Search
François Blavoet
May 03, 2022
Programming
430
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Jetpack Compose + design systems
François Blavoet
May 03, 2022
More Decks by François Blavoet
See All by François Blavoet
Accessibility made Easy
francois_blavoet
0
130
Vectorial Victories - Android Makers 2018 - Paris
francois_blavoet
0
830
New York Accessibility Hackathon - Accessibility on Android
francois_blavoet
1
120
SVG
francois_blavoet
0
120
And then my phone became smarter - A journey into the Awareness API - MobileEra 2016
francois_blavoet
0
730
And then my phone became smarter - A journey into the Awareness API
francois_blavoet
2
1.5k
Let's Sprinkle some #PerfMatters on your ViewGroups - Droidcon Turin 2016
francois_blavoet
10
1.6k
Let's Sprinkle some #PerfMatters on your ViewGroups - Droidcon Paris 2015
francois_blavoet
13
1.7k
Other Decks in Programming
See All in Programming
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
5.5k
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
170
これからAgentCoreを触る方へトレンドはGatewayです
har1101
5
410
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
Lessons from Spec-Driven Development
simas
PRO
0
230
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
170
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
8.9k
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
980
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
410
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
7.1k
はてなアカウント基盤 State of the Union
cockscomb
1
1k
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
180
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.6k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
400
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
260
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
440
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
440
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
160
HDC tutorial
michielstock
2
720
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
210
Become a Pro
speakerdeck
PRO
31
6k
Transcript
Jetpack Compose + Design Systems François Blavoet
Jetpack Compose • Compose is the future of Android UI
development • When is the best time to start adopting it ?
Design systems What is a Design system ? -> it
is a complete set of standards intended to manage design at scale using reusable components and patterns.
Design systems @GET("/addresses") fun getAddresses(): Single<GetAddressesResponse> @PUT("/addresses/{address_id}") fun updateAddress(@Path("address_id") id:
String, @Body body: Map<String, Any>): Single<AddressResponse>
Let’s have a look at one component
Let’s have a look at one component
Let’s have a look at one component
Let’s have a look at one component
Let’s have a look at one component Row.Content { leading(
label = "Order Changes Preferences", label2 = "Suggest replacements ...", ) trailing( label = "Edit", option = Row.TrailingOption.Clickable(onPreferenceClick) ) }
Let’s have a look at one component Row.Content { leading(
label = "Tue Jun 2, 4–5pm", option = LeadingOption.Icon(Icon.Time), ) }
One design system
Material Design
Material Design Button( onClick: () -> Unit, modifier: Modifier =
Modifier, enabled: Boolean = true, interactionSource: MutableInteractionSource = remember {..}, elevation: ButtonElevation? = ButtonDefaults.elevation(), shape: Shape = MaterialTheme.shapes.small, border: BorderStroke? = null, colors: ButtonColors = ButtonDefaults.buttonColors(), contentPadding: PaddingValues = ButtonDefaults.ContentPadding, content: @Composable RowScope.() -> Unit, )
Material Design?
Material Design? ?
None
Let’s implement our own system
Atoms
Atoms Requirements: • Day/night • Customizable for white label apps
• As easy to use as possible • Have an abstract representation outside of the composition
Atoms interface ColorSpec { @Composable fun value(): Color }
Atoms interface ColorSpec { @Composable fun value(): Color companion object
{ val SystemGrayscale70: ColorSpec = … val SystemGrayscale50: ColorSpec = … … } }
Atoms interface ColorSpec { @Composable fun value(): Color companion object
{ val SystemGrayscale70: ColorSpec = … val SystemGrayscale50: ColorSpec = … … fun fromColor(color: Color): ColorSpec { return StaticColor(color) } } }
Atoms @Composable fun DesignTheme( configuration: ThemeConfig? = null, content: @Composable
() -> Unit, ) { … } object DesignTheme { val colors: Colors @Composable @ReadOnlyComposable get() = LocalColors.current }
Atoms
Atoms interface IconSlot { @Composable fun Content(contentColor: Color) }
Atoms interface IconSlot { @Composable fun Content(contentColor: Color) companion object
{ fun fromResource( @DrawableRes res: Int, contentDescription: TextSpec?, ): IconSlot { return ResIcon(res, contentDescription) } } }
Atoms enum class Icons(@DrawableRes internal val resId: Int) : IconSlot
{ Accessibility(R.drawable.cp_accessibility), Account(R.drawable.cp_account), Add(R.drawable.cp_add), … }
Molecules
Molecules data class PillSpec( val label: TextSpec, val onClick: (()
-> Unit)?, val selected: Boolean = false, ) @Composable fun Pill( spec: PillSpec, modifier: Modifier = Modifier, )
Molecules data class PillSpec( val label: TextSpec, val onClick: (()
-> Unit)?, val selected: Boolean = false, ) @Composable fun Pill( spec: PillSpec, modifier: Modifier = Modifier, ) @Composable fun BasePill( selected: Boolean, onClick: (() -> Unit)?, modifier: Modifier = Modifier, … content: @Composable BoxScope.(contentColor: Color) -> Unit, )
Going Further import androidx.compose.material.Text @Composable fun Text( text: AnnotatedString, modifier:
Modifier = Modifier, style: TextStyle = LocalTextStyle.current, … ) {
Going Further import com.instacart.compote.foundation.Text @Composable fun Text( text: RichTextSpec, modifier:
Modifier = Modifier, style: TextStyle = TextStyleSpec.Default, … )
33
Thank you! François Blavoet