I guess my method's usefullness isn't apperant from a simplistic
example. Believe me, in my app, with many dialogs, some of which can
show their own message pop-ups and sub dialogs, it's a godsend not
having to touch the Activity every time and be able to encapsulate the
dialog's functionality in its own class.

Perhaphs, having 4 lines of boilerplate code in an Activity, instead
of 3 (DialogId, onCreate, onPrepare) is an overkill if you want to
show a simple message.  But to repeat what I've said, it's been hugely
beneficial for me maitenance-wise where I've got complex dialogs with
different execution paths.

Not to mention, basic functionality, like Managed Dialogs still not
working properly under certain circumstances in SDK level 8.


On Jun 30, 1:39 am, TreKing <[email protected]> wrote:
> On Sat, Jun 26, 2010 at 1:20 AM, Zsolt Vasvari <[email protected]> wrote:
>
> >  Here's an example of what I do, a simple MessageDialog class.
>
> Doesn't look so simple. Looks like you re-invented the Dialog class. And it
> looks like you have to keep references to all dialogs and remember to save
> and restore their state. I don't see how this is better than a list of
> global constant IDs.
>
> > It took me a while to perfect the mechanism, but it works great with
> > screen orientation changes and activity save/restore.
>
> So does using the built in managed system, if you use it correctly, and it
> costs you nothing.
>
> Clearly it's up t you if you prefer this way, but I definitely wouldn't
> advise people to waste time implementing their own dialog class to avoid
> using the built-in version's implementation strategy which works just fine
> when used correctly, however cumbersome it may be.
>
> ---------------------------------------------------------------------------­----------------------
> TreKing - Chicago transit tracking app for Android-powered 
> deviceshttp://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

Reply via email to