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.
Asked
Active
Viewed 820 times
2
-
Here: https://stackoverflow.com/a/73819143/17787605 – bylazy Oct 30 '22 at 17:41
-
1Thanks for your reply @bylazy No matter how small I enlarge the image, it does not exceed the size of the text. Do you have a solution for this? – Vahit Keskin Oct 30 '22 at 17:52
-
Dont't think it's possible with out-of-box Compose components. Here is some link from another similar question: https://github.com/deano2390/FlowTextView – bylazy Oct 30 '22 at 18:29
-
1How about https://github.com/oleksandrbalan/textflow ? – Alejandra Nov 01 '22 at 11:10
-
@Alejandra You are super :) Thank you very much, here is the answer I was looking for :D – Vahit Keskin Nov 01 '22 at 12:00
3 Answers
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