Lines Matching defs:density
260 * provide a desired density such as {@link android.util.DisplayMetrics#DENSITY_LOW}
261 * {@link android.util.DisplayMetrics#DENSITY_MEDIUM}, etc. If no density is
262 * provided, the density of the current display will be used.
269 * @param density The optional desired density as per
273 public final Drawable loadIcon(@NonNull Context context, int density) {
274 return loadDrawable(context, density, providerInfo.getIconResource(), true);
279 * A client can optionally provide a desired density such as
281 * {@link android.util.DisplayMetrics#DENSITY_MEDIUM}, etc. If no density is
282 * provided, the density of the current display will be used.
289 * @param density The optional desired density as per
293 public final Drawable loadPreviewImage(@NonNull Context context, int density) {
294 return loadDrawable(context, density, previewImage, false);
364 private Drawable loadDrawable(Context context, int density, int resourceId,
370 if (density <= 0) {
371 density = context.getResources().getDisplayMetrics().densityDpi;
373 return resources.getDrawableForDensity(resourceId, density);