Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12537] BlackBerry: Define Ti.UI.SIZE and Ti.UI.FILL constants

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-02-02T07:53:49.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.1.0, 2013 Sprint 03 BB, 2013 Sprint 03
ComponentsBlackBerry
Labelsn/a
ReporterRussell McMahon
AssigneeJosh Roesslein
Created2013-01-31T22:56:04.000+0000
Updated2017-03-09T01:00:25.000+0000

Description

The SIZE and FILL constants need to be defined on the UI module. The layout engine expects the current values: - SIZE -> "UI.SIZE" - FILL -> "UI.FILL"

Acceptance Test

Ti.API.info('Ti.UI.FILL = ' + Ti.UI.FILL);
Ti.API.info('Ti.UI.SIZE = ' + Ti.UI.SIZE);

var win = Ti.UI.createWindow();

var view = Ti.UI.createView({
	backgroundColor: 'blue',
	width: Ti.UI.FILL, height: Ti.UI.SIZE
});
win.add(view);

var childView = Ti.UI.createView({
	backgroundColor: 'red',
	width: 200, height: 200
});
view.add(childView);

win.open();
1. The FILL and SIZE constant values should be printed to the log. Verify they contain the correct value ('UI.SIZE', 'UI.FILL'). 2. A blue view should be visible that fills the window horizontally and sizes vertically to fit it's child view (red). 3. A red view should be visibile that fills vertically and is 200 dp horizontally.

Comments

  1. Josh Roesslein 2013-02-02

    Created pull request [#22](https://github.com/appcelerator/titanium_mobile_blackberry/pull/22) to resolve issue.
  2. Lee Morris 2017-03-09

    Closing ticket as fixed.

JSON Source