dexapier / android-scripting

Automatically exported from code.google.com/p/android-scripting
0 stars 0 forks source link

Incompatibility between DatePicker dialog and OptionsMenu #596

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What device(s) are you experiencing the problem on?
Galaxy S

What firmware version are you running on the device?
Ice Cream Sandwich   ICS_4.0.3.0(RC3.1)_GalaxyS_Full

What version of the product are you using? On what operating system?
I'm using sl4a_r4 with python 2.6

Please provide any additional information below.

I noticed a problem using DatePicker dialog while an OtionsMenu is present:
the phone menu button doesn't show the menu after a DatePicker dialog has been 
shown,
the same thing doesn't happen if an Alert dialog has been shown (I mean that 
every thing works fine)

I wrote this little example to test this problem.
- I create an OptionMenu and wait a little just to check menu button behaviour: 
at this time it always works.
- Depending on how you set DatePicker variable it will show a DatePicker or an 
Alert dialog. 
It will show only one of them and then it will wait a little bit to see if the 
button continues to work.
Well, it will work only for DatePicker = False but no for DatePicker = True.

This is my example:

import android
import time
DatePicker = True

droid=android.Android()

droid.webViewShow('fake') # if you don't show a webView you can't show an 
option menu (please correct accordingly Menu.py in sl4a example scripts)

droid.addOptionsMenuItem("Silly","silly",None,"star_on")
droid.addOptionsMenuItem("Sensible","sensible","I bet.","star_off")
droid.addOptionsMenuItem("Off", "off",None,"ic_menu_revert") 
time.sleep(10)         # during this interval the menu button always works

if DatePicker:
    droid.dialogCreateDatePicker('2012','01','02')
    droid.dialogShow()
else:
    droid.dialogCreateAlert("??")
    droid.dialogSetNeutralButtonText("X")
    droid.dialogShow()

result = droid.dialogGetResponse()
while result:
    print result
    result = droid.eventPoll(1).result

print  droid.eventWait(10000).result        # during this interval the menu 
button works if DatePicker = False
                                                          # but doesn't if DatePicker = True

Original issue reported on code.google.com by iloc...@gmail.com on 12 Feb 2012 at 2:25

GoogleCodeExporter commented 9 years ago
I think that you can close this as a bug.
I realized that if a dialogDismiss() is called after the dialogCreateDatePicker 
finishes, everything works fine.

Original comment by iloc...@gmail.com on 16 Feb 2012 at 12:19

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This apears to be a non-issue (ref Comment 1)

Original comment by rjmatthews62 on 30 Mar 2012 at 5:09