Lines Matching defs:drawable

30 import android.graphics.drawable.Drawable;
365 Drawable drawable = getDrawableFromResourceValue(value);
366 if (drawable != null) {
367 return drawable;
381 * Sets the drawable in an image view, makes sure the view is only visible if there
382 * is a drawable.
384 private void setViewDrawable(ImageView v, Drawable drawable, int nullVisibility) {
385 // Set the icon even if the drawable is null, since we need to clear any
387 v.setImageDrawable(drawable);
389 if (drawable == null) {
399 drawable.setVisible(false, false);
400 drawable.setVisible(true, false);
464 * Gets a drawable given a value provided by a suggestion provider.
467 * (e.g., "2130837524"), in which case we will try to retrieve a drawable from
474 * If the string is not formatted as expected, or no drawable can be found for
493 Drawable drawable = checkIconCache(drawableUri);
494 if (drawable != null) {
495 return drawable;
498 drawable = ContextCompat.getDrawable(mProviderContext, resourceId);
500 storeInIconCache(drawableUri, drawable);
501 return drawable;
504 Drawable drawable = checkIconCache(drawableId);
505 if (drawable != null) {
506 return drawable;
509 drawable = getDrawable(uri);
510 storeInIconCache(drawableId, drawable);
511 return drawable;
520 * Gets a drawable by URI, without using the cache.
522 * @return A drawable, or {@code null} if the drawable could not be loaded.
567 private void storeInIconCache(String resourceUri, Drawable drawable) {
568 if (drawable != null) {
569 mOutsideDrawablesCache.put(resourceUri, drawable.getConstantState());
578 * @return A non-null drawable.
582 Drawable drawable = getActivityIconWithCache(mSearchable.getSearchActivity());
583 if (drawable != null) {
584 return drawable;
596 * @return A drawable, or {@code null} if neither the activity nor the application
608 Drawable drawable = getActivityIcon(component);
610 Drawable.ConstantState toCache = drawable == null ? null : drawable.getConstantState();
612 return drawable;
619 * @return A drawable, or {@code null} if neither the activity or the application
634 Drawable drawable = pm.getDrawable(pkg, iconId, activityInfo.applicationInfo);
635 if (drawable == null) {
640 return drawable;
672 * Modified to return a drawable, rather than a hidden type.