Home
last modified time | relevance | path

Searched refs:getDrawable (Results 1 – 25 of 107) sorted by relevance

12345

/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DRotateDrawableTest.java70 mRotateDrawable = (RotateDrawable) mResources.getDrawable(R.drawable.rotatedrawable); in setup()
88 d = (RotateDrawable) mResources.getDrawable(R.drawable.rotatedrawable_rel); in testInflate()
96 d = (RotateDrawable) mResources.getDrawable(R.drawable.rotatedrawable_abs); in testInflate()
155 assertEquals(100, ((BitmapDrawable) mRotateDrawable.getDrawable()).getPaint().getAlpha()); in testSetAlpha()
158 assertEquals(255, ((BitmapDrawable) mRotateDrawable.getDrawable()).getPaint().getAlpha()); in testSetAlpha()
166 ((BitmapDrawable) mRotateDrawable.getDrawable()).getPaint().getColorFilter()); in testSetColorFilter()
169 assertNull(((BitmapDrawable) mRotateDrawable.getDrawable()).getPaint().getColorFilter()); in testSetColorFilter()
179 Drawable drawable = mResources.getDrawable(R.drawable.pass); in testInvalidateDrawable()
264 Drawable drawable = mResources.getDrawable(R.drawable.testimage); in testGetIntrinsicWidthAndHeight()
292 RotateDrawable d1 = (RotateDrawable) mResources.getDrawable(R.drawable.rotatedrawable); in testMutate()
[all …]
DThemedDrawableTest.java72 BitmapDrawable d = (BitmapDrawable) mContext.getDrawable(R.drawable.bitmapdrawable_theme); in testBitmapDrawable()
91 ColorDrawable d = (ColorDrawable) mContext.getDrawable(R.drawable.colordrawable_theme); in testColorDrawable()
98 GradientDrawable d = (GradientDrawable) mContext.getDrawable( in testGradientDrawable()
143 NinePatchDrawable d = (NinePatchDrawable) mContext.getDrawable( in testNinePatchDrawable()
157 RippleDrawable d = (RippleDrawable) mContext.getDrawable( in testRippleDrawable()
165 LayerDrawable d = (LayerDrawable) mContext.getDrawable(R.drawable.layerdrawable_theme); in testLayerDrawable()
171 BitmapDrawable bitmapDrawable = (BitmapDrawable) d.getDrawable(0); in testLayerDrawable()
174 NinePatchDrawable ninePatchDrawable = (NinePatchDrawable) d.getDrawable(1); in testLayerDrawable()
180 VectorDrawable d = (VectorDrawable) mContext.getDrawable(R.drawable.heart); in testVectorDrawableWithStateListColorThemeAttrs()
DInsetDrawableTest.java66 mPassDrawable = mContext.getDrawable(R.drawable.pass); in setup()
272 mPassDrawable = mContext.getDrawable(R.drawable.statelistdrawable); in testOnStateChange()
364 mPassDrawable = mContext.getDrawable(R.drawable.scenery); in testGetIntrinsicWidth()
370 mPassDrawable = mContext.getDrawable(R.drawable.scenery); in testGetIntrinsicWidth()
376 mPassDrawable = mContext.getDrawable(R.drawable.inset_color); in testGetIntrinsicWidth()
380 mPassDrawable = mContext.getDrawable(R.drawable.inset_color_fraction); in testGetIntrinsicWidth()
390 mPassDrawable = mContext.getDrawable(R.drawable.scenery); in testGetIntrinsicHeight()
396 mPassDrawable = mContext.getDrawable(R.drawable.scenery); in testGetIntrinsicHeight()
402 mPassDrawable = mContext.getDrawable(R.drawable.inset_color); in testGetIntrinsicHeight()
406 mPassDrawable = mContext.getDrawable(R.drawable.inset_color_fraction); in testGetIntrinsicHeight()
[all …]
DLayerDrawableTest.java102 assertSame(mBitmapDrawable, layerDrawable.getDrawable(0)); in testConstructor()
103 assertSame(mColorDrawable, layerDrawable.getDrawable(1)); in testConstructor()
126 assertEquals(ColorDrawable.class, layerDrawable.getDrawable(0).getClass()); in testInflate()
127 assertEquals(0x88, layerDrawable.getDrawable(0).getAlpha()); in testInflate()
129 assertEquals(BitmapDrawable.class, layerDrawable.getDrawable(1).getClass()); in testInflate()
131 assertEquals(RotateDrawable.class, layerDrawable.getDrawable(2).getClass()); in testInflate()
133 assertEquals(GradientDrawable.class, layerDrawable.getDrawable(3).getClass()); in testInflate()
258 assertSame(mBitmapDrawable, layerDrawable.getDrawable(0)); in testAccessDrawable()
259 assertSame(mColorDrawable, layerDrawable.getDrawable(1)); in testAccessDrawable()
267 assertEquals(d1, layerDrawable.getDrawable(0)); in testAccessDrawable()
[all …]
DAnimatedVectorDrawableTest.java172 AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate()
173 AnimatedVectorDrawable d2 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate()
174 AnimatedVectorDrawable d3 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate()
200 mResources.getDrawable(mResId).setAlpha(restoreAlpha); in testMutate()
207 AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testGetOpacity()
217 AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testColorFilter()
226 final AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testReset()
241 final AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testStop()
260 AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) imageView.getDrawable(); in testAddCallbackBeforeStart()
278 AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) imageView.getDrawable(); in testAddCallbackAfterTrigger()
[all …]
DScaleDrawableTest.java82 assertSame(d, scaleDrawable.getDrawable()); in testConstructor()
290 d = mContext.getDrawable(R.drawable.statelistdrawable); in testOnStateChange()
479 ScaleDrawable d1 = (ScaleDrawable) mContext.getDrawable(R.drawable.scaledrawable); in testMutate()
480 ScaleDrawable d2 = (ScaleDrawable) mContext.getDrawable(R.drawable.scaledrawable); in testMutate()
481 ScaleDrawable d3 = (ScaleDrawable) mContext.getDrawable(R.drawable.scaledrawable); in testMutate()
487 assertEquals(100, ((BitmapDrawable) d1.getDrawable()).getPaint().getAlpha()); in testMutate()
488 assertEquals(100, ((BitmapDrawable) d2.getDrawable()).getPaint().getAlpha()); in testMutate()
489 assertEquals(100, ((BitmapDrawable) d3.getDrawable()).getPaint().getAlpha()); in testMutate()
493 assertEquals(200, ((BitmapDrawable) d1.getDrawable()).getPaint().getAlpha()); in testMutate()
494 assertEquals(100, ((BitmapDrawable) d2.getDrawable()).getPaint().getAlpha()); in testMutate()
[all …]
DAnimatedVectorDrawableParameterizedTest.java140 mResources.getDrawable(R.drawable.animated_vector_favorite)); in testAnimationOnLayer()
143 (AnimatedVectorDrawable) imageView[0].getDrawable(); in testAnimationOnLayer()
189 AnimatedVectorDrawable avd = (AnimatedVectorDrawable) imageView[0].getDrawable(); in testAnimationOnLayer()
216 (AnimatedVectorDrawable) mResources.getDrawable(resId); in testSingleFrameAnimation()
243 (AnimatedVectorDrawable) mResources.getDrawable(resId); in testEmptyAnimatorSet()
301 imageView[0].setImageDrawable(mResources.getDrawable(R.drawable.infinite_avd)); in testInfiniteAVD()
303 … AnimatedVectorDrawable avd = (AnimatedVectorDrawable) imageView[0].getDrawable(); in testInfiniteAVD()
342 AnimatedVectorDrawable avd = (AnimatedVectorDrawable) imageView[0].getDrawable(); in testInfiniteAVD()
DAdaptiveIconDrawableTest.java99 InstrumentationRegistry.getTargetContext().getDrawable(R.drawable.pass)); in testInvalidateDrawable()
107 InstrumentationRegistry.getTargetContext().getDrawable(R.drawable.pass), in testScheduleDrawable()
120 InstrumentationRegistry.getTargetContext().getDrawable(R.drawable.pass), () -> {}); in testUnscheduleDrawable()
156 AdaptiveIconDrawable iconDrawable = (AdaptiveIconDrawable) r.getDrawable( in testMonochromeInflated()
200 …nDrawable iconDrawable = (AdaptiveIconDrawable) context.getResources().getDrawable(android.R.drawa… in testDrawSetBounds()
317 …AdaptiveIconDrawable first = (AdaptiveIconDrawable) res.getDrawable(R.drawable.adaptive_icon_drawa… in testMutate()
318 …AdaptiveIconDrawable pre = (AdaptiveIconDrawable) res.getDrawable(R.drawable.adaptive_icon_drawabl… in testMutate()
325 …AdaptiveIconDrawable post = (AdaptiveIconDrawable) res.getDrawable(R.drawable.adaptive_icon_drawab… in testMutate()
341 (AdaptiveIconDrawable) context.getDrawable(R.drawable.adaptive_icon_drawable); in testGetForegroundBackground()
352 (AdaptiveIconDrawable) context.getDrawable(R.drawable.adaptive_icon_drawable); in testGetIntrinsicWidth()
[all …]
DCustomAnimationScaleListDrawableTest.java67 Drawable dr = mContext.getDrawable(DRAWABLE_ID); in testNonZeroDurationScale()
77 Drawable dr = mContext.getDrawable(DRAWABLE_ID); in testZeroDurationScale()
DGradientDrawableTest.java592 gradientDrawable = (GradientDrawable) mResources.getDrawable( in testInflateGradientRadius()
598 gradientDrawable = (GradientDrawable) mResources.getDrawable( in testInflateGradientRadius()
634 (GradientDrawable) mResources.getDrawable(R.drawable.gradientdrawable); in testMutate()
636 (GradientDrawable) mResources.getDrawable(R.drawable.gradientdrawable); in testMutate()
638 (GradientDrawable) mResources.getDrawable(R.drawable.gradientdrawable); in testMutate()
691 (GradientDrawable) mResources.getDrawable(R.drawable.gradientdrawable); in testOpticalInsets()
704 ctxTheme.getDrawable(R.drawable.gradientdrawable_mix_theme); in testInflationWithThemeAndNonThemeResources()
726 ctxTheme.getDrawable(R.drawable.gradientdrawable_color_mix_theme); in testGradientColorInflationWithThemeAndNonThemeResources()
745 ctxTheme.getDrawable(R.drawable.gradientdrawable_color_all_theme); in testGradientColorInflationWithAllThemeResources()
764 ctxTheme.getDrawable(R.drawable.gradientdrawable_noCenterColor_all_theme); in testGradientColorNoCenterColorInflationWithThemeAndNonThemeResources()
[all …]
/cts/tests/tests/widget/src/android/widget/cts/
DImageViewTest.java262 assertNull(mImageViewRegular.getDrawable()); in testGetDrawable()
265 assertEquals(drawable1, mImageViewRegular.getDrawable()); in testGetDrawable()
266 assertNotSame(drawable2, mImageViewRegular.getDrawable()); in testGetDrawable()
273 assertNull(mImageViewRegular.getDrawable()); in testSetImageIcon()
278 assertNotNull(mImageViewRegular.getDrawable()); in testSetImageIcon()
279 Drawable drawable = mActivity.getDrawable(R.drawable.testimage); in testSetImageIcon()
281 Drawable imageViewDrawable = mImageViewRegular.getDrawable(); in testSetImageIcon()
290 assertNull(mImageViewRegular.getDrawable()); in testSetImageResource()
294 assertNotNull(mImageViewRegular.getDrawable()); in testSetImageResource()
295 Drawable drawable = mActivity.getDrawable(R.drawable.testimage); in testSetImageResource()
[all …]
DImageSwitcherTest.java106 Drawable drawable = resources.getDrawable(R.drawable.scenery); in testSetImageResource()
109 (BitmapDrawable) ((ImageView) mImageSwitcher.getCurrentView()).getDrawable(); in testSetImageResource()
114 drawable = resources.getDrawable(R.drawable.testimage); in testSetImageResource()
117 (BitmapDrawable) ((ImageView) mImageSwitcher.getCurrentView()).getDrawable(); in testSetImageResource()
121 assertNull(((ImageView) mImageSwitcher.getCurrentView()).getDrawable()); in testSetImageResource()
145 (BitmapDrawable) ((ImageView) mImageSwitcher.getCurrentView()).getDrawable(); in testSetImageURI()
159 (BitmapDrawable) ((ImageView) mImageSwitcher.getCurrentView()).getDrawable(); in testSetImageURI()
177 Drawable drawable = resources.getDrawable(R.drawable.scenery); in testSetImageDrawable()
180 assertSame(drawable, ((ImageView) mImageSwitcher.getCurrentView()).getDrawable()); in testSetImageDrawable()
182 drawable = resources.getDrawable(R.drawable.testimage); in testSetImageDrawable()
[all …]
DSimpleAdapterTest.java327 assertNull(view.getDrawable()); in testSetViewImage()
329 BitmapDrawable d = (BitmapDrawable) mContext.getDrawable(R.drawable.scenery); in testSetViewImage()
331 ((BitmapDrawable) view.getDrawable()).getBitmap()); in testSetViewImage()
335 assertNull(view.getDrawable()); in testSetViewImage()
337 assertNull(view.getDrawable()); in testSetViewImage()
341 assertNull(view.getDrawable()); in testSetViewImage()
351 assertNull(view.getDrawable()); in testSetViewImage()
353 d = (BitmapDrawable) mContext.getDrawable(R.drawable.scenery); in testSetViewImage()
355 ((BitmapDrawable) view.getDrawable()).getBitmap()); in testSetViewImage()
359 assertNull(view.getDrawable()); in testSetViewImage()
[all …]
DSimpleCursorTreeAdapterTest.java151 assertNull(view.getDrawable()); in testSetViewImage()
154 BitmapDrawable d = (BitmapDrawable) mContext.getResources().getDrawable( in testSetViewImage()
157 ((BitmapDrawable) view.getDrawable()).getBitmap()); in testSetViewImage()
161 assertNull(view.getDrawable()); in testSetViewImage()
163 assertNull(view.getDrawable()); in testSetViewImage()
167 assertNull(view.getDrawable()); in testSetViewImage()
177 assertNull(view.getDrawable()); in testSetViewImage()
182 Bitmap actualBitmap = ((BitmapDrawable) view.getDrawable()).getBitmap(); in testSetViewImage()
DImageButtonTest.java89 Drawable imageButtonDrawable = mImageButton.getDrawable(); in testImageSource()
95 imageButtonDrawable = mImageButton.getDrawable(); in testImageSource()
100 mImageButton.setImageDrawable(mActivity.getDrawable(R.drawable.icon_yellow)); in testImageSource()
101 imageButtonDrawable = mImageButton.getDrawable(); in testImageSource()
DSimpleCursorAdapterTest.java214 assertNull(view.getDrawable()); in testSetViewImage()
216 assertNotNull(view.getDrawable()); in testSetViewImage()
217 BitmapDrawable d = (BitmapDrawable) mContext.getResources().getDrawable( in testSetViewImage()
220 ((BitmapDrawable) view.getDrawable()).getBitmap()); in testSetViewImage()
224 assertNull(view.getDrawable()); in testSetViewImage()
226 assertNull(view.getDrawable()); in testSetViewImage()
230 assertNull(view.getDrawable()); in testSetViewImage()
241 assertNull(view.getDrawable()); in testSetViewImage()
246 assertNotNull(view.getDrawable()); in testSetViewImage()
247 Bitmap actualBitmap = ((BitmapDrawable) view.getDrawable()).getBitmap(); in testSetViewImage()
DAbsSeekBarTest.java123 Drawable drawable1 = mActivity.getDrawable(R.drawable.scenery); in testAccessThumb()
124 Drawable drawable2 = mActivity.getDrawable(R.drawable.pass); in testAccessThumb()
147 Drawable drawable1 = mActivity.getDrawable(R.drawable.black); in testAccessTickMark()
148 Drawable drawable2 = mActivity.getDrawable(R.drawable.black); in testAccessTickMark()
192 Drawable drawable1 = mActivity.getDrawable(R.drawable.scenery); in testVerifyDrawable()
193 Drawable drawable2 = mActivity.getDrawable(R.drawable.pass); in testVerifyDrawable()
194 Drawable drawable3 = mActivity.getDrawable(R.drawable.blue); in testVerifyDrawable()
195 Drawable drawable4 = mActivity.getDrawable(R.drawable.black); in testVerifyDrawable()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/voicemail/
DVoicemailBroadcastActivity.java71 mLeaveVoicemailImage.setImageDrawable(getDrawable(R.drawable.fs_warning)); in onCreate()
72 … mRestoreDefaultDialerImage.setImageDrawable(getDrawable(R.drawable.fs_warning)); in onCreate()
83 mLeaveVoicemailImage.setImageDrawable(getDrawable(R.drawable.fs_good)); in onCreate()
94 .setImageDrawable(getDrawable(R.drawable.fs_warning)); in onCreate()
96 .setImageDrawable(getDrawable(R.drawable.fs_warning)); in onCreate()
97 mLeaveVoicemailImage.setImageDrawable(getDrawable(R.drawable.fs_warning)); in onCreate()
DVisualVoicemailServiceActivity.java62 mInsertSimImage.setImageDrawable(getDrawable(R.drawable.fs_good));
70 mRemoveSimImage.setImageDrawable(getDrawable(R.drawable.fs_good));
107 mSetDefaultDialerImage.setImageDrawable(getDrawable(R.drawable.fs_warning)); in onCreate()
108 mRestoreDefaultDialerImage.setImageDrawable(getDrawable(R.drawable.fs_warning)); in onCreate()
109 mInsertSimImage.setImageDrawable(getDrawable(R.drawable.fs_warning)); in onCreate()
110 mRemoveSimImage.setImageDrawable(getDrawable(R.drawable.fs_warning)); in onCreate()
119 mRemoveSimBeforeTestImage.setImageDrawable(getDrawable(R.drawable.fs_good)); in onCreate()
DDefaultDialerChanger.java113 .setImageDrawable(mActivity.getDrawable(R.drawable.fs_indeterminate));
116 .setImageDrawable(mActivity.getDrawable(R.drawable.fs_good));
124 mSetDefaultDialerImage.setImageDrawable(mActivity.getDrawable(R.drawable.fs_good)); in updateSetDefaultDialerState()
127 .setImageDrawable(mActivity.getDrawable(R.drawable.fs_indeterminate)); in updateSetDefaultDialerState()
/cts/tests/tests/text/src/android/text/style/cts/
DImageSpanTest.java67 Drawable d = mContext.getResources().getDrawable(R.drawable.pass); in testConstructor()
98 Drawable d = mContext.getDrawable(R.drawable.pass); in testGetSource()
114 Drawable drawable = mContext.getDrawable(R.drawable.pass); in testGetDrawable()
117 assertSame(drawable, imageSpan.getDrawable()); in testGetDrawable()
121 BitmapDrawable resultDrawable = (BitmapDrawable) imageSpan.getDrawable(); in testGetDrawable()
125 assertNull(imageSpan.getDrawable()); in testGetDrawable()
128 assertNull(imageSpan.getDrawable()); in testGetDrawable()
DDynamicDrawableSpanTest.java70 Rect rect = dynamicDrawableSpan.getDrawable().getBounds(); in testGetSize()
138 .getTargetContext().getDrawable(R.drawable.scenery); in MyDynamicDrawableSpan()
143 public Drawable getDrawable() { in getDrawable() method in DynamicDrawableSpanTest.MyDynamicDrawableSpan
DDrawableMarginSpanTest.java51 mDrawable = mContext.getDrawable(R.drawable.scenery); in setup()
56 Drawable d = mContext.getDrawable(R.drawable.pass); in testConstructor()
66 assertEquals(mDrawable, span.getDrawable()); in testConstructAndGet()
/cts/tests/tests/content/src/android/content/pm/cts/
DPackageItemInfoIconTest.java63 Drawable expectedIcon = mContext.getDrawable( in testSystemDefault()
77 Drawable expectedIcon = mContext.getDrawable(R.drawable.size_48x48); in testFromAppInfo()
92 Drawable expectedIcon = mContext.getDrawable(R.drawable.start); in testFromActivity()
95 Drawable wrongIcon = mContext.getDrawable(R.drawable.pass); in testFromActivity()
111 Drawable expectedIcon = mContext.getDrawable( in testDelegatedSystemDefault()
125 Drawable expectedIcon = mContext.getDrawable(R.drawable.size_48x48); in testDelegatedFromAppInfo()
138 Drawable expectedIcon = mContext.getDrawable(R.drawable.start); in testDelegatedFromActivity()
141 Drawable wrongIcon = mContext.getDrawable(R.drawable.pass); in testDelegatedFromActivity()
/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DDevicePolicyResourcesTest.java121 Drawable drawable = sDpm.getResources().getDrawable( in setDrawables_updatesCorrectUpdatableDrawable()
125 assertThat(areSameDrawables(drawable, sContext.getDrawable(R.drawable.test_drawable_1))) in setDrawables_updatesCorrectUpdatableDrawable()
139 Drawable drawable = sDpm.getResources().getDrawable( in setDrawables_updatesCurrentlyUpdatedDrawable()
141 assertThat(areSameDrawables(drawable, sContext.getDrawable(R.drawable.test_drawable_2))) in setDrawables_updatesCurrentlyUpdatedDrawable()
149 Drawable defaultDrawable = sContext.getDrawable(R.drawable.test_drawable_2); in setDrawables_doesNotUpdateOtherUpdatableDrawables()
155 Drawable drawable = sDpm.getResources().getDrawable( in setDrawables_doesNotUpdateOtherUpdatableDrawables()
171 Drawable drawable = sDpm.getResources().getDrawable( in setDrawables_updateForSource_updatesCorrectly()
176 assertThat(areSameDrawables(drawable, sContext.getDrawable(R.drawable.test_drawable_2))) in setDrawables_updateForSource_updatesCorrectly()
191 Drawable drawable1 = sDpm.getResources().getDrawable( in setDrawables_updateForMultipleSources_updatesCorrectly()
196 assertThat(areSameDrawables(drawable1, sContext.getDrawable(R.drawable.test_drawable_1))) in setDrawables_updateForMultipleSources_updatesCorrectly()
[all …]

12345