OptionDialog crash on Android

You must Login before you can answer or comment on any questions.

Hi. Just trying to display an option dialog on Android, but it makes the whole app crash without any clear error message. Works on iOS. What could be wrong here?

var rowOptions = Ti.UI.createTableViewRow({
            height: 105,
        });
 
        rowOptions.add(Ti.UI.createImageView({
            image:  'images/options.png'
        }));
 
        var dialog = Ti.UI.createOptionDialog({
          cancel: 3,
          options: ['Website', 'FaceBook', 'Twitter', 'Close'],
          selectedIndex: 2,
          title: 'More Info'
        });
 
        dialog.addEventListener('click', function(e){
            switch (e.index){
                case 0:
                    Ti.Platform.openURL('http://c.com');
                    break;
                case 1:
                    Ti.Platform.openURL('http://www.facebook.com/pages/c');
                    break;
                case 2:
                    Ti.Platform.openURL('http://twitter.com/c');
                    break;
                default:
                    break;
            }
        });
 
        rowOptions.addEventListener('click', function(e){
            dialog.show();                              
        }); 
 
        section.add(rowOptions);

1 Answer

Have you tried clean and rebuild the project again.

Your Answer

Think you can help? Login to answer this question!