In the end I have performed this with the client code making an
explicit call to perform the required initialisation.  This doesn't
feel right, but it works.

On Sep 7, 8:12 am, Nigel <[email protected]> wrote:
> My application needs to be aware of a custom dialog, which is used
> only by a custom component.  By "aware" I mean through the
> onCreateDialog and onPrepareDialog.
>
> I would like the dialog to be fully encapsulated by the component, but
> if the component performs a:
>
> Dialog d = new CustomDialog(getContext());
> d.show();
>
> rather than:
>
> Activity a = (Activity)getContext();
> a.showDialog(CustomDialog.ID);
>
> I get an exception - primarily because the dialog's "onCreate(Bundle
> b)" method doesn't get automatically called.
>
> I'm looking for opinions on the best way to structure the code...
>
> Comments welcomed.
>
> Thanks,
>
> Nigel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to