Esempio n. 1
0
  public void display(
      ImageView imageView,
      String uri,
      int imageWidth,
      int imageHeight,
      CompressFormat compressFormat) {
    BitmapDisplayConfig displayConfig = displayConfigMap.get(imageWidth + "_" + imageHeight);
    if (displayConfig == null) {
      displayConfig = globalConfig.getDefaultDisplayConfig();
      displayConfig.setBitmapHeight(imageHeight);
      displayConfig.setBitmapWidth(imageWidth);
      displayConfigMap.put(imageWidth + "_" + imageHeight, displayConfig);
    }

    doDisplay(imageView, uri, displayConfig, compressFormat);
  }
Esempio n. 2
0
  public void display(
      ImageView imageView,
      String uri,
      int imageWidth,
      int imageHeight,
      Bitmap loadingBitmap,
      Bitmap loadFailedBitmap,
      CompressFormat compressFormat) {
    BitmapDisplayConfig displayConfig =
        displayConfigMap.get(
            imageWidth
                + "_"
                + imageHeight
                + "_"
                + String.valueOf(loadingBitmap)
                + "_"
                + String.valueOf(loadFailedBitmap));
    if (displayConfig == null) {
      displayConfig = globalConfig.getDefaultDisplayConfig();
      displayConfig.setBitmapHeight(imageHeight);
      displayConfig.setBitmapWidth(imageWidth);
      displayConfig.setLoadingBitmap(loadingBitmap);
      displayConfig.setLoadFailedBitmap(loadFailedBitmap);
      displayConfigMap.put(
          imageWidth
              + "_"
              + imageHeight
              + "_"
              + String.valueOf(loadingBitmap)
              + "_"
              + String.valueOf(loadFailedBitmap),
          displayConfig);
    }

    doDisplay(imageView, uri, displayConfig, compressFormat);
  }