Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Accessing Drawable resources from a not context class

By: a guest on Feb 22nd, 2012  |  syntax: None  |  size: 0.17 KB  |  hits: 8  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. private Context ctx = getApplication();
  2.  
  3. ... some code ...
  4.  
  5. MyClass myClass = new MyClass(ctx);
  6.        
  7. private Context ctx = null;
  8.  
  9. public MyClass(ctx) {
  10.     this.ctx = ctx;
  11. }