Home
last modified time | relevance | path

Searched refs:dr (Results 1 – 25 of 32) sorted by relevance

12

/frameworks/base/graphics/java/android/graphics/drawable/
DLayerDrawable.java296 final Drawable dr = a.getDrawable(R.styleable.LayerDrawableItem_drawable); in updateLayerFromTypedArray() local
297 if (dr != null) { in updateLayerFromTypedArray()
298 layer.mDrawable = dr; in updateLayerFromTypedArray()
401 ChildDrawable addLayer(Drawable dr, int[] themeAttrs, int id, in addLayer() argument
403 final ChildDrawable childDrawable = createLayer(dr); in addLayer()
414 mLayerState.mChildrenChangingConfigurations |= dr.getChangingConfigurations(); in addLayer()
415 dr.setCallback(this); in addLayer()
420 private ChildDrawable createLayer(Drawable dr) { in createLayer() argument
422 layer.mDrawable = dr; in createLayer()
433 public int addLayer(Drawable dr) { in addLayer() argument
[all …]
DDrawableWrapper.java60 public DrawableWrapper(@Nullable Drawable dr) { in DrawableWrapper() argument
62 mDrawable = dr; in DrawableWrapper()
72 final Drawable dr = mState.mDrawableState.newDrawable(res); in updateLocalState() local
73 setDrawable(dr); in updateLocalState()
82 public void setDrawable(@Nullable Drawable dr) { in setDrawable() argument
87 mDrawable = dr; in setDrawable()
89 if (dr != null) { in setDrawable()
90 dr.setCallback(this); in setDrawable()
93 dr.setVisible(isVisible(), true); in setDrawable()
94 dr.setState(getState()); in setDrawable()
[all …]
DClipDrawable.java115 final Drawable dr = a.getDrawable(R.styleable.ClipDrawable_drawable); in updateStateFromTypedArray() local
116 if (dr != null) { in updateStateFromTypedArray()
117 setDrawable(dr); in updateStateFromTypedArray()
154 final Drawable dr = getDrawable(); in getOpacity() local
155 final int opacity = dr.getOpacity(); in getOpacity()
156 if (opacity == PixelFormat.TRANSPARENT || dr.getLevel() == 0) { in getOpacity()
162 return dr.getOpacity(); in getOpacity()
171 final Drawable dr = getDrawable(); in draw() local
172 if (dr.getLevel() == 0) { in draw()
198 dr.draw(canvas); in draw()
DAnimationDrawable.java324 Drawable dr = a.getDrawable(R.styleable.AnimationDrawableItem_drawable); in inflateChildElements() local
328 if (dr == null) { in inflateChildElements()
337 dr = Drawable.createFromXmlInner(r, parser, attrs, theme); in inflateChildElements()
340 mAnimationState.addFrame(dr, duration); in inflateChildElements()
341 if (dr != null) { in inflateChildElements()
342 dr.setCallback(this); in inflateChildElements()
408 public void addFrame(Drawable dr, int dur) { in addFrame() argument
411 int pos = super.addChild(dr); in addFrame()
DLevelListDrawable.java126 Drawable dr; in inflate() local
128 dr = r.getDrawable(drawableRes, theme); in inflate()
138 dr = Drawable.createFromXmlInner(r, parser, attrs, theme); in inflate()
141 mLevelListState.addLevel(low, high, dr); in inflate()
DAnimatedStateListDrawable.java472 Drawable dr = a.getDrawable( in parseTransition() local
479 if (dr == null) { in parseTransition()
489 dr = Drawable.createFromXmlInner(r, parser, attrs, theme); in parseTransition()
492 return mState.addTransition(fromId, toId, dr, reversible); in parseTransition()
503 Drawable dr = a.getDrawable(R.styleable.AnimatedStateListDrawableItem_drawable); in parseItem() local
511 if (dr == null) { in parseItem()
521 dr = Drawable.createFromXmlInner(r, parser, attrs, theme); in parseItem()
524 return mState.addStateSet(states, dr, keyframeId); in parseItem()
DDrawableContainer.java760 public final int addChild(Drawable dr) { in addChild() argument
767 dr.setVisible(false, true); in addChild()
768 dr.setCallback(mOwner); in addChild()
770 mDrawables[pos] = dr; in addChild()
772 mChildrenChangingConfigurations |= dr.getChangingConfigurations(); in addChild()
1009 final Drawable dr = drawables[i]; in computeConstantSize() local
1010 int s = dr.getIntrinsicWidth(); in computeConstantSize()
1012 s = dr.getIntrinsicHeight(); in computeConstantSize()
1014 s = dr.getMinimumWidth(); in computeConstantSize()
1016 s = dr.getMinimumHeight(); in computeConstantSize()
DStateListDrawable.java170 Drawable dr = a.getDrawable(R.styleable.StateListDrawableItem_drawable); in inflateChildElements() local
178 if (dr == null) { in inflateChildElements()
187 dr = Drawable.createFromXmlInner(r, parser, attrs, theme); in inflateChildElements()
190 state.addStateSet(states, dr); in inflateChildElements()
DScaleDrawable.java121 final Drawable dr = a.getDrawable(R.styleable.ScaleDrawable_drawable); in updateStateFromTypedArray() local
122 if (dr != null) { in updateStateFromTypedArray()
123 setDrawable(dr); in updateStateFromTypedArray()
DAnimatedRotateDrawable.java172 final Drawable dr = a.getDrawable(R.styleable.AnimatedRotateDrawable_drawable); in updateStateFromTypedArray() local
173 if (dr != null) { in updateStateFromTypedArray()
174 setDrawable(dr); in updateStateFromTypedArray()
DInsetDrawable.java127 final Drawable dr = a.getDrawable(attr); in updateStateFromTypedArray() local
128 if (dr != null) { in updateStateFromTypedArray()
129 setDrawable(dr); in updateStateFromTypedArray()
DRotateDrawable.java113 final Drawable dr = a.getDrawable(R.styleable.RotateDrawable_drawable); in updateStateFromTypedArray() local
114 if (dr != null) { in updateStateFromTypedArray()
115 setDrawable(dr); in updateStateFromTypedArray()
/frameworks/base/core/java/android/widget/
DTextView.java437 for (Drawable dr : mShowing) { in updateDrawablesLayoutDirection()
438 if (dr != null) { in updateDrawablesLayoutDirection()
439 dr.setLayoutDirection(layoutDirection); in updateDrawablesLayoutDirection()
444 public void setErrorDrawable(Drawable dr, TextView tv) { in setErrorDrawable() argument
445 if (mDrawableError != dr && mDrawableError != null) { in setErrorDrawable()
448 mDrawableError = dr; in setErrorDrawable()
1513 Drawables dr = mDrawables; in setRelativeDrawablesIfNeeded() local
1514 if (dr == null) { in setRelativeDrawablesIfNeeded()
1515 mDrawables = dr = new Drawables(getContext()); in setRelativeDrawablesIfNeeded()
1518 final Rect compoundRect = dr.mCompoundRect; in setRelativeDrawablesIfNeeded()
[all …]
DImageView.java217 protected boolean verifyDrawable(Drawable dr) { in verifyDrawable() argument
218 return mDrawable == dr || super.verifyDrawable(dr); in verifyDrawable()
228 public void invalidateDrawable(Drawable dr) { in invalidateDrawable() argument
229 if (dr == mDrawable) { in invalidateDrawable()
230 if (dr != null) { in invalidateDrawable()
232 final int w = dr.getIntrinsicWidth(); in invalidateDrawable()
233 final int h = dr.getIntrinsicHeight(); in invalidateDrawable()
248 super.invalidateDrawable(dr); in invalidateDrawable()
DProgressBar.java415 private static boolean needsTileify(Drawable dr) { in needsTileify() argument
416 if (dr instanceof LayerDrawable) { in needsTileify()
417 final LayerDrawable orig = (LayerDrawable) dr; in needsTileify()
427 if (dr instanceof StateListDrawable) { in needsTileify()
428 final StateListDrawable in = (StateListDrawable) dr; in needsTileify()
440 if (dr instanceof BitmapDrawable) { in needsTileify()
1605 public void invalidateDrawable(Drawable dr) { in invalidateDrawable() argument
1607 if (verifyDrawable(dr)) { in invalidateDrawable()
1608 final Rect dirty = dr.getBounds(); in invalidateDrawable()
1615 super.invalidateDrawable(dr); in invalidateDrawable()
/frameworks/base/core/java/android/content/pm/
DResolveInfo.java218 Drawable dr = null; in loadIcon() local
220 dr = pm.getDrawable(resolvePackageName, iconResourceId, null); in loadIcon()
223 if (dr == null && iconResourceId != 0) { in loadIcon()
225 dr = pm.getDrawable(ci.packageName, iconResourceId, ai); in loadIcon()
227 if (dr != null) { in loadIcon()
228 return pm.getUserBadgedIcon(dr, new UserHandle(UserHandle.myUserId())); in loadIcon()
DPackageItemInfo.java188 Drawable dr = pm.getDrawable(packageName, banner, getApplicationInfo()); in loadBanner() local
189 if (dr != null) { in loadBanner()
190 return dr; in loadBanner()
/frameworks/base/core/jni/android/graphics/
DAvoidXfermode.cpp43 unsigned dr = SkAbs32(SkGetPackedR16(c) - r); in color_dist16() local
47 return SkMax32(dr, SkMax32(dg, db)); in color_dist16()
56 unsigned dr = SkAbs32(SkGetPackedR32(c) - r); in color_dist32() local
60 return SkMax32(dr, SkMax32(dg, db)); in color_dist32()
/frameworks/base/core/java/com/android/internal/app/
DHeavyWeightSwitcherActivity.java97 void setDrawable(int id, Drawable dr) { in setDrawable() argument
98 if (dr != null) { in setDrawable()
99 ((ImageView)findViewById(id)).setImageDrawable(dr); in setDrawable()
/frameworks/base/core/java/android/content/res/
DResources.java2534 Drawable dr; in loadDrawable() local
2536 dr = cs.newDrawable(this); in loadDrawable()
2538 dr = new ColorDrawable(value.data); in loadDrawable()
2540 dr = loadDrawableForCookie(value, id, null); in loadDrawable()
2546 final boolean canApplyTheme = dr != null && dr.canApplyTheme(); in loadDrawable()
2548 dr = dr.mutate(); in loadDrawable()
2549 dr.applyTheme(theme); in loadDrawable()
2550 dr.clearMutated(); in loadDrawable()
2555 if (dr != null) { in loadDrawable()
2556 dr.setChangingConfigurations(value.changingConfigurations); in loadDrawable()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DUserAvatarView.java222 public void invalidateDrawable(Drawable dr) { in invalidateDrawable() argument
223 if (dr == mDrawable) { in invalidateDrawable()
226 super.invalidateDrawable(dr); in invalidateDrawable()
/frameworks/base/core/java/android/app/
DApplicationPackageManager.java836 final Drawable dr = r.getDrawable(resId, null); in getDrawable() local
837 if (dr != null) { in getDrawable()
838 putCachedIcon(name, dr); in getDrawable()
854 + ": " + dr); in getDrawable()
856 return dr; in getDrawable()
1156 private void putCachedIcon(@NonNull ResourceName name, @NonNull Drawable dr) { in putCachedIcon() argument
1158 sIconCache.put(name, new WeakReference<>(dr.getConstantState())); in putCachedIcon()
1159 if (DEBUG_ICONS) Log.v(TAG, "Added cached drawable state for " + name + ": " + dr); in putCachedIcon()
2048 Drawable dr = loadUnbadgedItemIcon(itemInfo, appInfo); in loadItemIcon() local
2050 return dr; in loadItemIcon()
[all …]
DWallpaperManager.java386 Drawable dr = new BitmapDrawable(mContext.getResources(), bm); in getDrawable() local
387 dr.setDither(false); in getDrawable()
388 return dr; in getDrawable()
574 Drawable dr = new BitmapDrawable(mContext.getResources(), bm); in peekDrawable() local
575 dr.setDither(false); in peekDrawable()
576 return dr; in peekDrawable()
/frameworks/base/core/tests/coretests/src/android/os/
DAidlTest.java371 double[] dr = mRemote.doubleArray(d0, d1, d2); in testArrays() local
373 assertEquals(1, dr.length); in testArrays()
374 assertEquals(100.1, dr[0]); in testArrays()
/frameworks/native/opengl/libs/ETC1/
Detc1.cpp393 int dr = r52 - r51; in etc_encodeBaseColors() local
397 differential = inRange4bitSigned(dr) && inRange4bitSigned(dg) in etc_encodeBaseColors()
400 r2 = convert5To8(r51 + dr); in etc_encodeBaseColors()
403 pCompressed->high |= (r51 << 27) | ((7 & dr) << 24) | (g51 << 19) in etc_encodeBaseColors()

12