Created
May 8, 2017 12:43
-
-
Save r-trigo/fc9e605bb2764eee789931fa0171cd47 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Bitmap LoadImageFromWeb(String url) { | |
url = "https:" + url; | |
Bitmap bmp = null; | |
URL[] myURL = new URL[1]; | |
try { | |
myURL[0] = new URL(url); | |
bmp = BitmapFactory.decodeStream((InputStream) myURL[0].getContent()); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
return bmp; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment