Hello, I'm currently migrating my app to Compose W...
# compose-wear
a
Hello, I'm currently migrating my app to Compose Wear OS and I'm struggling with ToggleChips & multiple lines. What exactly to do if I want to have ToggleChip height adapted to the number of lines of label / secondarylabel? I can specify maxlines but without success, wrap content height does not help either. Label text will replace secondarylabel with 2nd line but there is still some text missing and secondary label is missing completely. I'll be happy for any help 🙂
IMG_20230227_140743_783.jpg
a
Are you wanting the chip itself to grow/shrink with its content's height?
a
Yes
Any Idea? Maybe that fillMaxWidth modifier is not good to use?
a
Did you try setting the wrap content height on the chip? In the screenshot, you've set it on the text
j
The
ToggleChip
is not designed to adapt its height. The UX guidance is here https://developer.android.com/training/wearables/compose/toggle-chips. You can override the height if you want to using modifiers. But I would suggest if you are looking for larger content think whether other UX approaches might be a better fit.
a
Thanks for your answers 🙂 Solved it by different UX approach