flex icon indicating copy to clipboard operation
flex copied to clipboard

How make child width a percent of the parent?

Open mamcx opened this issue 6 years ago • 4 comments

I'm evaluating this lib for incorporate into a iOS/Android project. I can't figure how is possible to say that a child is 50% width of his parent.

I say grow, but the only values that make something are 1 or 0.

mamcx avatar Mar 15 '18 22:03 mamcx

We plan to add support for percentage units later on. But the grow property can be a float (so 0.5), maybe it will work for you?

lrz avatar Mar 20 '18 15:03 lrz

This (and the android counterpart) is not in nuget:

https://github.com/xamarin/flex/blob/master/bindings/csharp/samples/FlexDemo.Shared/Item.cs

This mean, is not possible with just the nuget import to actually use the library on the native views.

Only Item, Direction, position, Align and wrap are available.

mamcx avatar Mar 20 '18 16:03 mamcx

I think you commented in the wrong ticket (you probably wanted to follow on #43 :)). In any case Item.cs isn't public API, it's something I created for the samples. This said, there has been talks about cleaning up the code and making this public. The code needs testing too. If you would like to help with this feel free!

lrz avatar Mar 20 '18 18:03 lrz

Ah, yes, the comment is for #43 !

mamcx avatar Mar 20 '18 18:03 mamcx