2

How can I make a design like the image with Jetpack Compose? I searched a lot, but I couldn't get any answer similar to the structure I wanted.

enter image description here

Vahit Keskin
  • 274
  • 1
  • 9

3 Answers3

2

You can try out Romain's newest library

Composable widget for Jetpack Compose that allows to flow text around arbitrary shapes over multiple columns.

to achieve this and much more: https://github.com/romainguy/combo-breaker

Alejandra
  • 576
  • 6
  • 10
0

How about using a simple Text only, but inside a Box where we can clip the size of the image using modifier!!

Box {
  Image(modifier = modifier.clicp(RoundedCornerShape(...)))
  Text(...)
}

modifier.clip(...) is something which can do the trick.

Akshay Nandwana
  • 1,260
  • 11
  • 18
  • I don't think this will provide the desired result. `Box` usually places composables above another, not around other composable. – Arun P M Mar 12 '23 at 06:23
0

You can add Images inside text using AnnotatedString and inLineContent parameter of Text Composable like How adding ImageSpan in jetpack compose Text

or you can use Box Composable and Clip your image using Modifier.clip(Shape)

Nikhil Dupally
  • 753
  • 1
  • 4
  • 12