Home
last modified time | relevance | path

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

123

/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DInsetDrawableTest.java43 Drawable d = mContext.getDrawable(R.drawable.pass); in testConstructor()
81 Drawable d = mContext.getDrawable(R.drawable.pass); in testInvalidateDrawable()
88 Drawable d = mContext.getDrawable(R.drawable.pass); in testScheduleDrawable()
103 Drawable d = mContext.getDrawable(R.drawable.pass); in testUnscheduleDrawable()
118 Drawable d = mContext.getDrawable(R.drawable.pass); in testDraw()
134 Drawable d = mContext.getDrawable(R.drawable.pass); in testGetChangingConfigurations()
145 Drawable d = mContext.getDrawable(R.drawable.pass); in testGetPadding()
187 Drawable d = mContext.getDrawable(R.drawable.pass); in testSetVisible()
196 Drawable d = mContext.getDrawable(R.drawable.pass); in testSetAlpha()
208 Drawable d = mContext.getDrawable(R.drawable.pass); in testSetColorFilter()
[all …]
DRotateDrawableTest.java48 mRotateDrawable = (RotateDrawable) resources.getDrawable(R.drawable.rotatedrawable); in setUp()
72 assertEquals(100, ((BitmapDrawable) mRotateDrawable.getDrawable()).getPaint().getAlpha()); in testSetAlpha()
75 assertEquals(255, ((BitmapDrawable) mRotateDrawable.getDrawable()).getPaint().getAlpha()); in testSetAlpha()
82 ((BitmapDrawable) mRotateDrawable.getDrawable()).getPaint().getColorFilter()); in testSetColorFilter()
85 assertNull(((BitmapDrawable) mRotateDrawable.getDrawable()).getPaint().getColorFilter()); in testSetColorFilter()
93 Drawable drawable = mContext.getResources().getDrawable(R.drawable.pass); in testInvalidateDrawable()
182 Drawable drawable = mContext.getResources().getDrawable(R.drawable.testimage); in testGetIntrinsicWidthAndHeight()
213 RotateDrawable d1 = (RotateDrawable) resources.getDrawable(R.drawable.rotatedrawable); in testMutate()
214 RotateDrawable d2 = (RotateDrawable) resources.getDrawable(R.drawable.rotatedrawable); in testMutate()
215 RotateDrawable d3 = (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.java55 assertSame(bitmapDrawable, layerDrawable.getDrawable(0)); in testConstructor()
56 assertSame(colorDrawable, layerDrawable.getDrawable(1)); in testConstructor()
79 assertEquals(ColorDrawable.class, layerDrawable.getDrawable(0).getClass()); in testInflate()
80 assertEquals(0x88, layerDrawable.getDrawable(0).getAlpha()); in testInflate()
82 assertEquals(BitmapDrawable.class, layerDrawable.getDrawable(1).getClass()); in testInflate()
84 assertEquals(RotateDrawable.class, layerDrawable.getDrawable(2).getClass()); in testInflate()
86 assertEquals(GradientDrawable.class, layerDrawable.getDrawable(3).getClass()); in testInflate()
211 assertSame(bitmapDrawable, layerDrawable.getDrawable(0)); in testAccessDrawable()
212 assertSame(colorDrawable, layerDrawable.getDrawable(1)); in testAccessDrawable()
220 assertEquals(d1, layerDrawable.getDrawable(0)); in testAccessDrawable()
[all …]
DAnimatedVectorDrawableTest.java167 AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate()
168 AnimatedVectorDrawable d2 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate()
169 AnimatedVectorDrawable d3 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate()
194 final AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testReset()
208 final AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testAddCallback()
227 final AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testRemoveCallback()
247 final AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testClearCallback()
DScaleDrawableTest.java48 assertSame(d, scaleDrawable.getDrawable()); in testConstructor()
288 d = mContext.getDrawable(R.drawable.statelistdrawable); in testOnStateChange()
447 ScaleDrawable d1 = (ScaleDrawable) mContext.getDrawable(R.drawable.scaledrawable); in testMutate()
448 ScaleDrawable d2 = (ScaleDrawable) mContext.getDrawable(R.drawable.scaledrawable); in testMutate()
449 ScaleDrawable d3 = (ScaleDrawable) mContext.getDrawable(R.drawable.scaledrawable); in testMutate()
452 assertEquals(100, ((BitmapDrawable) d1.getDrawable()).getPaint().getAlpha()); in testMutate()
453 assertEquals(100, ((BitmapDrawable) d2.getDrawable()).getPaint().getAlpha()); in testMutate()
454 assertEquals(100, ((BitmapDrawable) d3.getDrawable()).getPaint().getAlpha()); in testMutate()
458 assertEquals(200, ((BitmapDrawable) d1.getDrawable()).getPaint().getAlpha()); in testMutate()
459 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()
DGradientDrawableTest.java256 gradientDrawable = (GradientDrawable) resources.getDrawable( in testInflateGradientRadius()
262 gradientDrawable = (GradientDrawable) resources.getDrawable( in testInflateGradientRadius()
294 GradientDrawable d1 = (GradientDrawable) resources.getDrawable(R.drawable.gradientdrawable); in testMutate()
295 GradientDrawable d2 = (GradientDrawable) resources.getDrawable(R.drawable.gradientdrawable); in testMutate()
296 GradientDrawable d3 = (GradientDrawable) resources.getDrawable(R.drawable.gradientdrawable); in testMutate()
DAnimationDrawableTest.java183 Drawable frame = mResources.getDrawable(R.drawable.failed); in testGetNumberOfFrames()
201 Drawable drawable = mResources.getDrawable(R.drawable.testimage); in testGetFrame()
206 drawable = mResources.getDrawable(R.drawable.pass); in testGetFrame()
211 drawable = mResources.getDrawable(R.drawable.scenery); in testGetFrame()
344 .getDrawable(R.drawable.animationdrawable); in testMutate()
DRippleDrawableTest.java41 (RippleDrawable) getContext().getDrawable(R.drawable.rippledrawable_radius); in testRadiusAttr()
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()
/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.java169 assertNull(imageView.getDrawable()); in testGetDrawable()
172 assertEquals(drawable1, imageView.getDrawable()); in testGetDrawable()
173 assertNotSame(drawable2, imageView.getDrawable()); in testGetDrawable()
180 assertNull(mImageView.getDrawable()); in testSetImageIcon()
185 assertNotNull(mImageView.getDrawable()); in testSetImageIcon()
186 Drawable drawable = mActivity.getDrawable(R.drawable.testimage); in testSetImageIcon()
188 Drawable imageViewDrawable = mImageView.getDrawable(); in testSetImageIcon()
197 assertNull(mImageView.getDrawable()); in testSetImageResource()
201 assertNotNull(mImageView.getDrawable()); in testSetImageResource()
202 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(com.android.cts.widget.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.java84 Drawable drawable1 = mResources.getDrawable(R.drawable.scenery); in testSetThumb()
85 Drawable drawable2 = mResources.getDrawable(R.drawable.pass); in testSetThumb()
115 Drawable drawable1 = mResources.getDrawable(R.drawable.scenery); in testVerifyDrawable()
116 Drawable drawable2 = mResources.getDrawable(R.drawable.pass); in testVerifyDrawable()
117 Drawable drawable3 = mResources.getDrawable(R.drawable.blue); in testVerifyDrawable()
118 Drawable drawable4 = mResources.getDrawable(R.drawable.black); in testVerifyDrawable()
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.java197 Drawable firstDrawable = mResources.getDrawable(R.drawable.scenery);
212 Drawable secondDrawable = mResources.getDrawable(R.drawable.pass);
237 Drawable firstDrawable = mResources.getDrawable(R.drawable.scenery);
253 Drawable secondDrawable = mResources.getDrawable(R.drawable.pass);
DFrameLayoutTest.java84 = (BitmapDrawable) mActivity.getResources().getDrawable(R.drawable.size_48x48); in testSetForegroundGravity()
112 = (BitmapDrawable) mActivity.getResources().getDrawable(R.drawable.size_48x48); in testSetForegroundGravity()
137 final Drawable foreground = mActivity.getResources().getDrawable(R.drawable.size_48x48); in testGatherTransparentRegion()
268 Drawable drawable = mActivity.getResources().getDrawable(R.drawable.scenery); in testVerifyDrawable()
272 drawable = mActivity.getResources().getDrawable(R.drawable.black); 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.java93 r.getDrawable(R.drawable.image); in testSingleBase()
140 final Drawable d = r.getDrawable(R.drawable.image); in testDensitySingle()
153 assertEquals(0xff7e00ff, getDrawableColor(r.getDrawable(R.drawable.image))); in testDensityAll()
156 assertEquals(0xff00fcff, getDrawableColor(r.getDrawable(R.drawable.image))); in testDensityAll()
159 assertEquals(0xff80ff00, getDrawableColor(r.getDrawable(R.drawable.image))); in testDensityAll()
162 assertEquals(0xffff0000, getDrawableColor(r.getDrawable(R.drawable.image))); in testDensityAll()
170 assertEquals(0xff7e00ff, getDrawableColor(r.getDrawable(R.drawable.image))); in testDensityBest1()
178 assertEquals(0xffff0000, getDrawableColor(r.getDrawable(R.drawable.image))); in testDensityBest2()

123