Beispiel #1
0
  @Override
  public final DataFetcher<T> getResourceFetcher(Uri model, int width, int height) {
    final String scheme = model.getScheme();

    DataFetcher<T> result = null;
    if (isLocalUri(scheme)) {
      result = getLocalUriFetcher(context, model);
    } else if (urlLoader != null && ("http".equals(scheme) || "https".equals(scheme))) {
      result = urlLoader.getResourceFetcher(new GlideUrl(model.toString()), width, height);
    }

    return result;
  }
Beispiel #2
0
 public DataFetcher getResourceFetcher(File file, int i, int j) {
   return uriLoader.getResourceFetcher(Uri.fromFile(file), i, j);
 }