On Wed, May 25, 2011 at 12:26 PM, Tommy <[email protected]> wrote:

> So far I have copied this method-code into each activity, but there must be
> a way to make such a method accessible to all three activities within this
> application?
>

Of course. You could have a base class that does function that the others
extend from. Or have some helper object that does the work and have the
others create an instance of it to do the work. Or a static function that
does the work requiring a single call from the other classes.

These are general programming concepts that are not specific to Android. Get
yourself some books that discuss good programming practices and just keep
hacking - this is the kind of stuff you learn with experience over time.

-------------------------------------------------------------------------------------------------
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

Reply via email to