Commit 6016418c by birdbird Committed by GitHub

Support file schemes in SimpleBitmapLoader

Fixes #108
parent 2c720102
......@@ -89,6 +89,9 @@ public final class SimpleBitmapLoader implements BitmapLoader {
}
private static Bitmap load(Uri uri) throws IOException {
if (uri.getScheme().equals("file")) {
return BitmapFactory.decodeFile(uri.getPath());
}
URLConnection connection = new URL(uri.toString()).openConnection();
if (!(connection instanceof HttpURLConnection)) {
throw new UnsupportedOperationException("Unsupported scheme: " + uri.getScheme());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment