how to get String in non context class of android from @String ?
my class is an adapter class and i am not using any context object in it.
how to get String in non context class of android from @String ?
my class is an adapter class and i am not using any context object in it.
You will have to pass a context in.
The way you get to the @String values is by using the method Context.getResources()
.
My suggestion would be to keep a private field that holds the context, and initialise it in your adapter's constructor.