@Test public void getPicassoKindFull() throws Exception { assertThat(getPicassoKind(513, 385)).isEqualTo(FULL); assertThat(getPicassoKind(1000, 1000)).isEqualTo(FULL); assertThat(getPicassoKind(1000, 384)).isEqualTo(FULL); assertThat(getPicassoKind(1000, 96)).isEqualTo(FULL); assertThat(getPicassoKind(96, 1000)).isEqualTo(FULL); }
static PicassoKind getPicassoKind(int targetWidth, int targetHeight) { if (targetWidth <= MICRO.width && targetHeight <= MICRO.height) { return MICRO; } else if (targetWidth <= MINI.width && targetHeight <= MINI.height) { return MINI; } return FULL; }
MediaStoreRequestHandler extends ContentStreamRequestHandler { static PicassoKind getPicassoKind(int targetWidth, int targetHeight) { if (targetWidth <= MICRO.width && targetHeight <= MICRO.height) { return MICRO; } else if (targetWidth <= MINI.width && targetHeight <= MINI.height) { return MINI; } return FULL; } }
MediaStoreRequestHandler extends ContentStreamRequestHandler { static PicassoKind getPicassoKind(int targetWidth, int targetHeight) { if (targetWidth <= MICRO.width && targetHeight <= MICRO.height) { return MICRO; } else if (targetWidth <= MINI.width && targetHeight <= MINI.height) { return MINI; } return FULL; } MediaStoreRequestHandler(Context context); }
MediaStoreRequestHandler extends ContentStreamRequestHandler { static PicassoKind getPicassoKind(int targetWidth, int targetHeight) { if (targetWidth <= MICRO.width && targetHeight <= MICRO.height) { return MICRO; } else if (targetWidth <= MINI.width && targetHeight <= MINI.height) { return MINI; } return FULL; } MediaStoreRequestHandler(Context context); @Override boolean canHandleRequest(Request data); @Override Result load(Request request, int networkPolicy); }
MediaStoreRequestHandler extends ContentStreamRequestHandler { static PicassoKind getPicassoKind(int targetWidth, int targetHeight) { if (targetWidth <= MICRO.width && targetHeight <= MICRO.height) { return MICRO; } else if (targetWidth <= MINI.width && targetHeight <= MINI.height) { return MINI; } return FULL; } MediaStoreRequestHandler(Context context); @Override boolean canHandleRequest(Request data); @Override Result load(Request request, int networkPolicy);  }