I'm a native android app developer using Jetpack Compose to implement the UI. My goal is…
- User
I'm a native android app developer using Jetpack Compose to implement the UI. My goal is to implement the UI screen for my android app. The UI will be responsible for the user to customize the theme style for the app. Let me give you a detailed explanation of the screen,
- The user will have a list of color options to choose from and the selected color will be known as 'Seed Color' and based on this I will generate a color palette which can be used as a theme through the app.
- The users should be able to choose from a predefined list of colors and as well as a list of colors extracted from the wallpaper to have dynamic ColorScheme but extracting color from wallpaper is only possible above 'Android 11'. Like I have mentioned there will be an option to choose from a list of predefined colors and as well as a list of colors extracted from wallpaper. I would prefer both of them shown separately with an appropriate UI. I will take care of all the necessary core functionality like getting the list colors from wallpaper, generating the ColorScheme based on 'Seed colour', etc. All you have to do is just to implement the UI that is responsible for showing the list of predefined colors and list of colors from wallpaper. For now just pass the static color list for both for demo purposes. The list of colors will be displayed as lazyRow with circular shape and the code for implementing the lazyRow with circular shape is already implemented by me and I have shared the code on how to use it, take a look on how to use the code and implement the entire UI which I have requested to show the user list predefined colors and list of colors from wallpaper separately. Figure out what would be the best way to show both of them and come up with an attractive and interactive UI for my usecase and implement the entire code using Jetpack Compose by following best practices.
Ideally I would prefer an UI that doesn't displays two separate lists of colors: predefined colors and colors extracted from the wallpaper one below another, as it seem super simple UI. Also I would prefer not to use a boring typical Tab Layout as well, as I am looking to have somewhat more interactive UI by which I am not talking about animation. I would like to choose the appropriate UI for my usecase and implement it accordingly.
code@Composable fun ColorSelectorScreen() { val colors = remember { listOf( Color.Red, Color.Green, Color.Blue, Color.Yellow, Color.Cyan, Color.Magenta ) } var selectedColor: Color? by remember { mutableStateOf(null) } Column { ColorSelector( colors = colors, selectedColor = selectedColor, onColorSelected = { color -> selectedColor = color }, ) } } - Assistant