Thanks for your reply. On Jun 26, 1:34 am, TreKing <treking...@gmail.com> wrote: > On Sat, Jun 25, 2011 at 5:19 AM, andrewg_oz <andrew.greg...@gmail.com>wrote: > > Not sure from looking at your code, but try calling create() on the builder > first, returning the Dialog from the function first and then show()'ing it, > or using showDialog() instead of the explicit call to show().
I've changed: return d.show(); To: AlertDialog ret = d.create(); ret.show(); return ret; No change. I then tried setting it up as a full managed dialog (created onCreateDialog function, made up an ID, new function to make the dialog). No change there either. onCreateDialog *is* being called and the dialog created, but nothing is showing up on the screen. .... OK, I've worked it out. I was integrating the zxing barcode scanner and from reading the instructions from: http://code.google.com/p/zxing/source/browse/trunk/android-integration/src/com/google/zxing/integration/android/IntentIntegrator.java There was a comment: "Note that initiateScan(Activity) returns an AlertDialog which is non- null if the user was prompted to download the application. This lets the calling app potentially manage the dialog. In particular, ideally, the app dismisses the dialog if it's still active in its onPause() method." So, in my onPause I added code to dismiss the dialog. It seems, though, that calling show() pauses the activity, which dismisses the dialog! So, that comment was wrong, but is it still trying to say something important? Should I be dismissing the dialog somewhere? Does it matter if the dialog is managed (as it now is)? Thanks. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en