Lines Matching refs:density
263 * provide a desired density such as {@link android.util.DisplayMetrics#DENSITY_LOW}
264 * {@link android.util.DisplayMetrics#DENSITY_MEDIUM}, etc. If no density is
265 * provided, the density of the current display will be used.
272 * @param density The optional desired density as per
276 public final Drawable loadIcon(@NonNull Context context, int density) {
277 return loadDrawable(context, density, providerInfo.getIconResource(), true);
282 * A client can optionally provide a desired density such as
284 * {@link android.util.DisplayMetrics#DENSITY_MEDIUM}, etc. If no density is
285 * provided, the density of the current display will be used.
292 * @param density The optional desired density as per
296 public final Drawable loadPreviewImage(@NonNull Context context, int density) {
297 return loadDrawable(context, density, previewImage, false);
367 private Drawable loadDrawable(Context context, int density, int resourceId,
373 if (density < 0) {
374 density = 0;
376 return resources.getDrawableForDensity(resourceId, density, null);