Slide 1

Slide 1 text

@stewemetal Composing a Design System πŸ‘¨πŸ’» Senior Android Engineer @ TIER 
 οΏΌ Co-organizer of Kotlin Budapest 
 🌐 istvanjuhos.dev IstvΓ‘n Juhos

Slide 2

Slide 2 text

@stewemetal @akoskovacsme

Slide 3

Slide 3 text

@stewemetal @akoskovacsme

Slide 4

Slide 4 text

@stewemetal Octopus Design System - B.C. ● Customised Android Views and ViewGroups ● Data Binding and @BindingAdapters ● Lots of XML files and custom XML attributes

Slide 5

Slide 5 text

@stewemetal Octopus Design System - B.C. ● Customised Android Views and ViewGroups ● Data Binding and @BindingAdapters ● Lots of XML files and custom XML attributes OctopusButtonPrimary.kt R.layout.__internal_view_octopus_button R.styleable.OctopusButton R.drawable.__internal_octopus_button_background_primary ... @stewemetal

Slide 6

Slide 6 text

@stewemetal Octopus Design System - B.C. ● Customised Android Views and ViewGroups ● Data Binding and @BindingAdapters ● Lots of XML files and custom XML attributes class OctopusText @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0, ) : AppCompatTextView(context, attrs, defStyleAttr) @stewemetal

Slide 7

Slide 7 text

@stewemetal Octopus Design System - B.C. ● Customised Android Views and ViewGroups ● Data Binding and @BindingAdapters ● Lots of XML files and custom XML attributes class OctopusText @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0, ) : AppCompatTextView(context, attrs, defStyleAttr) @stewemetal

Slide 8

Slide 8 text

@stewemetal Octopus Design System - B.C. private fun updateStyle() { areSettersEnabled = true ... setTextColor(ContextCompat.getColor(context, colorFromTextType)) ... areSettersEnabled = false } OctopusText : AppCompatTextView // We have to disable specific setters to prevent misuse of the view private var areSettersEnabled = false

Slide 9

Slide 9 text

@stewemetal Octopus Design System - B.C. /** * Calling this method will have no effect. */ override fun setTextColor(color: Int) { if (areSettersEnabled || isInEditMode) { super.setTextColor(color) } } OctopusText : AppCompatTextView // We have to disable specific setters to prevent misuse of the view private var areSettersEnabled = false

Slide 10

Slide 10 text

@stewemetal Adopting Compose 
 πŸ€”

Slide 11

Slide 11 text

@stewemetal Adopting Compose ● Possible approaches to consider @marcoGomier @stewemetal

Slide 12

Slide 12 text

@stewemetal Adopting Compose ● Possible approaches to consider Views + AndroidView @Composable fun OctopusButtonPrimary( text: String, ... onClick: () -> Unit, ) { AndroidView( factory = { context -> OctopusButtonPrimary( ContextThemeWrapper( context, R.style.Theme_Octopus, ) ) }, update = { view -> ... }, ) } @stewemetal

Slide 13

Slide 13 text

@stewemetal Adopting Compose ● Possible approaches to consider Views + AndroidView @Composable fun OctopusButtonPrimary( text: String, ... onClick: () -> Unit, ) { AndroidView( factory = { context -> OctopusButtonPrimary( ContextThemeWrapper( context, R.style.Theme_Octopus, ) ) }, update = { view -> ... }, ) } @stewemetal

Slide 14

Slide 14 text

@stewemetal Adopting Compose ● Possible approaches to consider Views + AndroidView @Composable fun OctopusButtonPrimary( text: String, ... onClick: () -> Unit, ) { AndroidView( factory = { context -> OctopusButtonPrimary( ContextThemeWrapper( context, R.style.Theme_Octopus, ) ).apply { setText(text) setOnClickListener { onClick() } ... } }, update = { view -> @stewemetal

Slide 15

Slide 15 text

@stewemetal Adopting Compose ● Possible approaches to consider Views + AndroidView + XMLs @Composable fun OctopusButtonPrimary( text: String, ... onClick: () -> Unit, ) { AndroidView( factory = { context -> OctopusButtonPrimary( ContextThemeWrapper( context, R.style.Theme_Octopus, ) ).apply { setText(text) setOnClickListener { onClick() } ... } }, update = { view -> @stewemetal

Slide 16

Slide 16 text

@stewemetal Adopting Compose ● Possible approaches to consider @Composable fun OctopusButtonPrimary( text: String, ... onClick: () -> Unit, ) { AndroidView( factory = { context -> OctopusButtonPrimary( ContextThemeWrapper( context, R.style.Theme_Octopus, ) ).apply { setText(text) setOnClickListener { onClick() } ... } }, update = { view -> @stewemetal Views + AndroidView + XMLs

Slide 17

Slide 17 text

@stewemetal Adopting Compose ● Possible approaches to consider @Composable public fun OctopusButtonPrimary( text: String, modifier: Modifier = Modifier, buttonSize: ButtonSize = NORMAL, enabled: Boolean = true, loading: Boolean = false, destructive: Boolean = false, onClick: () -> Unit, ) { Box() { Button(…) { Text(text) } if (loading) { OctopusButtonLoader() } } } Reimplement component s​ in ​ Compose @stewemetal

Slide 18

Slide 18 text

@stewemetal Adopting Compose ● Possible approaches to consider @Composable public fun OctopusButtonPrimary( text: String, modifier: Modifier = Modifier, buttonSize: ButtonSize = NORMAL, enabled: Boolean = true, loading: Boolean = false, destructive: Boolean = false, onClick: () -> Unit, ) { Box() { Button(…) { Text(text) } if (loading) { OctopusButtonLoader() } } } Reimplement component s​ in ​ Compose @stewemetal

Slide 19

Slide 19 text

@stewemetal Adopting Compose ● Possible approaches to consider Reimplement component s​ in ​ Compose @stewemetal @Composable public fun OctopusButtonPrimary( text: String, modifier: Modifier = Modifier, buttonSize: ButtonSize = NORMAL, enabled: Boolean = true, loading: Boolean = false, destructive: Boolean = false, onClick: () -> Unit, ) { Box() { Button(…) { Text(text) } if (loading) { OctopusButtonLoader() } } }

Slide 20

Slide 20 text

@stewemetal Adopting Compose ● Possible approaches to consider Reimplement component s​ in ​ Compose @stewemetal @Composable public fun OctopusButtonPrimary( text: String, modifier: Modifier = Modifier, buttonSize: ButtonSize = NORMAL, enabled: Boolean = true, loading: Boolean = false, destructive: Boolean = false, onClick: () -> Unit, ) { Box() { Button(…) { Text(text) } if (loading) { OctopusButtonLoader() } } }

Slide 21

Slide 21 text

@stewemetal ● The benefits of recreating components in Compose ● Easier to maintain than custom Views ● No attachments to the legacy Views and tech debt ● Octopus is close to Material ● A new experience for our teams Adopting Compose 🀩

Slide 22

Slide 22 text

@stewemetal ● Downsides of recreating components in Compose ● Lack of experience in Compose APIs ● A second implementation to maintain ● Parity with the View-based components Adopting Compose 🧐

Slide 23

Slide 23 text

@stewemetal Adopting Compose

Slide 24

Slide 24 text

@stewemetal Composing Octopus developer.android.com/jetpack/compose/designsystems

Slide 25

Slide 25 text

@stewemetal Composing Octopus ● Three possible approaches (not just for the theme!) ● Customize Material ● Extend Material ● Go fully-custom

Slide 26

Slide 26 text

@stewemetal Composing Octopus ● Three possible approaches (not just for the theme!) ● Customize Material ● Extend Material ● Go fully-custom

Slide 27

Slide 27 text

@stewemetal Composing Octopus ● Three possible approaches (not just for the theme!) ● Customize Material ● Extend Material ● Go fully-custom - but use Material components where possible

Slide 28

Slide 28 text

@stewemetal OctopusTheme

Slide 29

Slide 29 text

@stewemetal OctopusTheme @Composable public fun OctopusTheme( isInDarkMode: Boolean = isSystemInDarkTheme(), 
 ... content: @Composable () -> Unit, ) { content() }

Slide 30

Slide 30 text

@stewemetal @Composable public fun OctopusTheme( isInDarkMode: Boolean = isSystemInDarkTheme(), colors: OctopusColors = OctopusColors.build(isInDarkMode), typography: OctopusTypography = OctopusTypography.build(), shapes: OctopusShapes = OctopusShapes.build(), dimensions: OctopusDimensions = OctopusDimensions.build(), spacings: OctopusSpacings = OctopusSpacings(), content: @Composable () -> Unit, ) { content() } OctopusTheme

Slide 31

Slide 31 text

@stewemetal @Composable public fun OctopusTheme( isInDarkMode: Boolean = isSystemInDarkTheme(), colors: OctopusColors = OctopusColors.build(isInDarkMode), ... content: @Composable () -> Unit, ) { CompositionLocalProvider( LocalColors provides colors, ... ) { content() } } OctopusTheme

Slide 32

Slide 32 text

@stewemetal @Composable public fun OctopusTheme( isInDarkMode: Boolean = isSystemInDarkTheme(), colors: OctopusColors = OctopusColors.build(isInDarkMode), ... content: @Composable () -> Unit, ) { CompositionLocalProvider( LocalColors provides colors, ... ) { content() } } OctopusTheme

Slide 33

Slide 33 text

@stewemetal private val LocalColors = compositionLocalOf { error( 
 "No colors provided! Make sure to wrap all Octopus components 
 in an OctopusTheme." 
 ) } OctopusTheme

Slide 34

Slide 34 text

@stewemetal public object { public val : OctopusColors @Composable @ReadOnlyComposable get() = LocalColors.current ... } OctopusTheme colors OctopusTheme

Slide 35

Slide 35 text

@stewemetal Modifier .background( color = . .semanticColors.backgroundPrimary, ) OctopusTheme colors OctopusTheme

Slide 36

Slide 36 text

@stewemetal OctopusTheme developer.android.com/jetpack/compose/compositionlocal

Slide 37

Slide 37 text

@stewemetal Composable Components

Slide 38

Slide 38 text

@stewemetal Designing Components in Compose goo.gle/compose-api-guidelines

Slide 39

Slide 39 text

@stewemetal ● Octopus Compose component implementations ● should follow the Jetpack Compose library API guidelines ● should look and feel like the View ones (DS specs βœ… ) ● should use values provided by OctopusTheme ● should be built on existing Material components, where viable Designing Components in Compose

Slide 40

Slide 40 text

@stewemetal Component example - OctopusText @Composable public fun OctopusText( text: String, modifier: Modifier = Modifier, textType: TextType = BODY_1, links: List = emptyList(), textAlignment: Alignment = NATURAL, overflow: TextOverflow = TextOverflow.Clip, style: OctopusStyle = OctopusStyle.getDefault(), ) { ... }

Slide 41

Slide 41 text

@stewemetal Component example - OctopusText @Composable public fun OctopusText( text: String, modifier: Modifier = Modifier, textType: TextType = BODY_1, links: List = emptyList(), textAlignment: Alignment = NATURAL, overflow: TextOverflow = TextOverflow.Clip, style: OctopusStyle = OctopusStyle.getDefault(), ) { ... }

Slide 42

Slide 42 text

@stewemetal Component example - OctopusText @Composable public fun OctopusText( text: String, modifier: Modifier = Modifier, textType: TextType = BODY_1, links: List = emptyList(), textAlignment: Alignment = NATURAL, overflow: TextOverflow = TextOverflow.Clip, style: OctopusStyle = OctopusStyle.getDefault(), ) { ... }

Slide 43

Slide 43 text

@stewemetal Configuration example - TextType enum class TextType( private val id: Int, @ColorRes public val textColorRes: Int, public val textSizeSp: Float, public val lineHeightSp: Float, public val isBold: Boolean = true, public val maxLines: Int = Int.MAX_VALUE, public val isAllCaps: Boolean = false, ) { TITLE_1(0, R.color.__internal_octopusTextTitleNormal, SIZE_TITLE_1, 
 LINE_HEIGHT_40, maxLines = 1), BODY_1(1, R.color.__internal_octopusTextBody, TEXT_SIZE_16, 
 LINE_HEIGHT_20, isBold = false), ... }

Slide 44

Slide 44 text

@stewemetal TextType usage with Composables OctopusText( text = "Title 1 (Normal)", textType = TITLE_1, ) OctopusText( text = "Title 1 (Informative)", textType = TITLE_1_INFORMATIVE, ) OctopusText( text = "Title 1 (Destructive)", textType = TITLE_1_DESTRUCTIVE, ) ...

Slide 45

Slide 45 text

@stewemetal TextType usage with Views

Slide 46

Slide 46 text

@stewemetal TextType usage with Views

Slide 47

Slide 47 text

@stewemetal ... ... πŸ˜΅πŸ’« TextType usage with Views

Slide 48

Slide 48 text

@stewemetal Previews 🀩

Slide 49

Slide 49 text

@stewemetal Previews ● At least light and dark variants ● Multi-preview 🐬

Slide 50

Slide 50 text

@stewemetal Previews ● At least light and dark variants ● Multi-preview

Slide 51

Slide 51 text

@stewemetal Previews @Preview( name = "1 - Light", showBackground = true, backgroundColor = 0xffffffff, // primaryBackgroundLight group = "Light/Dark", ) @Preview( name = "2 - Dark", showBackground = true, uiMode = UI_MODE_NIGHT_YES, backgroundColor = 0xff060a1e, // primaryBackgroundDark group = "Light/Dark", ) annotation class OctopusPreviewPrimaryBackground

Slide 52

Slide 52 text

@stewemetal Previews @OctopusPreviewPrimaryBackground @Composable fun OctopusTextPreview() { Column( modifier = Modifier.verticalScroll(rememberScrollState()), ) { OctopusTextComposeDemo() } }

Slide 53

Slide 53 text

@stewemetal Previews @OctopusPreviewPrimaryBackground @Composable fun OctopusTextPreview() { Column( modifier = Modifier.verticalScroll(rememberScrollState()), ) { OctopusTextComposeDemo() } }

Slide 54

Slide 54 text

@stewemetal Previews @OctopusPreviewPrimaryBackground @Composable fun OctopusTextPreview() { Column( modifier = Modifier.verticalScroll(rememberScrollState()), ) { OctopusTextComposeDemo() } }

Slide 55

Slide 55 text

@stewemetal Previews @OctopusPreviewPrimaryBackground @Composable fun OctopusTextPreview() { Column( modifier = Modifier.verticalScroll(rememberScrollState()), ) { OctopusTextComposeDemo() } }

Slide 56

Slide 56 text

@stewemetal Previews @OctopusPreviewPrimaryBackground @Composable fun OctopusTextPreview() { Column( modifier = Modifier.verticalScroll(rememberScrollState()), ) { OctopusTextComposeDemo() } }

Slide 57

Slide 57 text

@stewemetal Previews in the in-app Octopus demo @Composable fun OctopusTextComposeDemo() { OctopusTheme { Column(...) { OctopusComposeDemoSubSection( title = β€œTitles", ) { OctopusText( text = "Title 1 (Normal)", textType = TITLE_1, ) OctopusText( text = "Title 1 (Informative)", textType = TITLE_1_INFORMATIVE, ) OctopusText(

Slide 58

Slide 58 text

@stewemetal Previews in the in-app Octopus demo @Composable fun OctopusTextComposeDemo() { OctopusTheme { Column(...) { OctopusComposeDemoSubSection( title = β€œTitles", ) { OctopusText( text = "Title 1 (Normal)", textType = TITLE_1, ) OctopusText( text = "Title 1 (Informative)", textType = TITLE_1_INFORMATIVE, ) OctopusText(

Slide 59

Slide 59 text

@stewemetal Previews in the in-app Octopus demo ... ...

Slide 60

Slide 60 text

@stewemetal Previews in the in-app Octopus demo ... ...

Slide 61

Slide 61 text

@stewemetal Previews in the in-app Octopus demo ... ... ...

Slide 62

Slide 62 text

@stewemetal Previews in the in-app Octopus demo findViewById(R.id.composeView)?.apply { setContent { OctopusTheme { OctopusComposeDemoSection { OctopusTextComposeDemo() } } } } ...

Slide 63

Slide 63 text

@stewemetal Previews in the in-app Octopus demo findViewById(R.id.composeView)?.apply { setContent { OctopusTheme { OctopusComposeDemoSection { OctopusTextComposeDemo() } } } } ...

Slide 64

Slide 64 text

@stewemetal In-app Octopus Demo

Slide 65

Slide 65 text

@stewemetal In-app Octopus Demo

Slide 66

Slide 66 text

@stewemetal Going Compose-first

Slide 67

Slide 67 text

@stewemetal Going Compose-first ● Two separate Design System implementations πŸ‘Ž ● Duplicated presentation and behavior ● Keeping them in sync is tedious ● New components = twice the work 🫠

Slide 68

Slide 68 text

@stewemetal Going Compose-first πŸ’‘

Slide 69

Slide 69 text

@stewemetal Going Compose-first ● Use the Compose implementation of components to render the Views πŸ’‘

Slide 70

Slide 70 text

@stewemetal Going Compose-first ● Use the Compose implementation of components to render the Views ● Compose-View interop πŸ’‘

Slide 71

Slide 71 text

@stewemetal Going Compose-first ● Compose-View interop @stewemetal πŸ’‘

Slide 72

Slide 72 text

@stewemetal Going Compose-first ● Compose-View interop @stewemetal πŸ’‘ findViewById(R.id.someView) .setContent { OctopusTheme { ... } }

Slide 73

Slide 73 text

@stewemetal Going Compose-first @stewemetal class ComposeView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 ) : AbstractComposeView( ... ) { private val content = mutableStateOf<(@Composable () -> Unit)?>(null) @Composable override fun Content() { content.value ?. invoke() } }

Slide 74

Slide 74 text

@stewemetal Going Compose-first @stewemetal class ComposeView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 ) : AbstractComposeView( ... ) { private val content = mutableStateOf<(@Composable () -> Unit)?>(null) @Composable override fun Content() { content.value ?. invoke() } }

Slide 75

Slide 75 text

@stewemetal Going Compose-first @stewemetal class ComposeView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 ) : AbstractComposeView( ... ) { private val content = mutableStateOf<(@Composable () -> Unit)?>(null) @Composable override fun Content() { content.value ?. invoke() } } πŸ€”

Slide 76

Slide 76 text

@stewemetal Going Compose-first @stewemetal class ComposeView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 ) : AbstractComposeView( ... ) { private val content = mutableStateOf<(@Composable () -> Unit)?>(null) @Composable override fun Content() { content.value ?. invoke() } } πŸ€”

Slide 77

Slide 77 text

@stewemetal Going Compose-first ● AbstractComposeView

Slide 78

Slide 78 text

@stewemetal View wrappers - base class abstract class OctopusComposeBaseView @JvmOverloads constructor( ... ) : AbstractComposeView(...) { ... }

Slide 79

Slide 79 text

@stewemetal View wrappers - base class abstract class OctopusComposeBaseView @JvmOverloads constructor( ... ) : AbstractComposeView(...) { @get:StyleableRes protected open val styleables: IntArray = IntArray(0) ... }

Slide 80

Slide 80 text

@stewemetal View wrappers - base class abstract class OctopusComposeBaseView() : AbstractComposeView(...) { @get:StyleableRes protected open val styleables: IntArray = IntArray(0) protected fun initView(attrs: AttributeSet?) { if (styleables.isNotEmpty()) { context.theme 
 .obtainStyledAttributes(attrs, styleables, 0, 0,) .apply { try { initAttributes(this) } finally { recycle() } } } } }

Slide 81

Slide 81 text

@stewemetal View wrappers - base class abstract class OctopusComposeBaseView() : AbstractComposeView(...) { @get:StyleableRes protected open val styleables: IntArray = IntArray(0) protected fun initView(attrs: AttributeSet?) { ... } protected abstract fun initAttributes(typedArray: TypedArray) }

Slide 82

Slide 82 text

@stewemetal Supporting custom properties

Slide 83

Slide 83 text

@stewemetal Supporting custom properties

Slide 84

Slide 84 text

@stewemetal Supporting custom properties

Slide 85

Slide 85 text

@stewemetal Supporting custom properties class OctopusButtonPrimary(...) : OctopusComposeBaseView(...) { @StyleableRes override val styleables: IntArray = R.styleable.OctopusButton init { initView(attrs) } override fun initAttributes(typedArray: TypedArray) { with(typedArray) { text.value = getString(R.styleable.OctopusButton_text).orEmpty() isEnabled.value = getBoolean(R.styleable.OctopusButton_enabled, true) isDestructive.value = getBoolean(R.styleable.OctopusButton_destructive, false) } } }

Slide 86

Slide 86 text

@stewemetal Supporting custom properties class OctopusButtonPrimary(...) : OctopusComposeBaseView(...) { @StyleableRes override val styleables: IntArray = R.styleable.OctopusButton init { initView(attrs) } override fun initAttributes(typedArray: TypedArray) { with(typedArray) { text.value = getString(R.styleable.OctopusButton_text).orEmpty() isEnabled.value = getBoolean(R.styleable.OctopusButton_enabled, true) isDestructive.value = getBoolean(R.styleable.OctopusButton_destructive, false) } } }

Slide 87

Slide 87 text

@stewemetal Supporting custom properties class OctopusButtonPrimary(...) : OctopusComposeBaseView(...) { @StyleableRes override val styleables: IntArray = R.styleable.OctopusButton init { initView(attrs) } override fun initAttributes(typedArray: TypedArray) { with(typedArray) { text.value = getString(R.styleable.OctopusButton_text).orEmpty() isEnabled.value = getBoolean(R.styleable.OctopusButton_enabled, true) isDestructive.value = getBoolean(R.styleable.OctopusButton_destructive, false) } } }

Slide 88

Slide 88 text

@stewemetal Supporting custom properties class OctopusButtonPrimary(...) : OctopusComposeBaseView(...) { @StyleableRes override val styleables: IntArray = R.styleable.OctopusButton init { initView(attrs) } override fun initAttributes(typedArray: TypedArray) { with(typedArray) { text.value = getString(R.styleable.OctopusButton_text).orEmpty() isEnabled.value = getBoolean(R.styleable.OctopusButton_enabled, true) isDestructive.value = getBoolean(R.styleable.OctopusButton_destructive, false) } } }

Slide 89

Slide 89 text

@stewemetal Supporting custom properties class OctopusButtonPrimary(...) : OctopusComposeBaseView(...) { ... private val text = mutableStateOf("") private val isEnabled = mutableStateOf(true) private val isDestructive = mutableStateOf(false) override fun initAttributes(typedArray: TypedArray) { with(typedArray) { text.value = getString(R.styleable.OctopusButton_text).orEmpty() isEnabled.value = getBoolean(R.styleable.OctopusButton_enabled, true) isDestructive.value = getBoolean(R.styleable.OctopusButton_destructive, false) } } }

Slide 90

Slide 90 text

@stewemetal Supporting custom properties class OctopusButtonPrimary(...) : OctopusComposeBaseView(...) { ... @Composable override fun Content() { OctopusTheme { OctopusButtonPrimaryCompose( text = text.value, enabled = isEnabled.value, destructive = isDestructive.value, ) } } }

Slide 91

Slide 91 text

@stewemetal Supporting custom properties class OctopusButtonPrimary(...) : OctopusComposeBaseView(...) { ... @Composable override fun Content() { OctopusTheme { OctopusButtonPrimaryCompose( text = text.value, enabled = isEnabled.value, destructive = isDestructive.value, ) } } } import com.tier.octopus.compose.widget .button.OctopusButtonPrimary as OctopusButtonPrimaryCompose

Slide 92

Slide 92 text

@stewemetal XML previews ⚠

Slide 93

Slide 93 text

@stewemetal XML previews ⚠ Works out of the box after Android Studio Giraffe Canary 8 https://issuetracker.google.com/issues/187339385 ⚠

Slide 94

Slide 94 text

@stewemetal Wrapping up

Slide 95

Slide 95 text

@stewemetal Octopus is Compose-first

Slide 96

Slide 96 text

@stewemetal

Slide 97

Slide 97 text

@stewemetal Was it worth it?

Slide 98

Slide 98 text

@stewemetal It dependsTM

Slide 99

Slide 99 text

@stewemetal Conclusions ● Having a design system to convert to Compose is already a good position

Slide 100

Slide 100 text

@stewemetal Conclusions ● Having a design system to convert to Compose is already a good position ● Choose a path that makes sense for your project and timeline

Slide 101

Slide 101 text

@stewemetal Conclusions ● Having a design system to convert to Compose is already a good position ● Choose a path that makes sense for your project and timeline ● Consider interoperability with legacy Views

Slide 102

Slide 102 text

@stewemetal Conclusions ● Having a design system to convert to Compose is already a good position ● Choose a path that makes sense for your project and timeline ● Consider interoperability with legacy Views ● Going Compose-first is a challenging journey

Slide 103

Slide 103 text

@stewemetal Conclusions ● Having a design system to convert to Compose is already a good position ● Choose a path that makes sense for your project and timeline ● Consider interoperability with legacy Views ● Going Compose-first is a challenging journey ● Zero ➑ Hero takes time We’re still here πŸ˜„

Slide 104

Slide 104 text

@stewemetal ● https://developer.android.com/jetpack/compose/designsystems ● https://adambennett.dev/2020/12/migrating-your-design-system-to-jetpack- compose-part-1/ ● https://www.droidcon.com/2022/06/28/custom-design-systems-in-compose/ ● https://github.com/androidx/androidx/blob/androidx-main/compose/docs/ compose-api-guidelines.md ● https://developer.android.com/jetpack/compose/compositionlocal ● https://developer.android.com/reference/kotlin/androidx/compose/ui/ platform/AbstractComposeView Resources

Slide 105

Slide 105 text

@stewemetal Composing a Design System IstvΓ‘n Juhos πŸ‘¨πŸ’» Senior Android Engineer @ TIER 
 οΏΌ Co-organizer of Kotlin Budapest 
 Mastodon: androiddev.social/@stewemetal 
 Twitter: @stewemetal 
 Web: istvanjuhos.dev 
 Thank you! / DziΔ™kujΔ™!