How to access getResources() in non-activity class in Android?
<p>Please, refer the code below</p>

<pre><code>ForegroundColorSpan ss = new ForegroundColorSpan(context.getResources().getColor(R.color.red_text));
</code></pre>

<p>This is what i'm going to do, but it through an error. </p>
