Home
last modified time | relevance | path

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

12

/frameworks/base/graphics/java/android/graphics/drawable/
DAdaptiveIconDrawable.java362 final Drawable dr = mLayerState.mChildren[i].mDrawable; in draw() local
363 if (dr != null) { in draw()
364 dr.draw(mCanvas); in draw()
513 Drawable dr = a.getDrawableForDensity(R.styleable.AdaptiveIconDrawableLayer_drawable, in updateLayerFromTypedArray() local
515 if (dr != null) { in updateLayerFromTypedArray()
525 layer.mDrawable = dr; in updateLayerFromTypedArray()
607 final Drawable dr = array[i].mDrawable; in setHotspot() local
608 if (dr != null) { in setHotspot()
609 dr.setHotspot(x, y); in setHotspot()
618 final Drawable dr = array[i].mDrawable; in setHotspotBounds() local
[all …]
DLayerDrawable.java382 final Drawable dr = a.getDrawable(R.styleable.LayerDrawableItem_drawable); in updateLayerFromTypedArray() local
383 if (dr != null) { in updateLayerFromTypedArray()
393 layer.mDrawable = dr; in updateLayerFromTypedArray()
461 ChildDrawable addLayer(Drawable dr, int[] themeAttrs, int id, in addLayer() argument
463 final ChildDrawable childDrawable = createLayer(dr); in addLayer()
474 mLayerState.mChildrenChangingConfigurations |= dr.getChangingConfigurations(); in addLayer()
475 dr.setCallback(this); in addLayer()
480 private ChildDrawable createLayer(Drawable dr) { in createLayer() argument
482 layer.mDrawable = dr; in createLayer()
493 public int addLayer(Drawable dr) { in addLayer() argument
[all …]
DDrawableWrapper.java63 public DrawableWrapper(@Nullable Drawable dr) { in DrawableWrapper() argument
65 mDrawable = dr; in DrawableWrapper()
75 final Drawable dr = mState.mDrawableState.newDrawable(res); in updateLocalState() local
76 setDrawable(dr); in updateLocalState()
85 public void setDrawable(@Nullable Drawable dr) { in setDrawable() argument
90 mDrawable = dr; in setDrawable()
92 if (dr != null) { in setDrawable()
93 dr.setCallback(this); in setDrawable()
96 dr.setVisible(isVisible(), true); in setDrawable()
97 dr.setState(getState()); in setDrawable()
[all …]
DClipDrawable.java158 final Drawable dr = getDrawable(); in getOpacity() local
159 final int opacity = dr.getOpacity(); in getOpacity()
160 if (opacity == PixelFormat.TRANSPARENT || dr.getLevel() == 0) { in getOpacity()
166 return dr.getOpacity(); in getOpacity()
175 final Drawable dr = getDrawable(); in draw() local
176 if (dr.getLevel() == 0) { in draw()
202 dr.draw(canvas); in draw()
DAnimationDrawable.java327 Drawable dr = a.getDrawable(R.styleable.AnimationDrawableItem_drawable); in inflateChildElements() local
331 if (dr == null) { in inflateChildElements()
340 dr = Drawable.createFromXmlInner(r, parser, attrs, theme); in inflateChildElements()
343 mAnimationState.addFrame(dr, duration); in inflateChildElements()
344 if (dr != null) { in inflateChildElements()
345 dr.setCallback(this); in inflateChildElements()
411 public void addFrame(Drawable dr, int dur) { in addFrame() argument
414 int pos = super.addChild(dr); in addFrame()
DLevelListDrawable.java132 Drawable dr; in inflateChildElements() local
134 dr = r.getDrawable(drawableRes, theme); in inflateChildElements()
144 dr = Drawable.createFromXmlInner(r, parser, attrs, theme); in inflateChildElements()
147 mLevelListState.addLevel(low, high, dr); in inflateChildElements()
DAnimatedStateListDrawable.java473 Drawable dr = a.getDrawable( in parseTransition() local
480 if (dr == null) { in parseTransition()
490 dr = Drawable.createFromXmlInner(r, parser, attrs, theme); in parseTransition()
493 return mState.addTransition(fromId, toId, dr, reversible); in parseTransition()
504 Drawable dr = a.getDrawable(R.styleable.AnimatedStateListDrawableItem_drawable); in parseItem() local
512 if (dr == null) { in parseItem()
522 dr = Drawable.createFromXmlInner(r, parser, attrs, theme); in parseItem()
525 return mState.addStateSet(states, dr, keyframeId); in parseItem()
DDrawableContainer.java833 public final int addChild(Drawable dr) { in addChild() argument
839 dr.mutate(); in addChild()
840 dr.setVisible(false, true); in addChild()
841 dr.setCallback(mOwner); in addChild()
843 mDrawables[pos] = dr; in addChild()
845 mChildrenChangingConfigurations |= dr.getChangingConfigurations(); in addChild()
1125 final Drawable dr = drawables[i]; in computeConstantSize() local
1126 int s = dr.getIntrinsicWidth(); in computeConstantSize()
1128 s = dr.getIntrinsicHeight(); in computeConstantSize()
1130 s = dr.getMinimumWidth(); in computeConstantSize()
[all …]
DStateListDrawable.java177 Drawable dr = a.getDrawable(R.styleable.StateListDrawableItem_drawable); in inflateChildElements() local
185 if (dr == null) { in inflateChildElements()
194 dr = Drawable.createFromXmlInner(r, parser, attrs, theme); in inflateChildElements()
197 state.addStateSet(states, dr); in inflateChildElements()
/frameworks/base/core/java/com/android/internal/graphics/drawable/
DAnimationScaleListDrawable.java114 Drawable dr = a.getDrawable(R.styleable.AnimationScaleListDrawableItem_drawable); in inflateChildElements() local
118 if (dr == null) { in inflateChildElements()
127 dr = Drawable.createFromXmlInner(r, parser, attrs, theme); in inflateChildElements()
130 state.addDrawable(dr); in inflateChildElements()
151 Drawable dr = getCurrent(); in start() local
152 if (dr != null && dr instanceof Animatable) { in start()
153 ((Animatable) dr).start(); in start()
159 Drawable dr = getCurrent(); in stop() local
160 if (dr != null && dr instanceof Animatable) { in stop()
161 ((Animatable) dr).stop(); in stop()
[all …]
/frameworks/support/compat/ics/android/support/v4/graphics/drawable/
DDrawableWrapperApi14.java63 DrawableWrapperApi14(@Nullable Drawable dr) { in DrawableWrapperApi14() argument
66 setWrappedDrawable(dr); in DrawableWrapperApi14()
76 final Drawable dr = newDrawableFromState(mState.mDrawableState, res); in updateLocalState() local
77 setWrappedDrawable(dr); in updateLocalState()
324 public final void setWrappedDrawable(Drawable dr) { in setWrappedDrawable() argument
329 mDrawable = dr; in setWrappedDrawable()
331 if (dr != null) { in setWrappedDrawable()
332 dr.setCallback(this); in setWrappedDrawable()
334 setVisible(dr.isVisible(), true); in setWrappedDrawable()
335 setState(dr.getState()); in setWrappedDrawable()
[all …]
/frameworks/base/core/java/android/widget/
DTextView.java524 public void setErrorDrawable(Drawable dr, TextView tv) {
525 if (mDrawableError != dr && mDrawableError != null) {
528 mDrawableError = dr;
2129 Drawables dr = mDrawables;
2130 if (dr == null) {
2131 mDrawables = dr = new Drawables(getContext());
2134 final Rect compoundRect = dr.mCompoundRect;
2142 dr.mDrawableStart = start;
2143 dr.mDrawableSizeStart = compoundRect.width();
2144 dr.mDrawableHeightStart = compoundRect.height();
[all …]
DImageView.java250 protected boolean verifyDrawable(@NonNull Drawable dr) {
251 return mDrawable == dr || super.verifyDrawable(dr);
261 public void invalidateDrawable(@NonNull Drawable dr) {
262 if (dr == mDrawable) {
263 if (dr != null) {
265 final int w = dr.getIntrinsicWidth();
266 final int h = dr.getIntrinsicHeight();
283 super.invalidateDrawable(dr);
/frameworks/support/v17/leanback/src/android/support/v17/leanback/graphics/
DCompositeDrawable.java88 final Drawable dr = children.get(i).mDrawable; in mutate() local
89 if (dr != null) { in mutate()
90 dr.mutate(); in mutate()
194 final Drawable dr = getFirstNonNullDrawable(); in getAlpha() local
195 if (dr != null) { in getAlpha()
196 return DrawableCompat.getAlpha(dr); in getAlpha()
205 final Drawable dr = children.get(i).mDrawable; in getFirstNonNullDrawable() local
206 if (dr != null) { in getFirstNonNullDrawable()
207 return dr; in getFirstNonNullDrawable()
257 final Drawable dr = orig.mDrawable; in ChildDrawable() local
[all …]
/frameworks/support/graphics/drawable/animated/src/android/support/graphics/drawable/
DAnimatedVectorDrawableCompat.java741 private static boolean unregisterPlatformCallback(AnimatedVectorDrawable dr, in unregisterPlatformCallback() argument
743 return dr.unregisterAnimationCallback(callback.getPlatformCallback()); in unregisterPlatformCallback()
861 public static void registerAnimationCallback(Drawable dr, in registerAnimationCallback() argument
863 if (dr == null || callback == null) { in registerAnimationCallback()
866 if (!(dr instanceof Animatable)) { in registerAnimationCallback()
871 registerPlatformCallback((AnimatedVectorDrawable) dr, callback); in registerAnimationCallback()
873 ((AnimatedVectorDrawableCompat) dr).registerAnimationCallback(callback); in registerAnimationCallback()
883 public static boolean unregisterAnimationCallback(Drawable dr, in unregisterAnimationCallback() argument
885 if (dr == null || callback == null) { in unregisterAnimationCallback()
888 if (!(dr instanceof Animatable)) { in unregisterAnimationCallback()
[all …]
/frameworks/base/core/java/android/content/res/
DResourcesImpl.java593 Drawable dr; in loadDrawable() local
596 dr = cs.newDrawable(wrapper); in loadDrawable()
598 dr = new ColorDrawable(value.data); in loadDrawable()
600 dr = loadDrawableForCookie(wrapper, value, id, density, null); in loadDrawable()
605 if (dr instanceof DrawableContainer) { in loadDrawable()
612 final boolean canApplyTheme = dr != null && dr.canApplyTheme(); in loadDrawable()
614 dr = dr.mutate(); in loadDrawable()
615 dr.applyTheme(theme); in loadDrawable()
616 dr.clearMutated(); in loadDrawable()
622 if (dr != null) { in loadDrawable()
[all …]
/frameworks/support/v7/appcompat/src/android/support/v7/widget/
DAppCompatDrawableManager.java237 Drawable dr = getCachedDrawable(context, key); in createDrawableIfNeeded() local
238 if (dr != null) { in createDrawableIfNeeded()
240 return dr; in createDrawableIfNeeded()
245 dr = new LayerDrawable(new Drawable[]{ in createDrawableIfNeeded()
251 if (dr != null) { in createDrawableIfNeeded()
252 dr.setChangingConfigurations(tv.changingConfigurations); in createDrawableIfNeeded()
254 addDrawableToCache(context, key, dr); in createDrawableIfNeeded()
257 return dr; in createDrawableIfNeeded()
334 Drawable dr = getCachedDrawable(context, key); in loadDrawableFromDelegates() local
335 if (dr != null) { in loadDrawableFromDelegates()
[all …]
/frameworks/support/samples/SupportAnimationDemos/src/com/example/android/support/animation/
DSpringActivity.java103 SeekBar dr = findViewById(R.id.damping_ratio); in setupSeekBars() local
104 dr.setMax(130); in setupSeekBars()
106 dr.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { in setupSeekBars()
151 dr.setProgress(40); in setupSeekBars()
DMainActivity.java118 SeekBar dr = findViewById(R.id.damping_ratio); in setupSeekBars() local
119 dr.setMax(130); in setupSeekBars()
121 dr.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { in setupSeekBars()
166 dr.setProgress(80); in setupSeekBars()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/aware/
DWifiAwareServiceImpl.java148 IBinder.DeathRecipient dr = new IBinder.DeathRecipient() { in connect() local
164 binder.linkToDeath(dr, 0); in connect()
176 mDeathRecipientsByClientId.put(clientId, dr); in connect()
198 IBinder.DeathRecipient dr = mDeathRecipientsByClientId.get(clientId); in disconnect() local
199 if (dr != null) { in disconnect()
200 binder.unlinkToDeath(dr, 0); in disconnect()
/frameworks/base/core/java/android/content/pm/
DResolveInfo.java236 Drawable dr = null; in loadIcon() local
238 dr = pm.getDrawable(resolvePackageName, iconResourceId, null); in loadIcon()
241 if (dr == null && iconResourceId != 0) { in loadIcon()
243 dr = pm.getDrawable(ci.packageName, iconResourceId, ai); in loadIcon()
245 if (dr != null) { in loadIcon()
246 return pm.getUserBadgedIcon(dr, new UserHandle(UserHandle.myUserId())); in loadIcon()
DPackageItemInfo.java248 Drawable dr = pm.getDrawable(packageName, banner, getApplicationInfo()); in loadBanner() local
249 if (dr != null) { in loadBanner()
250 return dr; in loadBanner()
/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/util/
DLauncherIcons.java130 public ShadowDrawable(Bitmap shadow, Drawable dr) { in ShadowDrawable() argument
131 super(dr); in ShadowDrawable()
132 mState = new MyConstantState(shadow, dr.getConstantState()); in ShadowDrawable()
/frameworks/base/core/jni/
Dandroid_os_HwRemoteBinder.cpp398 wp<hardware::IBinder::DeathRecipient> dr; in JHwRemoteBinder_unlinkToDeath() local
399 err = binder->unlinkToDeath(origJDR, NULL, 0, &dr); in JHwRemoteBinder_unlinkToDeath()
400 if (err == NO_ERROR && dr != NULL) { in JHwRemoteBinder_unlinkToDeath()
401 sp<hardware::IBinder::DeathRecipient> sdr = dr.promote(); in JHwRemoteBinder_unlinkToDeath()

12