Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8290] iOS: ActivityIndicator layout issue

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-03-26T09:34:07.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterShannon Hicks
AssigneeVishal Duggal
Created2012-03-06T11:59:47.000+0000
Updated2012-03-30T12:51:04.000+0000

Description

ActivityIndicator doesn't work properly when it's parent container uses the 'layout' property and/or has an 'auto' height/width. Here's an example:
var win = Ti.UI.createWindow();

var innerView = Ti.UI.createView({height:'auto',left:5,right:5,layout:'vertical'});

var actInd = Titanium.UI.createActivityIndicator({
	left:'auto',
	right:'auto',
	top:10,
	style:Titanium.UI.iPhone.ActivityIndicatorStyle.BIG
});
innerView.add(actInd);
actInd.show();

var loadingLabel = Titanium.UI.createLabel({
	color:'white',
	font:{fontSize:16,fontWeight:'bold', fontFamily:'Arial'},
	textAlign:'center',
	left: 0,
	right:0,
	top:20,
	height:'auto',
	text:'Loading'
});
innerView.add(loadingLabel);

win.add(innerView);
win.open();

According to the code, the Activity Indicator should appear above the text, but they render on top of each other.

Test results:

works fine on 1.8.2 but not on 2.0 CI

Attachments

FileDateSize
iOS Simulator Screen shot Mar 26, 2012 10.30.34 AM.png2012-03-26T09:33:42.000+00007176

Comments

  1. Vishal Duggal 2012-03-26

    See attched screenshot. Tested on IOS sim 4.3, 5.0. 5.1
  2. Michael Pettiford 2012-03-30

    Closing issue Tested with Ti Studio build 2.0.0.201203291340 Ti Mobile SDK 2.0.0.v20120329191102 hash r1fbf18c4 OSX Lion 10.7.3 iPhone 4S OS 5.0.1 Cannot reproduce issue

JSON Source