Home
last modified time | relevance | path

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

123

/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DInsetDrawableTest.java45 Drawable d = mContext.getDrawable(R.drawable.pass); in testConstructor()
85 Drawable d = mContext.getDrawable(R.drawable.pass); in testInvalidateDrawable()
92 Drawable d = mContext.getDrawable(R.drawable.pass); in testScheduleDrawable()
107 Drawable d = mContext.getDrawable(R.drawable.pass); in testUnscheduleDrawable()
122 Drawable d = mContext.getDrawable(R.drawable.pass); in testDraw()
138 Drawable d = mContext.getDrawable(R.drawable.pass); in testGetChangingConfigurations()
149 Drawable d = mContext.getDrawable(R.drawable.pass); in testGetPadding()
191 Drawable d = mContext.getDrawable(R.drawable.pass); in testSetVisible()
200 Drawable d = mContext.getDrawable(R.drawable.pass); in testSetAlpha()
212 Drawable d = mContext.getDrawable(R.drawable.pass); in testSetColorFilter()
[all …]
DRotateDrawableTest.java48 mRotateDrawable = (RotateDrawable) resources.getDrawable(R.drawable.rotatedrawable); in setUp()
63 d = (RotateDrawable) mContext.getResources().getDrawable(R.drawable.rotatedrawable_rel); in testInflate()
71 d = (RotateDrawable) mContext.getResources().getDrawable(R.drawable.rotatedrawable_abs); in testInflate()
126 assertEquals(100, ((BitmapDrawable) mRotateDrawable.getDrawable()).getPaint().getAlpha()); in testSetAlpha()
129 assertEquals(255, ((BitmapDrawable) mRotateDrawable.getDrawable()).getPaint().getAlpha()); in testSetAlpha()
136 ((BitmapDrawable) mRotateDrawable.getDrawable()).getPaint().getColorFilter()); in testSetColorFilter()
139 assertNull(((BitmapDrawable) mRotateDrawable.getDrawable()).getPaint().getColorFilter()); in testSetColorFilter()
147 Drawable drawable = mContext.getResources().getDrawable(R.drawable.pass); in testInvalidateDrawable()
236 Drawable drawable = mContext.getResources().getDrawable(R.drawable.testimage); in testGetIntrinsicWidthAndHeight()
267 RotateDrawable d1 = (RotateDrawable) resources.getDrawable(R.drawable.rotatedrawable); in testMutate()
[all …]
DThemedDrawableTest.java58 BitmapDrawable d = (BitmapDrawable) mContext.getDrawable(R.drawable.bitmapdrawable_theme); in testBitmapDrawable()
76 ColorDrawable d = (ColorDrawable) mContext.getDrawable(R.drawable.colordrawable_theme); in testColorDrawable()
82 GradientDrawable d = (GradientDrawable) mContext.getDrawable( in testGradientDrawable()
126 NinePatchDrawable d = (NinePatchDrawable) mContext.getDrawable( in testNinePatchDrawable()
139 RippleDrawable d = (RippleDrawable) mContext.getDrawable( in testRippleDrawable()
146 LayerDrawable d = (LayerDrawable) mContext.getDrawable(R.drawable.layerdrawable_theme); in testLayerDrawable()
152 BitmapDrawable bitmapDrawable = (BitmapDrawable) d.getDrawable(0); in testLayerDrawable()
155 NinePatchDrawable ninePatchDrawable = (NinePatchDrawable) d.getDrawable(1); in testLayerDrawable()
DLayerDrawableTest.java57 assertSame(bitmapDrawable, layerDrawable.getDrawable(0)); in testConstructor()
58 assertSame(colorDrawable, layerDrawable.getDrawable(1)); in testConstructor()
81 assertEquals(ColorDrawable.class, layerDrawable.getDrawable(0).getClass()); in testInflate()
82 assertEquals(0x88, layerDrawable.getDrawable(0).getAlpha()); in testInflate()
84 assertEquals(BitmapDrawable.class, layerDrawable.getDrawable(1).getClass()); in testInflate()
86 assertEquals(RotateDrawable.class, layerDrawable.getDrawable(2).getClass()); in testInflate()
88 assertEquals(GradientDrawable.class, layerDrawable.getDrawable(3).getClass()); in testInflate()
213 assertSame(bitmapDrawable, layerDrawable.getDrawable(0)); in testAccessDrawable()
214 assertSame(colorDrawable, layerDrawable.getDrawable(1)); in testAccessDrawable()
222 assertEquals(d1, layerDrawable.getDrawable(0)); in testAccessDrawable()
[all …]
DAnimatedVectorDrawableTest.java145 (AnimatedVectorDrawable) mResources.getDrawable(resId); in testSingleFrameAnimation()
209 AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate()
210 AnimatedVectorDrawable d2 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate()
211 AnimatedVectorDrawable d3 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate()
237 AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testGetOpacity()
246 AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testColorFilter()
254 final AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testReset()
270 final AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testStop()
293 AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) imageView.getDrawable(); in testAddCallbackBeforeStart()
313 AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) imageView.getDrawable(); in testAddCallbackAfterTrigger()
[all …]
DScaleDrawableTest.java49 assertSame(d, scaleDrawable.getDrawable()); in testConstructor()
289 d = mContext.getDrawable(R.drawable.statelistdrawable); in testOnStateChange()
470 ScaleDrawable d1 = (ScaleDrawable) mContext.getDrawable(R.drawable.scaledrawable); in testMutate()
471 ScaleDrawable d2 = (ScaleDrawable) mContext.getDrawable(R.drawable.scaledrawable); in testMutate()
472 ScaleDrawable d3 = (ScaleDrawable) mContext.getDrawable(R.drawable.scaledrawable); in testMutate()
475 assertEquals(100, ((BitmapDrawable) d1.getDrawable()).getPaint().getAlpha()); in testMutate()
476 assertEquals(100, ((BitmapDrawable) d2.getDrawable()).getPaint().getAlpha()); in testMutate()
477 assertEquals(100, ((BitmapDrawable) d3.getDrawable()).getPaint().getAlpha()); in testMutate()
481 assertEquals(200, ((BitmapDrawable) d1.getDrawable()).getPaint().getAlpha()); in testMutate()
482 assertEquals(100, ((BitmapDrawable) d2.getDrawable()).getPaint().getAlpha()); in testMutate()
[all …]
DLevelListDrawableTest.java169 (LevelListDrawable) resources.getDrawable(R.drawable.levellistdrawable); in testMutate()
171 (LevelListDrawable) resources.getDrawable(R.drawable.levellistdrawable); in testMutate()
173 (LevelListDrawable) resources.getDrawable(R.drawable.levellistdrawable); in testMutate()
176 d1.addLevel(100, 200, resources.getDrawable(R.drawable.testimage)); in testMutate()
DAnimationDrawableTest.java197 Drawable frame = mResources.getDrawable(R.drawable.failed); in testGetNumberOfFrames()
215 Drawable drawable = mResources.getDrawable(R.drawable.testimage); in testGetFrame()
220 drawable = mResources.getDrawable(R.drawable.pass); in testGetFrame()
225 drawable = mResources.getDrawable(R.drawable.scenery); in testGetFrame()
375 .getDrawable(R.drawable.animationdrawable); in testMutate()
DDrawableWrapperTest.java46 assertSame(d, wrapper.getDrawable()); in testConstructor()
55 assertSame(d, wrapper.getDrawable()); in testGetDrawable()
62 assertSame(null, wrapper.getDrawable()); in testSetDrawable()
65 assertSame(d, wrapper.getDrawable()); in testSetDrawable()
294 d = mContext.getDrawable(R.drawable.statelistdrawable); in testOnStateChange()
DTransitionDrawableTest.java48 .getResources().getDrawable(R.drawable.transition_test); in setUp()
58 resources.getDrawable(R.drawable.testimage), in testConstructor()
59 resources.getDrawable(R.drawable.levellistdrawable) in testConstructor()
/cts/tests/tests/widget/src/android/widget/cts/
DImageSwitcherTest.java68 Drawable drawable = resources.getDrawable(R.drawable.scenery); in testSetImageResource()
71 (BitmapDrawable) ((ImageView) imageSwitcher.getCurrentView()).getDrawable(); in testSetImageResource()
76 drawable = resources.getDrawable(R.drawable.testimage); in testSetImageResource()
79 (BitmapDrawable) ((ImageView) imageSwitcher.getCurrentView()).getDrawable(); in testSetImageResource()
83 assertNull(((ImageView) imageSwitcher.getCurrentView()).getDrawable()); in testSetImageResource()
107 (BitmapDrawable) ((ImageView) imageSwitcher.getCurrentView()).getDrawable(); in testSetImageURI()
121 (BitmapDrawable) ((ImageView) imageSwitcher.getCurrentView()).getDrawable(); in testSetImageURI()
138 Drawable drawable = resources.getDrawable(R.drawable.scenery); in testSetImageDrawable()
141 assertSame(drawable, ((ImageView) imageSwitcher.getCurrentView()).getDrawable()); in testSetImageDrawable()
143 drawable = resources.getDrawable(R.drawable.testimage); in testSetImageDrawable()
[all …]
DImageViewTest.java182 assertNull(imageView.getDrawable()); in testGetDrawable()
185 assertEquals(drawable1, imageView.getDrawable()); in testGetDrawable()
186 assertNotSame(drawable2, imageView.getDrawable()); in testGetDrawable()
193 assertNull(mImageView.getDrawable()); in testSetImageIcon()
198 assertNotNull(mImageView.getDrawable()); in testSetImageIcon()
199 Drawable drawable = mActivity.getDrawable(R.drawable.testimage); in testSetImageIcon()
201 Drawable imageViewDrawable = mImageView.getDrawable(); in testSetImageIcon()
210 assertNull(mImageView.getDrawable()); in testSetImageResource()
214 assertNotNull(mImageView.getDrawable()); in testSetImageResource()
215 Drawable drawable = mActivity.getDrawable(R.drawable.testimage); in testSetImageResource()
[all …]
DSimpleAdapterTest.java291 assertNull(view.getDrawable()); in testSetViewImage()
293 BitmapDrawable d = (BitmapDrawable) mContext.getResources().getDrawable( in testSetViewImage()
296 ((BitmapDrawable) view.getDrawable()).getBitmap()); in testSetViewImage()
300 assertNull(view.getDrawable()); in testSetViewImage()
302 assertNull(view.getDrawable()); in testSetViewImage()
306 assertNull(view.getDrawable()); in testSetViewImage()
316 assertNull(view.getDrawable()); in testSetViewImage()
319 .getDrawable(android.widget.cts.R.drawable.scenery); in testSetViewImage()
321 ((BitmapDrawable) view.getDrawable()).getBitmap()); in testSetViewImage()
325 assertNull(view.getDrawable()); in testSetViewImage()
[all …]
DRemoteViewsTest.java158 assertNull(image.getDrawable()); in testSetIcon()
163 assertNotNull(image.getDrawable()); in testSetIcon()
164 BitmapDrawable dBlack = (BitmapDrawable) mActivity.getDrawable(R.drawable.icon_black); in testSetIcon()
166 ((BitmapDrawable) image.getDrawable()).getBitmap()); in testSetIcon()
171 assertNull(image.getDrawable()); in testSetImageViewIcon()
176 assertNotNull(image.getDrawable()); in testSetImageViewIcon()
177 BitmapDrawable dBlue = (BitmapDrawable) mActivity.getDrawable(R.drawable.icon_blue); in testSetImageViewIcon()
179 ((BitmapDrawable) image.getDrawable()).getBitmap()); in testSetImageViewIcon()
185 assertNull(image.getDrawable()); in testSetImageViewResource()
189 assertNotNull(image.getDrawable()); in testSetImageViewResource()
[all …]
DSimpleCursorTreeAdapterTest.java137 assertNull(view.getDrawable()); in testSetViewImage()
140 BitmapDrawable d = (BitmapDrawable) mContext.getResources().getDrawable( in testSetViewImage()
143 ((BitmapDrawable) view.getDrawable()).getBitmap()); in testSetViewImage()
147 assertNull(view.getDrawable()); in testSetViewImage()
149 assertNull(view.getDrawable()); in testSetViewImage()
153 assertNull(view.getDrawable()); in testSetViewImage()
163 assertNull(view.getDrawable()); in testSetViewImage()
168 Bitmap actualBitmap = ((BitmapDrawable) view.getDrawable()).getBitmap(); in testSetViewImage()
DSimpleCursorAdapterTest.java190 assertNull(view.getDrawable()); in testSetViewImage()
192 assertNotNull(view.getDrawable()); in testSetViewImage()
193 BitmapDrawable d = (BitmapDrawable) mContext.getResources().getDrawable( in testSetViewImage()
196 ((BitmapDrawable) view.getDrawable()).getBitmap()); in testSetViewImage()
200 assertNull(view.getDrawable()); in testSetViewImage()
202 assertNull(view.getDrawable()); in testSetViewImage()
206 assertNull(view.getDrawable()); in testSetViewImage()
217 assertNull(view.getDrawable()); in testSetViewImage()
222 assertNotNull(view.getDrawable()); in testSetViewImage()
223 Bitmap actualBitmap = ((BitmapDrawable) view.getDrawable()).getBitmap(); in testSetViewImage()
DAbsSeekBarTest.java80 Drawable drawable1 = mActivity.getDrawable(R.drawable.scenery); in testSetThumb()
81 Drawable drawable2 = mActivity.getDrawable(R.drawable.pass); in testSetThumb()
99 Drawable drawable1 = mActivity.getDrawable(R.drawable.black); in testSetTickMark()
100 Drawable drawable2 = mActivity.getDrawable(R.drawable.black); in testSetTickMark()
132 Drawable drawable1 = mActivity.getDrawable(R.drawable.scenery); in testVerifyDrawable()
133 Drawable drawable2 = mActivity.getDrawable(R.drawable.pass); in testVerifyDrawable()
134 Drawable drawable3 = mActivity.getDrawable(R.drawable.blue); in testVerifyDrawable()
135 Drawable drawable4 = mActivity.getDrawable(R.drawable.black); in testVerifyDrawable()
DToggleButtonTest.java102 mContext.getDrawable(R.drawable.scenery)); in testDrawableStateChanged()
104 mContext.getDrawable(R.drawable.scenery)); in testDrawableStateChanged()
161 Drawable drawable = mContext.getResources().getDrawable(R.drawable.scenery); in testSetBackgroundDrawable()
DTabHost_TabSpecTest.java98 assertSame(d, ivIcon.getDrawable()); in testSetIndicator2()
110 assertSame(d, ivIcon.getDrawable()); in testSetIndicator2()
121 assertNull(ivIcon.getDrawable()); in testSetIndicator2()
132 assertNull(ivIcon.getDrawable()); in testSetIndicator2()
DCheckedTextViewTest.java198 Drawable firstDrawable = mResources.getDrawable(R.drawable.scenery);
213 Drawable secondDrawable = mResources.getDrawable(R.drawable.pass);
238 Drawable firstDrawable = mResources.getDrawable(R.drawable.scenery);
254 Drawable secondDrawable = mResources.getDrawable(R.drawable.pass);
DCompoundButtonTest.java175 Drawable drawable = mResources.getDrawable(R.drawable.statelistdrawable); in testDrawableStateChanged()
196 Drawable firstDrawable = mResources.getDrawable(R.drawable.scenery); in testSetButtonDrawableByDrawable()
206 Drawable secondDrawable = mResources.getDrawable(R.drawable.pass); in testSetButtonDrawableByDrawable()
271 drawable = mResources.getDrawable(R.drawable.scenery); in testOnDraw()
323 Drawable drawable = mContext.getResources().getDrawable(R.drawable.scenery); in testVerifyDrawable()
/cts/tests/tests/text/src/android/text/style/cts/
DImageSpanTest.java43 Drawable d = mContext.getResources().getDrawable(R.drawable.pass); in testConstructor()
73 Drawable d = mContext.getResources().getDrawable(R.drawable.pass); in testGetSource()
88 Drawable drawable = mContext.getResources().getDrawable(R.drawable.pass); in testGetDrawable()
91 assertSame(drawable, imageSpan.getDrawable()); in testGetDrawable()
95 BitmapDrawable resultDrawable = (BitmapDrawable) imageSpan.getDrawable(); in testGetDrawable()
99 assertNull(imageSpan.getDrawable()); in testGetDrawable()
102 assertNull(imageSpan.getDrawable()); in testGetDrawable()
DDrawableMarginSpanTest.java35 Drawable d = mContext.getResources().getDrawable(R.drawable.pass); in testConstructor()
43 Drawable drawable = mContext.getResources().getDrawable(R.drawable.scenery); in testGetLeadingMargin()
55 Drawable drawable = mContext.getResources().getDrawable(R.drawable.scenery); in testDrawLeadingMargin()
97 Drawable drawable = mContext.getResources().getDrawable(R.drawable.scenery); in testChooseHeight()
DDynamicDrawableSpanTest.java51 Rect rect = dynamicDrawableSpan.getDrawable().getBounds(); in testGetSize()
89 public Drawable getDrawable() { in getDrawable() method in DynamicDrawableSpanTest.MyDynamicDrawableSpan
91 return getContext().getResources().getDrawable(R.drawable.scenery); in getDrawable()
/cts/hostsidetests/appsecurity/test-apps/SplitApp/src/com/android/cts/splitapp/
DSplitAppTest.java96 r.getDrawable(R.drawable.image); in testSingleBase()
143 final Drawable d = r.getDrawable(R.drawable.image); in testDensitySingle()
156 assertEquals(0xff7e00ff, getDrawableColor(r.getDrawable(R.drawable.image))); in testDensityAll()
159 assertEquals(0xff00fcff, getDrawableColor(r.getDrawable(R.drawable.image))); in testDensityAll()
162 assertEquals(0xff80ff00, getDrawableColor(r.getDrawable(R.drawable.image))); in testDensityAll()
165 assertEquals(0xffff0000, getDrawableColor(r.getDrawable(R.drawable.image))); in testDensityAll()
173 assertEquals(0xff7e00ff, getDrawableColor(r.getDrawable(R.drawable.image))); in testDensityBest1()
181 assertEquals(0xffff0000, getDrawableColor(r.getDrawable(R.drawable.image))); in testDensityBest2()

123