flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: [FlexJS] DataItemRenderer and HorizontalLayout - question
Date Wed, 20 Apr 2016 04:20:23 GMT

On 4/19/16, 12:30 PM, "piotrz" <piotrzarzycki21@gmail.com> wrote:

>I was experimenting with DataItemRenderer in TodoListSampleApp. I see that
>TodoItemRenderer have adjustSize method with logic which positioning
>controls. - They have displayed horizontally. - Nicly in flash and js.
>I've tried create new item renderer [1] with HorizontalLayout bead. - The
>result looks like that [2].
>My question is - Do I always have to adjust position "manually"? Is it the
>way how it should be done in item renderers ?

Well, I didn't look into why it didn't work, but a DataItemRenderer is not
a container so that could be why dropping in a HorizontalLayout didn't
work.  IMO, renderers shouldn't have to be heavy as containers for
performance reasons.  Because FlexJS is trying not to have a
one-thing-for-all-scenarios philosophy, it is certainly possible to either
fix HorizontalLayout, create a different HorizontalLayout that doesn't
require Container, or even create things like TwoChildHorizontalLayout.
You should already see layouts like OneFlexibleChildHorizontalLayout in
the doc.


View raw message