As of Titanium 8.1.0, Android now supports displaying an OptionDialog without radio buttons if its "selectedIndex" property is not set (or set to -1). See:
But one usability issue with the current implementation is that tapping on an OptionDialog button causes the "selectedIndex" to be set to the index of the tapped button. The issue with this is if the OptionDialog is re-shown, it'll show radio buttons instead of plain buttons which is not desired. This happens because the "selectedIndex" was set.
If the OptionDialog is not showing radio buttons, then it should not automatically set the "selectedIndex" property when tapping a button. The "click" event already provides the index of the button that was tapped on and this is enough. Besides, iOS does not support the "selectedIndex" property anyways, making this behavior portable.
However, if the developer does set "selectedIndex" via code to show radio buttons, then the OptionDialog should maintain the old behavior and update the "selectedIndex" property with the clicked button index.
Steps to reproduce:
- Build and run the below code on Android.
- Tap on the "Show Dialog" button.
- Tap on the dialog's "Option 1" button.
- Tap on the "Show Dialog" button again to re-show it.
- Notice the dialog shows radio buttons in front of every option button. (This is the usability issue.)
Set "selectedIndex" to -1 before re-showing the dialog.