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.

imn
- 620
- 1
- 7
- 19
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…

houman
- 23
- 4
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…

Sara Han
- 1
- 1
-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?

Ali Sidhu
- 119
- 9