Lines Matching refs:drawable

31 import android.graphics.drawable.ColorDrawable;
32 import android.graphics.drawable.Drawable;
33 import android.graphics.drawable.StateListDrawable;
346 * Gets a drawable with no color when selected or pressed, and the given color when
349 * @return A drawable, or {@code null} if the given color is transparent.
388 Drawable drawable = getDrawableFromResourceValue(value);
389 if (drawable != null) {
390 return drawable;
404 * Sets the drawable in an image view, makes sure the view is only visible if there
405 * is a drawable.
407 private void setViewDrawable(ImageView v, Drawable drawable) {
408 // Set the icon even if the drawable is null, since we need to clear any
410 v.setImageDrawable(drawable);
412 if (drawable == null) {
422 drawable.setVisible(false, false);
423 drawable.setVisible(true, false);
487 * Gets a drawable given a value provided by a suggestion provider.
490 * (e.g., "2130837524"), in which case we will try to retrieve a drawable from
497 * If the string is not formatted as expected, or no drawable can be found for
516 Drawable drawable = checkIconCache(drawableUri);
517 if (drawable != null) {
518 return drawable;
521 drawable = mProviderContext.getResources().getDrawable(resourceId);
523 storeInIconCache(drawableUri, drawable);
524 return drawable;
527 Drawable drawable = checkIconCache(drawableId);
528 if (drawable != null) {
529 return drawable;
532 drawable = getDrawable(uri);
533 storeInIconCache(drawableId, drawable);
534 return drawable;
543 * Gets a drawable by URI, without using the cache.
545 * @return A drawable, or {@code null} if the drawable could not be loaded.
590 private void storeInIconCache(String resourceUri, Drawable drawable) {
591 if (drawable != null) {
592 mOutsideDrawablesCache.put(resourceUri, drawable.getConstantState());
601 * @return A non-null drawable.
609 Drawable drawable = getActivityIconWithCache(component);
610 if (drawable != null) {
611 return drawable;
619 Drawable drawable = getActivityIconWithCache(mSearchable.getSearchActivity());
620 if (drawable != null) {
621 return drawable;
633 * @return A drawable, or {@code null} if neither the activity nor the application
645 Drawable drawable = getActivityIcon(component);
647 Drawable.ConstantState toCache = drawable == null ? null : drawable.getConstantState();
649 return drawable;
656 * @return A drawable, or {@code null} if neither the acitivy or the application
671 Drawable drawable = pm.getDrawable(pkg, iconId, activityInfo.applicationInfo);
672 if (drawable == null) {
677 return drawable;