Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17859] Android: AlertDialog display buttons in wrong order

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionDuplicate
Resolution Date2017-06-27T17:58:30.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
LabelssupportTeam
ReporterMarco Cota
AssigneeEric Merriman
Created2014-10-14T15:32:13.000+0000
Updated2017-06-27T17:58:30.000+0000

Description

Issue

When the AlertDialog is called in Android the buttons are shown inverted as they are declared in the buttonNames array property, in iOS they are shown in the correct order.

Steps to repro

1. Run the test case 2. Click on Button Expected Result: The AlertDialog will show the buttons in the order they are declared in the buttonNames array. Expected Result: The AlertDialog show the buttons in a different order from the buttonNames array.

Test case

var window = Ti.UI.createWindow({
		backgroundColor : '#ffffff',
		layout : "vertical"
	});

	var button = Titanium.UI.createButton({
		title : 'Button',
		color : '#000000',
		backgroundColor : '#ff00ff',
		width : 150,
		top : 300,
		height : 40
	});
	button.addEventListener('click', function(e) {
		var dialog = Ti.UI.createAlertDialog({
			buttonNames : ['XX', 'YY'],
			message : 'Would you like to delete the file?',
			title : 'Delete'
		});
		dialog.show();
	});
	
	window.add(button);
	window.open();

Attachments

FileDateSize
alertdialog_android.png2014-10-14T15:32:13.000+000093863
alertdialog_ios.png2014-10-14T15:32:13.000+000051763

Comments

  1. Ingo Muschenetz 2014-10-14

    Is there a reason we can't use the existing ticket TIMOB-16556 for this?
  2. Lee Morris 2017-06-27

    Closing ticket as duplicate. Please refer to TIMOB-16556.

JSON Source