Hachemi Hamadi
06/06/2021, 2:02 PMNader Jawad
06/06/2021, 9:57 PMModifier.drawWithContent
and call drawContent() first to draw the text then you can draw the additional lines/circles/squares on top of it. You can optionally add this modifier to your composable whenever your text is clicked based on a mutableStateOf boolean flagSe7eN
06/07/2021, 11:10 AMBox
and aligned the controls inside the box with some offset to properly position them. It's easier to click them this way.
2. It works great for me.Hachemi Hamadi
06/09/2021, 10:27 AMNader Jawad
06/09/2021, 5:03 PMmatvei
06/09/2021, 5:16 PMModifier.transformable
and Modifier.clickable
should work together alright. Or sub clickable
with Modifier.pointerInput
. It works and can be seen there: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]/samples/TransformableSample.kt;l=73?q=TransformableSample.ktHachemi Hamadi
06/09/2021, 5:51 PMModifier.pointerInput
. What i am trying to do is allowing the user to also use the circles in the image above as controllers for those gestures too. for now i am drawing them using Modifier.drawWithContent
so i am asking if there is a way to add gestures to drawCircle
Hachemi Hamadi
06/09/2021, 5:54 PMModifier.pointerInput
from the parent component, it’s going to be hard to implement for someone like me who is to Compose. but worth it. Thanks again 🙏Nader Jawad
06/09/2021, 5:56 PMmatvei
06/09/2021, 6:03 PM