Home
last modified time | relevance | path

Searched refs:drawable (Results 1 – 25 of 318) sorted by relevance

12345678910>>...13

/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DAnimatedImageDrawableTest.java17 package android.graphics.drawable.cts;
39 import android.graphics.drawable.AnimatedImageDrawable;
40 import android.graphics.drawable.Drawable;
67 private static final int RES_ID = R.drawable.animated;
103 AnimatedImageDrawable aid1 = (AnimatedImageDrawable) mRes.getDrawable(R.drawable.animated); in testMutate()
104 AnimatedImageDrawable aid2 = (AnimatedImageDrawable) mRes.getDrawable(R.drawable.animated); in testMutate()
115 mRes.getDrawable(R.drawable.animated).setAlpha(originalAlpha); in testMutate()
124 Drawable drawable = ImageDecoder.decodeDrawable(source); in createFromImageDecoder() local
125 assertTrue(drawable instanceof AnimatedImageDrawable); in createFromImageDecoder()
126 return (AnimatedImageDrawable) drawable; in createFromImageDecoder()
[all …]
DVectorDrawableTest.java17 package android.graphics.drawable.cts;
35 import android.graphics.drawable.Drawable.ConstantState;
36 import android.graphics.drawable.VectorDrawable;
62 R.drawable.vector_icon_create,
63 R.drawable.vector_icon_delete,
64 R.drawable.vector_icon_heart,
65 R.drawable.vector_icon_schedule,
66 R.drawable.vector_icon_settings,
67 R.drawable.vector_icon_random_path_1,
68 R.drawable.vector_icon_random_path_2,
[all …]
DDefaultFocusHighlightTest.java17 package android.graphics.drawable.cts;
33 import android.graphics.drawable.BitmapDrawable;
34 import android.graphics.drawable.ColorDrawable;
35 import android.graphics.drawable.Drawable;
36 import android.graphics.drawable.DrawableContainer;
37 import android.graphics.drawable.DrawableContainer.DrawableContainerState;
38 import android.graphics.drawable.GradientDrawable;
39 import android.graphics.drawable.LevelListDrawable;
40 import android.graphics.drawable.NinePatchDrawable;
41 import android.graphics.drawable.PaintDrawable;
[all …]
DGradientDrawableTest.java17 package android.graphics.drawable.cts;
39 import android.graphics.drawable.Drawable.ConstantState;
40 import android.graphics.drawable.GradientDrawable;
41 import android.graphics.drawable.GradientDrawable.Orientation;
428 XmlPullParser parser = mResources.getXml(R.drawable.gradientdrawable); in testInflate()
464 GradientDrawable drawable = new GradientDrawable(); in testGradientPadding() local
465 drawable.setPadding(1, 2, 3, 4); in testGradientPadding()
468 drawable.getPadding(padding); in testGradientPadding()
478 GradientDrawable drawable = new GradientDrawable(); in testGradientThickness() local
481 drawable.setThickness(thickness); in testGradientThickness()
[all …]
DThemedDrawableTest.java17 package android.graphics.drawable.cts;
32 import android.graphics.drawable.BitmapDrawable;
33 import android.graphics.drawable.ColorDrawable;
34 import android.graphics.drawable.GradientDrawable;
35 import android.graphics.drawable.LayerDrawable;
36 import android.graphics.drawable.NinePatchDrawable;
37 import android.graphics.drawable.RippleDrawable;
38 import android.graphics.drawable.VectorDrawable;
72 BitmapDrawable d = (BitmapDrawable) mContext.getDrawable(R.drawable.bitmapdrawable_theme); in testBitmapDrawable()
91 ColorDrawable d = (ColorDrawable) mContext.getDrawable(R.drawable.colordrawable_theme); in testColorDrawable()
[all …]
DRotateDrawableTest.java17 package android.graphics.drawable.cts;
41 import android.graphics.drawable.BitmapDrawable;
42 import android.graphics.drawable.ColorDrawable;
43 import android.graphics.drawable.Drawable;
44 import android.graphics.drawable.Drawable.ConstantState;
45 import android.graphics.drawable.RotateDrawable;
70 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()
179 Drawable drawable = mResources.getDrawable(R.drawable.pass); in testInvalidateDrawable() local
[all …]
DRippleDrawableTest.java17 package android.graphics.drawable.cts;
31 import android.graphics.drawable.Drawable;
32 import android.graphics.drawable.Drawable.ConstantState;
33 import android.graphics.drawable.RippleDrawable;
64 RippleDrawable drawable = in testAccessRadius() local
66 assertEquals(RippleDrawable.RADIUS_AUTO, drawable.getRadius()); in testAccessRadius()
67 drawable.setRadius(10); in testAccessRadius()
68 assertEquals(10, drawable.getRadius()); in testAccessRadius()
73 RippleDrawable drawable = in testRadiusAttr() local
74 (RippleDrawable) mContext.getDrawable(R.drawable.rippledrawable_radius); in testRadiusAttr()
[all …]
DAnimationDrawableTest.java17 package android.graphics.drawable.cts;
32 import android.graphics.drawable.AnimationDrawable;
33 import android.graphics.drawable.Drawable;
34 import android.graphics.drawable.DrawableContainer.DrawableContainerState;
85 imageView.setBackgroundResource(R.drawable.animationdrawable); in setup()
184 Drawable frame = mResources.getDrawable(R.drawable.failed); in testGetNumberOfFrames()
203 Drawable drawable = mResources.getDrawable(R.drawable.testimage); in testGetFrame() local
204 assertEquals(drawable.getIntrinsicWidth(), frame.getIntrinsicWidth()); in testGetFrame()
205 assertEquals(drawable.getIntrinsicHeight(), frame.getIntrinsicHeight()); in testGetFrame()
208 drawable = mResources.getDrawable(R.drawable.pass); in testGetFrame()
[all …]
DVectorDrawableSizeTest.java17 package android.graphics.drawable.cts;
24 import android.graphics.drawable.VectorDrawable;
48 {"size_1", R.drawable.vector_icon_size_1, 7}, in data()
49 {"size_2", R.drawable.vector_icon_size_2, 9} in data()
71 VectorDrawable drawable = (VectorDrawable) mResources.getDrawable(mResId, null); in testVectorDrawableSize() local
72 assertEquals(Math.round(mDpSize * densityDpi / 160f), drawable.getIntrinsicWidth()); in testVectorDrawableSize()
73 assertEquals(Math.round(mDpSize * densityDpi / 160f), drawable.getIntrinsicHeight()); in testVectorDrawableSize()
DInsetDrawableTest.java17 package android.graphics.drawable.cts;
35 import android.graphics.drawable.Drawable;
36 import android.graphics.drawable.Drawable.ConstantState;
37 import android.graphics.drawable.InsetDrawable;
66 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()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DFontRenderingTests.java75 R.drawable.hello1); in testDefaultFont()
82 R.drawable.bold1); in testBoldFont()
89 R.drawable.italic1); in testItalicFont()
96 R.drawable.bolditalic1); in testBoldItalicFont()
103 R.drawable.medium1); in testMediumFont()
111 R.drawable.black1); in testMediumBoldFont()
118 R.drawable.mediumitalic1); in testMediumItalicFont()
125 R.drawable.blackitalic1); in testMediumBoldItalicFont()
132 R.drawable.light1); in testLightFont()
140 R.drawable.medium1); in testLightBoldFont()
[all …]
DHardwareBitmapTests.java35 import android.graphics.drawable.Drawable;
36 import android.graphics.drawable.NinePatchDrawable;
79 Bitmap hardwareBitmap = BitmapFactory.decodeResource(mRes, R.drawable.robot, in testDecodeResource()
83 R.drawable.golden_robot, new MSSIMComparer(0.95))); in testDecodeResource()
109 Bitmap hardwareBitmap = BitmapFactory.decodeResource(mRes, R.drawable.robot, in testReadbackThroughPicture()
123 R.drawable.golden_robot, new MSSIMComparer(0.95)).verify(result)); in testReadbackThroughPicture()
129 Bitmap hardwareBitmap = BitmapFactory.decodeResource(mRes, R.drawable.robot, in testReadbackThroughPictureNoEndRecording()
144 R.drawable.golden_robot, new MSSIMComparer(0.95)).verify(result)); in testReadbackThroughPictureNoEndRecording()
151 Bitmap bitmap = BitmapFactory.decodeResource(mRes, R.drawable.robot, HARDWARE_OPTIONS); in testCreateScaledBitmapFromPicture()
165 R.drawable.golden_hardwaretest_create_scaled, new MSSIMComparer(0.9))); in testCreateScaledBitmapFromPicture()
[all …]
/cts/tests/tests/widget/src/android/widget/cts/
DImageViewTest.java55 import android.graphics.drawable.BitmapDrawable;
56 import android.graphics.drawable.ColorDrawable;
57 import android.graphics.drawable.Drawable;
58 import android.graphics.drawable.Icon;
59 import android.graphics.drawable.PaintDrawable;
213 Icon icon = Icon.createWithResource(mActivity, R.drawable.testimage); in testSetImageIcon()
217 Drawable drawable = mActivity.getDrawable(R.drawable.testimage); in testSetImageIcon() local
218 BitmapDrawable testimageBitmap = (BitmapDrawable) drawable; in testSetImageIcon()
230 mImageViewRegular.setImageResource(R.drawable.testimage); in testSetImageResource()
233 Drawable drawable = mActivity.getDrawable(R.drawable.testimage); in testSetImageResource() local
[all …]
DCompoundButtonTest.java43 import android.graphics.drawable.ColorDrawable;
44 import android.graphics.drawable.Drawable;
200 Drawable drawable = mActivity.getDrawable(R.drawable.statelistdrawable); in testDrawableStateChanged() local
201 compoundButton.setButtonDrawable(drawable); in testDrawableStateChanged()
202 drawable.setState(null); in testDrawableStateChanged()
203 assertNull(drawable.getState()); in testDrawableStateChanged()
206 assertNotNull(drawable.getState()); in testDrawableStateChanged()
207 assertSame(compoundButton.getDrawableState(), drawable.getState()); in testDrawableStateChanged()
219 Drawable firstDrawable = mActivity.getDrawable(R.drawable.scenery); in testSetButtonDrawableByDrawable()
229 Drawable secondDrawable = mActivity.getDrawable(R.drawable.pass); in testSetButtonDrawableByDrawable()
[all …]
DImageSwitcherTest.java28 import android.graphics.drawable.BitmapDrawable;
29 import android.graphics.drawable.Drawable;
95 mImageSwitcher.setImageResource(R.drawable.scenery); in testSetImageResource()
98 Drawable drawable = resources.getDrawable(R.drawable.scenery); in testSetImageResource() local
99 BitmapDrawable sceneryBitmap = (BitmapDrawable) drawable; in testSetImageResource()
104 mImageSwitcher.setImageResource(R.drawable.testimage); in testSetImageResource()
106 drawable = resources.getDrawable(R.drawable.testimage); in testSetImageResource()
107 BitmapDrawable testimageBitmap = (BitmapDrawable) drawable; in testSetImageResource()
169 Drawable drawable = resources.getDrawable(R.drawable.scenery); in testSetImageDrawable() local
170 mImageSwitcher.setImageDrawable(drawable); in testSetImageDrawable()
[all …]
DGalleryCtsActivity.java74 R.drawable.faces,
75 R.drawable.scenery,
76 R.drawable.testimage,
77 R.drawable.faces,
78 R.drawable.scenery,
79 R.drawable.testimage,
80 R.drawable.faces,
81 R.drawable.scenery,
82 R.drawable.testimage,
DToggleButtonTest.java28 import android.graphics.drawable.Drawable;
29 import android.graphics.drawable.StateListDrawable;
130 final StateListDrawable drawable = new StateListDrawable(); in testDrawableStateChanged() local
131 drawable.addState(new int[] { android.R.attr.state_pressed }, in testDrawableStateChanged()
132 mActivity.getDrawable(R.drawable.scenery)); in testDrawableStateChanged()
133 drawable.addState(new int[] {}, in testDrawableStateChanged()
134 mActivity.getDrawable(R.drawable.scenery)); in testDrawableStateChanged()
137 toggleButton.setButtonDrawable(drawable); in testDrawableStateChanged()
138 drawable.setState(null); in testDrawableStateChanged()
139 assertNull(drawable.getState()); in testDrawableStateChanged()
[all …]
DRemoteViewsTest.java35 import android.graphics.drawable.BitmapDrawable;
36 import android.graphics.drawable.Icon;
235 Icon iconBlack = Icon.createWithResource(mContext, R.drawable.icon_black); in testSetIcon()
239 BitmapDrawable dBlack = (BitmapDrawable) mContext.getDrawable(R.drawable.icon_black); in testSetIcon()
249 Icon iconBlue = Icon.createWithResource(mContext, R.drawable.icon_blue); in testSetImageViewIcon()
253 BitmapDrawable dBlue = (BitmapDrawable) mContext.getDrawable(R.drawable.icon_blue); in testSetImageViewIcon()
264 mRemoteViews.setImageViewResource(R.id.remoteView_image, R.drawable.testimage); in testSetImageViewResource()
267 BitmapDrawable d = (BitmapDrawable) mContext.getDrawable(R.drawable.testimage); in testSetImageViewResource()
272 mRemoteViews.setImageViewResource(R.id.remoteView_absolute, R.drawable.testimage); in testSetImageViewResource()
398 mRemoteViews.setImageViewResource(R.id.remoteView_image, R.drawable.testimage); in testReapply()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/telecom/
DTelecomDefaultDialerTestActivity.java84 mStep1Status.setImageResource(R.drawable.fs_indeterminate); in onCreate()
85 mStep2Status.setImageResource(R.drawable.fs_indeterminate); in onCreate()
86 mStep3Status.setImageResource(R.drawable.fs_indeterminate); in onCreate()
87 mStep3Status.setImageResource(R.drawable.fs_indeterminate); in onCreate()
95 mStep1Status.setImageResource(R.drawable.fs_good); in onCreate()
105 mStep2Status.setImageResource(R.drawable.fs_good); in onCreate()
124 mStep1Status.setImageResource(R.drawable.fs_good); in onActivityResult()
126 mStep1Status.setImageResource(R.drawable.fs_error); in onActivityResult()
131 mStep2Status.setImageResource(R.drawable.fs_good); in onActivityResult()
133 mStep2Status.setImageResource(R.drawable.fs_error); in onActivityResult()
[all …]
DSelfManagedIncomingCallTestActivity.java57 mStep3Status.setImageResource(R.drawable.fs_error);
79 mStep3Status.setImageResource(R.drawable.fs_error);
83 mStep3Status.setImageResource(R.drawable.fs_good);
109 mStep1Status.setImageResource(R.drawable.fs_good); in onCreate()
112 mStep1Status.setImageResource(R.drawable.fs_error); in onCreate()
123 mStep2Status.setImageResource(R.drawable.fs_error); in onCreate()
126 mStep2Status.setImageResource(R.drawable.fs_good); in onCreate()
148 mStep2Status.setImageResource(R.drawable.fs_error); in onCreate()
158 mStep2Status.setImageResource(R.drawable.fs_error); in onCreate()
165 mStep2Status.setImageResource(R.drawable.fs_error); in onCreate()
[all …]
/cts/tests/tests/text/src/android/text/style/cts/
DImageSpanTest.java25 import android.graphics.drawable.BitmapDrawable;
26 import android.graphics.drawable.Drawable;
67 Drawable d = mContext.getResources().getDrawable(R.drawable.pass); in testConstructor()
82 new ImageSpan(mContext, R.drawable.pass); in testConstructor()
83 new ImageSpan(mContext, R.drawable.pass, DynamicDrawableSpan.ALIGN_BOTTOM); in testConstructor()
84 new ImageSpan(mContext, R.drawable.pass, DynamicDrawableSpan.ALIGN_BASELINE); in testConstructor()
98 Drawable d = mContext.getDrawable(R.drawable.pass); in testGetSource()
114 Drawable drawable = mContext.getDrawable(R.drawable.pass); in testGetDrawable() local
116 ImageSpan imageSpan = new ImageSpan(drawable); in testGetDrawable()
117 assertSame(drawable, imageSpan.getDrawable()); in testGetDrawable()
[all …]
/cts/tests/tests/content/src/android/content/pm/cts/
DPackageItemInfoIconTest.java29 import android.graphics.drawable.Drawable;
63 com.android.internal.R.drawable.sym_def_app_icon); in testSystemDefault()
76 Drawable expectedIcon = mContext.getDrawable(R.drawable.size_48x48); in testFromAppInfo()
90 Drawable expectedIcon = mContext.getDrawable(R.drawable.start); in testFromActivity()
95 assertEquals(R.drawable.start, itemInfo.icon); in testFromActivity()
105 com.android.internal.R.drawable.sym_def_app_icon); in testDelegatedSystemDefault()
118 Drawable expectedIcon = mContext.getDrawable(R.drawable.size_48x48); in testDelegatedFromAppInfo()
130 Drawable expectedIcon = mContext.getDrawable(R.drawable.start); in testDelegatedFromActivity()
134 assertEquals(R.drawable.start, itemInfo.icon); in testDelegatedFromActivity()
175 private Bitmap drawableToBitmap(Drawable drawable) { in drawableToBitmap() argument
[all …]
/cts/tests/tests/graphics/src/android/graphics/cts/
DImageDecoderTest.java43 import android.graphics.drawable.BitmapDrawable;
44 import android.graphics.drawable.Drawable;
45 import android.graphics.drawable.NinePatchDrawable;
98 new Record(R.drawable.baseline_jpeg, 1280, 960, "image/jpeg", sSRGB),
99 new Record(R.drawable.png_test, 640, 480, "image/png", sSRGB),
100 new Record(R.drawable.gif_test, 320, 240, "image/gif", sSRGB),
101 new Record(R.drawable.bmp_test, 320, 240, "image/bmp", sSRGB),
102 new Record(R.drawable.webp_test, 640, 480, "image/webp", sSRGB),
103 new Record(R.drawable.google_chrome, 256, 256, "image/x-ico", sSRGB),
104 new Record(R.drawable.color_wheel, 128, 128, "image/x-ico", sSRGB),
[all …]
DBitmapFactoryTest.java73 R.drawable.baseline_jpeg, R.drawable.png_test, R.drawable.gif_test,
74 R.drawable.bmp_test, R.drawable.webp_test
132 Bitmap b = BitmapFactory.decodeResource(mRes, R.drawable.start, in testDecodeResource1()
139 assertNull(BitmapFactory.decodeResource(mRes, R.drawable.start, mOpt2)); in testDecodeResource1()
144 Bitmap b = BitmapFactory.decodeResource(mRes, R.drawable.start); in testDecodeResource2()
228 InputStream iStreamPng = obtainInputStream(R.drawable.png_test); in testDecodeStream4()
235 InputStream iStreamWebp1 = obtainInputStream(R.drawable.webp_test); in testDecodeStream4()
263 InputStream iStreamPng = obtainInputStream(R.drawable.google_logo_1); in testDecodeStream5()
271 InputStream iStreamWebP1 = obtainInputStream(R.drawable.google_logo_2); in testDecodeStream5()
389 Bitmap start = BitmapFactory.decodeResource(mRes, R.drawable.start, options); in testDecodeReuseBasic()
[all …]
/cts/hostsidetests/shortcuts/deviceside/upgrade/src/android/content/pm/cts/shortcut/upgrade/
DShortcutManagerPostUpgradeTest.java21 import android.graphics.drawable.Icon;
30 Log.i(Consts.TAG, "Post: ResIDs=" + R.drawable.black_32x32 + ", " + R.drawable.black_64x64); in testPostUpgrade()
40 R.drawable.black_32x32 != in testPostUpgrade()
45 R.drawable.black_64x64 != in testPostUpgrade()
50 final Icon icon1 = Icon.createWithResource(getContext(), R.drawable.black_32x32); in testPostUpgrade()
51 final Icon icon2 = Icon.createWithResource(getContext(), R.drawable.black_64x64); in testPostUpgrade()

12345678910>>...13