Code example for URL

Methods: getContent

0
	public static Drawable getDrawable(String imageUrl) {
		if (imageUrl == null) {
			return null; 
		} 
		try { 
			URL url = new URL(imageUrl);
			InputStream is;
			is = (InputStream) url.getContent();
			Drawable d = Drawable.createFromStream(is, "src");
			return d;
		} catch (IOException e) {
			e.printStackTrace();
		} 
		return null; 
	} 
 
	public static Bitmap getBitmap(String imageUrl) {
		if (imageUrl == null) {
			return null; 
		} 
		try {