I am in a situation where I have to use the `drawable folder` of my app form a non activity class. I tried using the parent activity with the following code:

```
ParentActivity pa = new ParentActivity();
Drawable d = pa.getResources()..getDrawable(R.drawable.icon);`

```

But this returns me a `NulLPointerException`. 
How can I achieve this?