google / flexbox-layout

Flexbox for Android
Apache License 2.0
18.22k stars 1.79k forks source link

Android Studio Integration #607

Open NathanC opened 2 years ago

NathanC commented 2 years ago

Version of the flexbox library

3.0.0


I just downloaded flexbox-layout, and I'm brand new to Android development (just started today), so I might be missing some obvious stuff. I'm trying to use the flexbox layout in Android Studio, and there are 3 separate issues:

1) The Flexbox Layout does not show up in the Palette in design view. Is there a way to get it to appear there? 2) Dragging e.g., a TextView from the palette onto an existing flexbox layout doesn't add it to the layout (I need to add it manually in XML). Is there a way to drag and drop onto the layout? 3) Flex basis percentage attributes cause Android Studio to give an error. It still renders in the viewer properly, but the UI says "invalid fraction" and won't let you update the attribute, requiring doing it in code (which is only a minor inconvenience, just thought I should let you guys know)

image

If you would like me to split these into different issues, let me know. I'm mainly looking for answers to the first 2, so I can use the UI to create new layouts

Thanks for creating this library, it seems really useful!