Lines Matching refs:drawable

30 import android.graphics.drawable.Drawable;
359 Drawable drawable = getDrawableFromResourceValue(value);
360 if (drawable != null) {
361 return drawable;
375 * Sets the drawable in an image view, makes sure the view is only visible if there
376 * is a drawable.
378 private void setViewDrawable(ImageView v, Drawable drawable, int nullVisibility) {
379 // Set the icon even if the drawable is null, since we need to clear any
381 v.setImageDrawable(drawable);
383 if (drawable == null) {
393 drawable.setVisible(false, false);
394 drawable.setVisible(true, false);
458 * Gets a drawable given a value provided by a suggestion provider.
461 * (e.g., "2130837524"), in which case we will try to retrieve a drawable from
468 * If the string is not formatted as expected, or no drawable can be found for
487 Drawable drawable = checkIconCache(drawableUri);
488 if (drawable != null) {
489 return drawable;
492 drawable = mProviderContext.getResources().getDrawable(resourceId);
494 storeInIconCache(drawableUri, drawable);
495 return drawable;
498 Drawable drawable = checkIconCache(drawableId);
499 if (drawable != null) {
500 return drawable;
503 drawable = getDrawable(uri);
504 storeInIconCache(drawableId, drawable);
505 return drawable;
514 * Gets a drawable by URI, without using the cache.
516 * @return A drawable, or {@code null} if the drawable could not be loaded.
561 private void storeInIconCache(String resourceUri, Drawable drawable) {
562 if (drawable != null) {
563 mOutsideDrawablesCache.put(resourceUri, drawable.getConstantState());
572 * @return A non-null drawable.
576 Drawable drawable = getActivityIconWithCache(mSearchable.getSearchActivity());
577 if (drawable != null) {
578 return drawable;
590 * @return A drawable, or {@code null} if neither the activity nor the application
602 Drawable drawable = getActivityIcon(component);
604 Drawable.ConstantState toCache = drawable == null ? null : drawable.getConstantState();
606 return drawable;
613 * @return A drawable, or {@code null} if neither the acitivy or the application
628 Drawable drawable = pm.getDrawable(pkg, iconId, activityInfo.applicationInfo);
629 if (drawable == null) {
634 return drawable;
666 * Modified to return a drawable, rather than a hidden type.