Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11687] ipad OptionDialog height bug

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
LabelsOptionDialog, height, ipad
ReporterBar Bruy
AssigneeUnknown
Created2012-11-07T08:53:18.000+0000
Updated2018-02-28T20:04:25.000+0000

Description

The height of the option dialog is wrong computed. Some report it as the last element that cannot be viewed.(can be some more) when you add a titlePrompt to the window the height of the optiondialog reduces but the lenght for the content does not(scroll that far). I include a lot of pictures produced by the code below. The testcode tries to show 19 options. and then when you go from rotate the app on screen 5 you get screen 6
(function() {
	var win = Titanium.UI.createWindow({
	  	title: 'iPad OptionDialog Height problem',
	  	//titlePrompt:'titlePromt makes it worse',
	  	exitOnClose: true,backgroundColor:'white',navBarHidden:false,modal:true,barColor:'red',
	});
	
	var view = Ti.UI.createView({height:Ti.UI.FILL,layout:'vertical',width:Ti.UI.FILL});
	win.add(view);	
	for(var i=0,j=10; i<j; i++){
		addDialogButton(i);	
	}		
	function addDialogButton(index){
		var button = Ti.UI.createButton({height:Ti.UI.SIZE,width:Ti.UI.SIZE,bottom:10,top:10,index:index});
		if(index%2==0)
			button.title = 'show near button '+index;
		else
			button.title = 'button '+index;
		view.add(button);
		button.addEventListener('click',showOptionDialog);
	}	
	function showOptionDialog(){
		dialog = Titanium.UI.createOptionDialog({
			title:'optionDialog',
		    options:['option 1','option 2','option 3','option 4','option 5','option 6','option 7','option 8','option 9','option 10','option 11','option 12','option 13','option 14','option 15','option 16','option 17','option18','option19'],
		});
		if(this.index%2==0)
			dialog.show({view:this});
		else
			dialog.show();
	}
	win.open();
})();

Attachments

FileDateSize
1.png2012-11-07T08:53:18.000+000084652
2.png2012-11-07T08:53:18.000+000085604
3 TitlePrompt.png2012-11-07T08:53:18.000+000085529
4.png2012-11-07T08:53:18.000+000076065
5.png2012-11-07T08:53:18.000+000080407
6.png2012-11-07T08:53:18.000+000094512

Comments

No comments

JSON Source