On Sat, Aug 21, 2010 at 12:47 PM, Moto <[email protected]> wrote:
> So your method looks really good but it's just about the same thing if I > create a CustomActivity class extends Activity and overwrite the methods I > need to do special things such as checking user pref. I guess both ways can > be clean.... I'm guessing ether way will have the same performance... > Right. Key difference being that with CustomActivity, you can only extend one Activity. So if you app has a map, for example, you HAVE to extend MapActivity and can't use CustomActivity anymore. But you can use this proxy idea in your CustomMapActivity, or whatever you call it. This is why I've found it useful in Android, as I use ExpandableListActivit, ListActivity, PreferenceActivity, and MapActivity (and probably will use others at some point). Also, mentally replace all the "->" with "." in the pseudo code. I think I subconsciously miss C++ =P ------------------------------------------------------------------------------------------------- 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] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

