Hey, am I doing something wrong? Arrangement seems...
# compose
c
Hey, am I doing something wrong? Arrangement seems to have no affect
Copy code
val avatar = vectorResource(R.drawable.usertwo)
    val name = "test"

    Box(LayoutWidth.Fill + LayoutHeight(65.dp)) {
        Row(arrangement = Arrangement.End) {
            Box(modifier = LayoutWidth(48.dp) + LayoutHeight(48.dp)) {
                DrawVector(avatar)
            }
            Column {
                Text(name)
                Text("Test")
            }
        }
    }
Dev05
l
1. I think you need to put the layoutwidth.fill modifier on the row itself, right now the row is just wrapping its child so it has no extra space to arrange it inside 2. Yes, clip-path support is not currently implemented
👌 1
K 1
c
That's it! Thank you 🙂
s
Is clip-path still something that the compose ImageVector.Builder does not support? Just happened to have a case where I wanted to turn an xml file into a compose ImageVector and I can’t quite get to be right
l
No, it should work fine now
s
Oh alright! Seems like most of the tools that do this translation do not know about this API then. I used this https://www.composables.com/vector-drawable-to-compose and it didn’t really take the clip into consideration. I’ve definitely heard before that google had an internal tool to convert these icons into the icons that are used in that dependency that you share with all the material icons. Is that tool still internal, or could I just go use it directly so that it does the right thing for me here? Because I assume that tool should know how to do this properly right?
l
It doesn’t support it, I don’t think any of the Material icons need it so we didn’t implement it
Parsing xml resources inside compose though works fine with it
s
Hmm okay that makes sense. I wanted to just get rid of the XML resources to also not have to worry about the future if we want to share those resources in a multiplatform context. If they are just compose code it’s gonna be super simple to share, if it comes from android resources I’d need to do something about it probably. But for this case it looks like I can take the generated code and manually move some things inside the
clipPathData
and I am getting great results already! Thanks a lot for the link to this API, you have unblocked me here 😊