Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13022] Android: View percentage height not related to parent when parent height is Ti.UI.SIZE

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2013-03-11T17:07:23.000+0000
Affected Version/sRelease 3.0.2
Fix Version/sn/a
ComponentsAndroid
LabelssupportTeam
ReporterBetty Tran
AssigneeIngo Muschenetz
Created2013-03-11T16:29:57.000+0000
Updated2017-03-20T21:53:23.000+0000

Description

Description

When a parent view does not have a fixed height, i.e. defined using Ti.UI.SIZE, its child view height when set to a percentage is relative to the window size rather than the view size. This does not happen if we define a height for the parent view.

Code to reproduce

https://gist.github.com/davidecassenti/146958c11f53e5fd874f

Use Case

We have a container view, tileHolder with horizontal layout. Inside tileHolder are two views, leftTile and rightTile. leftTile height is Ti.UI.SIZE (it has to be dynamic), and we want to set the rightTile to the same height. Both left and right have 50% width.

Comments

  1. Vishal Duggal 2013-03-11

    Documented as undefined behavior http://docs.appcelerator.com/titanium/latest/#!/guide/UI_Composite_Layout_Behavior_Spec-section-4196675_UICompositeLayoutBehaviorSpec-UNDEFINEDbehavior
  2. Lee Morris 2017-03-20

    Closing ticket as invalid.

JSON Source