Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2164] Android: Options dialog - dismissing dialog by way of back button reports itself as a dialog selection

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2011-04-15T03:12:28.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0
ComponentsAndroid
Labelsandroid, back, button, defect, dialog, options
ReporterThomas Huelbert
AssigneeDon Thorp
Created2011-04-15T03:12:28.000+0000
Updated2017-03-02T19:18:10.000+0000

Description

1.5.0.70ce98 g2 running 2.2, G1 running 1.6

1.BaseUI>Views>Options dialog
2.tap show dialog, then use the hardware back button to dismiss it. read reported value

results:"you selected 1" which is the same value reoprted when selecting the second item in the dialog. This seems odd.

Comments

  1. Don Thorp 2011-04-15

    Check to see if a initial value is being set.

  2. Don Thorp 2011-04-15

    If cancel is sent in the creation options, then it is returned when the cancel button or the back button is selected. If no cancel is sent, result is -1 if back is hit.

    Looks like it's set to 1 in the test.

       var dialog = Titanium.UI.createOptionDialog({
           options:['Option 1', 'Option 2', 'Option 3'],
           destructive:2,
           cancel:1,
           title:'I am a title'
       });
       
  3. Thomas Huelbert 2011-04-15

    bad qe taken out back and beaten for not checking the script before logging a bug, test behaves as expected.

  4. Lee Morris 2017-03-02

    Closed as invalid.

JSON Source