matthileo

Icon Parse Pseudocode

Aug 5th, 2013
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.56 KB | None | 0 0
  1. if (URL.endswith(".GIF".ToLower()))
  2. {
  3.     icon=gifIcon;
  4. }
  5. else if (URL.contains("imgur.com".ToLower()) OR URL.endswith(".png".ToLower()) OR URL.endswith(".jpg".ToLower()) OR URL.endswith(".jpeg".ToLower)))
  6. {
  7.     icon=imageIcon;
  8. }
  9. else if (URL.contains("youtube.com".ToLower()) OR URL.contains("youtu.be".ToLower()))
  10. {
  11.     icon=videoIcon;
  12. }
  13. else if (URL.contains("play.google.com/store".ToLower()))
  14. {
  15.     icon=playIcon;
  16. }
  17. else if (URL.contains("reddit.com".ToLower() OR URL.contains("redd.it".ToLower())
  18. {
  19.     icon=redditIcon;
  20. }
  21. else
  22. {
  23.     icon=webIcon;
  24. }
  25.  
  26. setIcon(icon);
Advertisement
Add Comment
Please, Sign In to add comment