MeasuredSize::State heightState;
} childState = { MeasuredSize::State::MEASURED_SIZE_OK, MeasuredSize::State::MEASURED_SIZE_OK };
+ // Reset total length
+ mTotalLength = 0;
+
// measure children, and determine if further resolution is required
for( unsigned int i=0; i<GetChildCount(); ++i )
{
int start = 0;
int dir = 1;
- // In case of RTL, start drawing from the last child.
- // @todo re-work to draw the first child from the right edge, and move leftwards.
- // (Should have an alignment also)
+ // In case of RTL, start drawing from the last child and apply right alignment.
+ // @TODO Should we have also support Actor HorizontalAlignment|VerticalAlignment in general for LinearLayout?
if( isLayoutRtl ) {
start = count - 1;
dir = -1;
+ childLeft = padding.start + right - left - mTotalLength;
}
for( unsigned int i = 0; i < count; i++)
MeasuredSize::State heightState;
} childState = { MeasuredSize::State::MEASURED_SIZE_OK, MeasuredSize::State::MEASURED_SIZE_OK };
+ // Reset total length
+ mTotalLength = 0;
+
// measure children, and determine if further resolution is required
for( unsigned int i=0; i<GetChildCount(); ++i )
{