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

Apps Access resources from nonactivity class

Welcome to AF!

And yes that looks correct.

The key is that you need a reference to the context which they call ctx in that code.
 
I was just wondering if this is correct, because - I have some utill clasess which works with resources and returns some data and context is needed to sent to all this utils class.

Thank you very much for response, I am very new to android development so a lot of things I do not know yet.. But I am still learning :)
 
Back
Top Bottom