Lines Matching defs:drawable

32 import android.graphics.drawable.Drawable;
399 Drawable drawable = getDrawableFromResourceValue(value);
400 if (drawable != null) {
401 return drawable;
415 * Sets the drawable in an image view, makes sure the view is only visible if there
416 * is a drawable.
418 private void setViewDrawable(ImageView v, Drawable drawable, int nullVisibility) {
419 // Set the icon even if the drawable is null, since we need to clear any
421 v.setImageDrawable(drawable);
423 if (drawable == null) {
433 drawable.setVisible(false, false);
434 drawable.setVisible(true, false);
498 * Gets a drawable given a value provided by a suggestion provider.
501 * (e.g., "2130837524"), in which case we will try to retrieve a drawable from
508 * If the string is not formatted as expected, or no drawable can be found for
527 Drawable drawable = checkIconCache(drawableUri);
528 if (drawable != null) {
529 return drawable;
532 drawable = mProviderContext.getResources().getDrawable(resourceId);
534 storeInIconCache(drawableUri, drawable);
535 return drawable;
538 Drawable drawable = checkIconCache(drawableId);
539 if (drawable != null) {
540 return drawable;
543 drawable = getDrawable(uri);
544 storeInIconCache(drawableId, drawable);
545 return drawable;
554 * Gets a drawable by URI, without using the cache.
556 * @return A drawable, or {@code null} if the drawable could not be loaded.
601 private void storeInIconCache(String resourceUri, Drawable drawable) {
602 if (drawable != null) {
603 mOutsideDrawablesCache.put(resourceUri, drawable.getConstantState());
612 * @return A non-null drawable.
616 Drawable drawable = getActivityIconWithCache(mSearchable.getSearchActivity());
617 if (drawable != null) {
618 return drawable;
630 * @return A drawable, or {@code null} if neither the activity nor the application
642 Drawable drawable = getActivityIcon(component);
644 Drawable.ConstantState toCache = drawable == null ? null : drawable.getConstantState();
646 return drawable;
653 * @return A drawable, or {@code null} if neither the acitivy or the application
668 Drawable drawable = pm.getDrawable(pkg, iconId, activityInfo.applicationInfo);
669 if (drawable == null) {
674 return drawable;