Questions tagged [android-jetpack-compose-canvas]

79 questions
0
votes
2 answers

How to draw a multicolored bar with Canvas in Jetpack Compose?

How to attain a UI like this in Compose? Suppose there is a list of slices: data class Slice(val value: Float, val color: Color) Group-1 is 14.6, Red Group-2 is 61.8, Blue Group-3 is 23.6, Green Total 100.0 Canvas is not necessary anyhow.
0
votes
0 answers

Jetpack compose canvas clip to rounded arc shape

I have the following two overlaying 360 degrees arc (essentially two circles) clipped by an arc shape. Unlike drawArc, addArc does not take into style = ... which can be used to define cap = StrokeCap.Round. The current clip looks as expected, an…
0
votes
0 answers

Jetpack compose BlendMode.Xor different from preview

I am testing a simple Canvas composable using BlendMode.Xor option. Below is my code : class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent…
-2
votes
1 answer

How to draw one side curve of box in jetpack compose android

I want to draw this shape in jetpack compose, anybody has idea how we can achieve this?
1 2 3 4 5
6