Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11511] Popover 'height' and 'width' cannot be automatically set

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-10-29T21:03:29.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.0.0, Release 3.1.0, 2012 Sprint 22 API, 2012 Sprint 22
Componentsn/a
LabelsRegression, api, developer-preview, module_popover, qe-review, qe-testadded, triage
ReporterFederico Casali
AssigneeSabil Rahim
Created2012-10-16T22:51:32.000+0000
Updated2013-01-08T02:54:11.000+0000

Description

Problem description

It is not possible to set height/width to automatically size on the Popover contents. In 1.8.2 the 'auto' property was working fine as expected. With 2.0 and major, both using 'auto' or Ti.UI.SIZE, the height and weight values are set to zero. Also without specifying height and width values, those are set to zero. See attached sample code:
var win = Ti.UI.createWindow({
	backgroundColor:'gray'
});

var view = Ti.UI.createView({
	right:20,
	height:Ti.UI.SIZE,
	width:100,
	backgroundColor:'white',
	borderColor:'black',
});
var label = Ti.UI.createLabel({
	text:"Click for opening the Popover"
});
view.add(label);

var contentView = Ti.UI.createView({
	height:200,
	width:150,
	backgroundColor:'blue'
});
var popover = Ti.UI.iPad.createPopover({
    width: Ti.UI.SIZE,
    height: Ti.UI.SIZE,
    title: 'Title',
});
popover.add(contentView);

win.addEventListener('click', function(){
	popover.show({view:view});
});

win.add(view);
win.open();

Comments

  1. Sabil Rahim 2012-10-26

    PR against master https://github.com/appcelerator/titanium_mobile/pull/3335
  2. Vishal Duggal 2012-10-30

    Backport PR https://github.com/appcelerator/titanium_mobile/pull/3354
  3. Anshu Mittal 2013-01-08

    Tested with: SDK: 3.0.0GA, 3.1.0.v20130107133402 Studio: 3.0.1.201212181159 Device: iPad2(v 5.1) Popover height and width are automatically set.

JSON Source