Well, It's definitely an overkill. But, if you look at it's extensibility, it might suit you better.
Say, for example, here the value of the control we have is a number. The layout might be a EditText, Slider or something else. If you do it thru the Custom Dialog, you can easily change the Dialog's appearance, or extend it later if you want, without changing your code all over. But, again, it depends on your requirement. If you are sure that you would not use this Dialog in more than one place, or you will not change the implementation later, TreKing's method is the best solution. On Thu, Nov 4, 2010 at 8:48 PM, TreKing <[email protected]> wrote: > On Thu, Nov 4, 2010 at 1:08 AM, Kumar Bibek <[email protected]> wrote: > >> Go for Custom dialogs by extending the Dialog class. > > > This is overkill. You get the dialog object right in onClick, which you > know is an AlertDialog so you can cast it and call findViewById on that. No > need for a custom dialog. > > > ------------------------------------------------------------------------------------------------- > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices > > -- > 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]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com -- 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

