• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps is it possible to put a listener on a non-activity class?

marcc888

Lurker
hello gurus,

is it possible to put a listener on a non-activity class?

like i have a main activity, and i have another library.java to where i want to put my change location listener.

Best,

Marc
 
Short answer: yep

Long answer: yes, indeed.

Listeners can exist in any code but you'll want to put them somewhere you find usefull of course. This is why many exist on activities, but they don't have to exist there.
 
Back
Top Bottom