Searched defs:drawable (Results 1 - 25 of 42) sorted by relevance

12

/packages/apps/Car/libs/car-apps-common/src/com/android/car/apps/common/
H A DRefcountBitmapDrawable.java20 import android.graphics.drawable.BitmapDrawable;
31 * create initial drawable, this will not increase the refcount
39 * create the drawable from existing drawable, will not increase refcount
41 public RefcountBitmapDrawable(Resources res, RefcountBitmapDrawable drawable) { argument
42 this(res, drawable.getRefcountObject());
H A DBitmapWorkerTask.java28 import android.graphics.drawable.Drawable;
129 Object drawable = loadDrawable(context, iconResource);
130 if (drawable instanceof InputStream) {
132 return decodeBitmap((InputStream) drawable, outputOptions);
133 } else if (drawable instanceof Drawable){
134 return createIconBitmap((Drawable) drawable, outputOptions);
136 Log.w(TAG, "getBitmapFromResource failed, unrecognized resource: " + drawable);
251 * load drawable for non-bitmap resource or InputStream for bitmap resource without
282 private static Bitmap createIconBitmap(Drawable drawable, BitmapWorkerOptions workerOptions) { argument
285 int width = drawable
[all...]
H A DLetterTileDrawable.java29 import android.graphics.drawable.Drawable;
33 * A drawable that encapsulates all the functionality needed to display a letter tile to
95 sDefaultPersonAvatar = res.getDrawable(R.drawable.ic_person, null /* theme */);
96 sDefaultBusinessAvatar = res.getDrawable(R.drawable.ic_person, null /* theme */);
97 sDefaultVoicemailAvatar = res.getDrawable(R.drawable.ic_person, null /* theme */);
115 * Draw the drawable onto the canvas at the current bounds taking into account the current
118 private void drawDrawableOnCanvas(final Drawable drawable, final Canvas canvas) { argument
119 // The drawable should be drawn in the middle of the canvas without changing its width to
131 drawable.setAlpha(mPaint.getAlpha());
132 drawable
[all...]
/packages/apps/Dialer/java/com/android/dialer/app/contactinfo/
H A DContactPhotoLoader.java23 import android.graphics.drawable.Drawable;
26 import android.support.v4.graphics.drawable.RoundedBitmapDrawable;
27 import android.support.v4.graphics.drawable.RoundedBitmapDrawableFactory;
54 private static Bitmap drawableToBitmap(Drawable drawable, int width, int height) { argument
57 drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
58 drawable.draw(canvas);
71 Drawable drawable = createPhotoIconDrawable();
72 if (drawable == null) {
73 drawable = createLetterTileDrawable();
75 return drawable;
[all...]
/packages/apps/Dialer/java/com/android/dialer/util/
H A DDrawableConverter.java22 import android.graphics.drawable.BitmapDrawable;
23 import android.graphics.drawable.Drawable;
26 import android.support.v4.graphics.drawable.RoundedBitmapDrawable;
27 import android.support.v4.graphics.drawable.RoundedBitmapDrawableFactory;
35 /** Converts the provided drawable to a bitmap using the drawable's intrinsic width and height. */
37 public static Bitmap drawableToBitmap(@Nullable Drawable drawable) { argument
38 return drawableToBitmap(drawable, 0, 0);
42 * Converts the provided drawable to a bitmap with the specified width and height.
44 * <p>If both width and height are 0, the drawable'
48 drawableToBitmap(@ullable Drawable drawable, int width, int height) argument
[all...]
/packages/apps/Launcher3/src/com/android/launcher3/folder/
H A DPreviewItemDrawingParams.java18 import android.graphics.drawable.Drawable;
30 Drawable drawable; field in class:PreviewItemDrawingParams
H A DFolderAnimationManager.java32 import android.graphics.drawable.GradientDrawable;
360 private Animator getAnimator(GradientDrawable drawable, String property, int v1, int v2) { argument
362 ? ObjectAnimator.ofArgb(drawable, property, v1, v2)
363 : ObjectAnimator.ofArgb(drawable, property, v2, v1);
/packages/apps/Messaging/src/com/android/messaging/util/
H A DTintDrawableWrapper.java22 import android.graphics.drawable.Drawable;
23 import android.support.v7.graphics.drawable.DrawableWrapper;
36 public TintDrawableWrapper(Drawable drawable, ColorStateList tintStateList) { argument
37 this(drawable, tintStateList, PorterDuff.Mode.SRC_IN);
39 public TintDrawableWrapper(Drawable drawable, ColorStateList tintStateList, argument
41 super(drawable);
/packages/apps/UnifiedEmail/src/com/android/mail/graphics/
H A DPageMarginDrawable.java22 import android.graphics.drawable.Drawable;
23 import android.graphics.drawable.InsetDrawable;
26 * Custom drawable for the page margins between conversations.
34 public PageMarginDrawable(Drawable drawable, int insetLeft, int insetTop, argument
36 super(drawable, insetLeft, insetTop, insetRight, insetBottom);
/packages/apps/Car/Launcher/src/com/android/car/carlauncher/
H A DAppLauncherUtils.java29 import android.graphics.drawable.Drawable;
68 * @param drawable the original drawable
69 * @return the grey scale drawable
71 static Drawable toGrayscale(Drawable drawable) { argument
75 // deep copy the original drawable
76 Drawable newDrawable = drawable.getConstantState().newDrawable().mutate();
/packages/apps/Contacts/src/com/android/contacts/widget/
H A DQuickContactImageView.java4 import android.graphics.drawable.BitmapDrawable;
5 import android.graphics.drawable.Drawable;
14 * {@link LetterTileDrawable}'s, this class instead draws a different default avatar drawable.
61 public void setImageDrawable(Drawable drawable) { argument
63 // supported for all drawable types.
65 if (drawable == null || drawable instanceof BitmapDrawable) {
66 bitmapDrawable = (BitmapDrawable) drawable;
67 } else if (drawable instanceof LetterTileDrawable) {
70 R.drawable
[all...]
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/
H A DNormalizedIconLoader.java24 import android.graphics.drawable.Drawable;
59 .getDrawable(android.R.drawable.sym_def_app_icon), userId, 0, false);
68 protected Drawable createBadgedDrawable(Drawable drawable, int userId, TaskDescription desc) { argument
69 return new FastBitmapDrawable(getBitmapInfo(drawable, userId, desc.getPrimaryColor(),
73 private synchronized BitmapInfo getBitmapInfo(Drawable drawable, int userId, argument
81 return mLauncherIcons.createBadgedIconBitmap(drawable, UserHandle.of(userId),
/packages/apps/Messaging/src/com/android/messaging/ui/
H A DPlaceholderInsetDrawable.java18 import android.graphics.drawable.Drawable;
19 import android.graphics.drawable.InsetDrawable;
22 * A "placeholder" drawable that has the same sizing properties as the real UI element it
25 * This is an InsetDrawable that takes a placeholder drawable (an animation list, or simply
26 * a color drawable) and place it in the center of the inset drawable that's sized to the
29 * that it's placeholding, instead of the intrinsic size of the contained drawable, so that
34 // The dimensions of the real image that this drawable is replacing.
39 * Given a source drawable, wraps it around in this placeholder drawable b
43 fromDrawable(final Drawable drawable, final int sourceWidth, final int sourceHeight) argument
55 PlaceholderInsetDrawable(final Drawable drawable, final int insetLeft, final int insetTop, final int insetRight, final int insetBottom, final int sourceWidth, final int sourceHeight) argument
[all...]
/packages/apps/Camera2/src/com/android/camera/ui/
H A DModeIconView.java21 import android.graphics.drawable.Drawable;
22 import android.graphics.drawable.GradientDrawable;
32 * list drawable. The advantage over a state list drawable is that in the class
33 * multiple states can be rendered using the same drawable with some color modification,
34 * whereas a state list drawable would require a different drawable for each state.
51 .getDrawable(R.drawable.mode_icon_background).mutate();
58 * Sets the drawable that shows the icon of the mode.
60 * @param drawable drawabl
62 setIconDrawable(Drawable drawable) argument
[all...]
/packages/apps/Contacts/src/com/android/contacts/util/
H A DBitmapUtil.java27 import android.graphics.drawable.BitmapDrawable;
28 import android.graphics.drawable.Drawable;
93 * Retrieves a copy of the specified drawable resource, rotated by a specified angle.
96 * @param resourceId The resource ID of the drawable to rotate.
98 * @return Rotated drawable.
103 // Get the original drawable and make a copy which will be rotated.
166 * Converts a drawable to a bitmap.
168 public static Bitmap drawableToBitmap(Drawable drawable, int avatarSizePx) { argument
169 if (drawable instanceof BitmapDrawable) {
170 return ((BitmapDrawable) drawable)
[all...]
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/
H A DCustomizationVerifier.java32 import android.graphics.drawable.AnimatedVectorDrawable;
33 import android.graphics.drawable.BitmapDrawable;
34 import android.graphics.drawable.ColorDrawable;
35 import android.graphics.drawable.Drawable;
109 Drawable logo = mActivity.getDrawable(R.drawable.ic_enterprise_blue_24dp);
118 R.drawable.topinfo_animation, wrapper.getTheme());
126 private Bitmap drawableToBitmap(Drawable drawable) { argument
127 Bitmap bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(),
128 drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
130 drawable
[all...]
H A DLogoUtilsTest.java24 import android.graphics.drawable.Drawable;
96 Drawable drawable = LogoUtils.getOrganisationLogo(getContext(), SAMPLE_COLOR);
97 // We should have the original drawable.
98 assertEquals(7, drawable.getIntrinsicWidth());
99 assertEquals(5, drawable.getIntrinsicHeight());
137 private Bitmap bitmapFromDrawable(Drawable drawable) { argument
138 int width = drawable.getIntrinsicWidth();
139 int height = drawable.getIntrinsicHeight();
142 drawable.setBounds(0, 0, width, height);
143 drawable
[all...]
/packages/apps/Messaging/src/com/android/messaging/ui/photoviewer/
H A DBuglePhotoBitmapLoader.java19 import android.graphics.drawable.Drawable;
41 // The drawable that is currently "in use" and being presented to the user. This drawable
74 result.drawable = mImageResource.getDrawable(context.getResources());
91 final Drawable drawable = result != null ? result.drawable : null;
94 releaseDrawable(drawable);
98 // We are now going to display this drawable so set to mDrawable
99 mDrawable = drawable;
117 result.drawable
163 releaseDrawable(Drawable drawable) argument
[all...]
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
H A DCachingIconLoader.java25 import android.graphics.drawable.Drawable;
76 NowOrLater<Drawable> drawable = mWrapped.getIcon(drawableId);
77 newEntry.set(drawable);
79 return drawable;
94 private synchronized void storeInIconCache(String resourceUri, Entry drawable) { argument
95 if (drawable != null) {
96 mIconCache.put(resourceUri, drawable);
109 public synchronized void set(NowOrLater<Drawable> drawable) { argument
112 mDrawable = drawable;
129 NowOrLater<Drawable> drawable
[all...]
/packages/apps/PackageInstaller/src/android/support/wearable/view/
H A DWearableDialogHelper.java22 import android.graphics.drawable.Drawable;
137 /** Applies the specified drawable to the button. */
139 /* package */ void applyButton(@Nullable Button button, @Nullable Drawable drawable) { argument
141 button.setCompoundDrawablesRelativeWithIntrinsicBounds(drawable, null, null, null);
143 } else if (drawable != null) {
144 Log.w(TAG, "non-null drawable used with missing button, did you call AlertDialog.create()?");
148 /** Obtain a drawable between a drawable and a resource ID. */
150 /* package */ Drawable resolveDrawable(@Nullable Drawable drawable, @DrawableRes int resId) { argument
151 return drawable
[all...]
/packages/apps/Settings/src/com/android/settings/display/
H A DConversationMessageView.java23 import android.graphics.drawable.Drawable;
175 final Drawable iconBase = getContext().getDrawable(R.drawable.conversation_message_icon);
211 final int bubbleDrawableResId = mIncoming ? R.drawable.msg_bubble_incoming
212 : R.drawable.msg_bubble_outgoing;
252 private static Drawable getTintedDrawable(final Context context, final Drawable drawable, argument
255 final Drawable.ConstantState constantStateDrawable = drawable.getConstantState();
258 : drawable;
/packages/apps/TV/src/com/android/tv/menu/
H A DMenuAction.java20 import android.graphics.drawable.Drawable;
33 R.drawable.ic_tvoption_cc);
38 R.drawable.ic_tvoption_aspect);
43 R.drawable.ic_tvoption_pip);
48 R.drawable.ic_tvoption_multi_track);
53 R.drawable.ic_store);
58 R.drawable.ic_developer_mode_tv_white_48dp);
63 R.drawable.ic_settings);
95 public MenuAction(String actionName, int type, Drawable drawable) { argument
99 mDrawable = drawable;
[all...]
/packages/apps/Dialer/java/com/android/dialer/calllogutils/
H A DCallTypeIconsView.java25 import android.graphics.drawable.BitmapDrawable;
26 import android.graphics.drawable.Drawable;
84 final Drawable drawable = getCallTypeDrawable(callType);
85 width += drawable.getIntrinsicWidth() + resources.iconMargin;
86 height = Math.max(height, drawable.getIntrinsicWidth());
194 final Drawable drawable = getCallTypeDrawable(callType);
195 final int right = left + drawable.getIntrinsicWidth();
196 drawable.setBounds(left, 0, right, drawable.getIntrinsicHeight());
197 drawable
220 addDrawable(Canvas canvas, Drawable drawable, int left) argument
[all...]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/imageshow/
H A DSpline.java23 import android.graphics.drawable.Drawable;
61 public static void setCurveHandle(Drawable drawable, int size) { argument
62 mCurveHandle = drawable;
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ui/
H A DDefaultSuggestionView.java27 import android.graphics.drawable.Drawable;
146 * Sets the drawable in an image view, makes sure the view is only visible if there
147 * is a drawable.
149 private static void setViewDrawable(ImageView v, Drawable drawable) { argument
150 // Set the icon even if the drawable is null, since we need to clear any
152 v.setImageDrawable(drawable);
154 if (drawable == null) {
164 drawable.setVisible(false, false);
165 drawable.setVisible(true, false);

Completed in 8236 milliseconds

12