zack84a

Untitled

Jan 29th, 2012
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. //does the file exist in the project bundle...
  2. if(useImageName.length() > 1){
  3.  
  4. //does image exist in BT_Images folder...
  5. if(BT_fileManager.doesProjectAssetExist("BT_Images", useImageName)){
  6.  
  7. BT_debugger.showIt(activityName + ":backgroundWorkerThread using image from project bundle: \"" + useImageName + "\"");
  8. backgroundImage = BT_fileManager.getBitmapFromAssets(useImageName);
  9.  
  10. }else{
  11.  
  12. //does file exist in cache...
  13. if(BT_fileManager.doesCachedFileExist(useImageName)){
  14.  
  15. BT_debugger.showIt(activityName + ":backgroundWorkerThread using image from cache: \"" + useImageName + "\"");
  16. backgroundImage = BT_fileManager.getBitmapFromCache(useImageName);
  17.  
  18. }else{
  19.  
  20. //download from URL if we have one...
  21. if(backgroundImageURL.length() > 1){
  22.  
  23. //if we have a url..
  24. if(useImageName.length() > 1){
  25. //don't bother pulling name from URL, already have it..
  26. }else{
  27. if(backgroundImageURL.length() > 1){
  28. useImageName = BT_strings.getSaveAsFileNameFromURL(backgroundImageURL);
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment