Home
last modified time | relevance | path

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

12345678910>>...16

/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DAnimatedImageDrawableTest.java17 package android.graphics.drawable.cts;
40 import android.graphics.drawable.AnimatedImageDrawable;
41 import android.graphics.drawable.Drawable;
73 private static final int RES_ID = R.drawable.animated;
107 AnimatedImageDrawable aid1 = (AnimatedImageDrawable) res.getDrawable(R.drawable.animated); in testMutate()
108 AnimatedImageDrawable aid2 = (AnimatedImageDrawable) res.getDrawable(R.drawable.animated); in testMutate()
119 res.getDrawable(R.drawable.animated).setAlpha(originalAlpha); in testMutate()
127 Drawable drawable = ImageDecoder.decodeDrawable(source); in createFromImageDecoder() local
128 assertTrue(drawable instanceof AnimatedImageDrawable); in createFromImageDecoder()
129 return (AnimatedImageDrawable) drawable; in createFromImageDecoder()
[all …]
DVectorDrawableTest.java17 package android.graphics.drawable.cts;
36 import android.graphics.drawable.Drawable.ConstantState;
37 import android.graphics.drawable.VectorDrawable;
63 R.drawable.vector_icon_create,
64 R.drawable.vector_icon_delete,
65 R.drawable.vector_icon_heart,
66 R.drawable.vector_icon_schedule,
67 R.drawable.vector_icon_settings,
68 R.drawable.vector_icon_random_path_1,
69 R.drawable.vector_icon_random_path_2,
[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;
65 RippleDrawable drawable = in testAccessRadius() local
67 assertEquals(RippleDrawable.RADIUS_AUTO, drawable.getRadius()); in testAccessRadius()
68 drawable.setRadius(10); in testAccessRadius()
69 assertEquals(10, drawable.getRadius()); in testAccessRadius()
74 RippleDrawable drawable = in testRadiusAttr() local
75 (RippleDrawable) mContext.getDrawable(R.drawable.rippledrawable_radius); in testRadiusAttr()
[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 …]
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 …]
DGradientDrawableTest.java17 package android.graphics.drawable.cts;
40 import android.graphics.drawable.Drawable.ConstantState;
41 import android.graphics.drawable.GradientDrawable;
42 import android.graphics.drawable.GradientDrawable.Orientation;
431 XmlPullParser parser = mResources.getXml(R.drawable.gradientdrawable); in testInflate()
467 GradientDrawable drawable = new GradientDrawable(); in testGradientPadding() local
468 drawable.setPadding(1, 2, 3, 4); in testGradientPadding()
471 drawable.getPadding(padding); in testGradientPadding()
481 GradientDrawable drawable = new GradientDrawable(); in testGradientThickness() local
484 drawable.setThickness(thickness); in testGradientThickness()
[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 …]
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()
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 …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DAnimatedImageDrawableTest.kt32 import android.graphics.drawable.Drawable in <lambda>()
85 class Client(val drawable: Drawable) : CanvasClient { in <lambda>() constant in android.uirendering.cts.testclasses.AnimatedImageDrawableTest.internalTestBoundsAndListener.Client
88 resizer(drawable, width, height) in <lambda>()
89 drawable.draw(canvas) in <lambda>()
106 drawable, width, height -> in <lambda>() method
107 drawable.setBounds(1, 1, width - 1, height - 1) in <lambda>()
112 drawable, width, height -> in <lambda>() method
113 drawable.setBounds(width / 2, height / 2, width, height) in <lambda>()
118 drawable, width, height -> in <lambda>() method
119 drawable.isAutoMirrored = true in <lambda>()
[all …]
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()
110 R.drawable.extrabold1); in testMediumBoldFont()
117 R.drawable.mediumitalic1); in testMediumItalicFont()
124 R.drawable.extrabolditalic1); in testMediumBoldItalicFont()
131 R.drawable.light1); in testLightFont()
139 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/
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,
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;
267 Icon icon = Icon.createWithResource(mActivity, R.drawable.testimage); in testSetImageIcon()
271 Drawable drawable = mActivity.getDrawable(R.drawable.testimage); in testSetImageIcon() local
272 BitmapDrawable testimageBitmap = (BitmapDrawable) drawable; in testSetImageIcon()
284 mImageViewRegular.setImageResource(R.drawable.testimage); in testSetImageResource()
287 Drawable drawable = mActivity.getDrawable(R.drawable.testimage); in testSetImageResource() local
[all …]
DCompoundButtonTest.java43 import android.graphics.drawable.ColorDrawable;
44 import android.graphics.drawable.Drawable;
45 import android.graphics.drawable.GradientDrawable;
46 import android.graphics.drawable.Icon;
202 Drawable drawable = mActivity.getDrawable(R.drawable.statelistdrawable); in testDrawableStateChanged() local
203 compoundButton.setButtonDrawable(drawable); in testDrawableStateChanged()
204 drawable.setState(null); in testDrawableStateChanged()
205 assertNull(drawable.getState()); in testDrawableStateChanged()
208 assertNotNull(drawable.getState()); in testDrawableStateChanged()
209 assertSame(compoundButton.getDrawableState(), drawable.getState()); in testDrawableStateChanged()
[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 …]
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 …]
/cts/tests/tests/notificationlegacy/notificationlegacy30/src/android/app/notification/legacy30/cts/
DNotificationTemplateApi30Test.kt35 .setSmallIcon(R.drawable.ic_media_play) in <lambda>()
48 .setSmallIcon(R.drawable.ic_media_play) in <lambda>()
62 .setSmallIcon(R.drawable.ic_media_play) in <lambda>()
76 .setSmallIcon(R.drawable.ic_media_play) in <lambda>()
90 .setSmallIcon(R.drawable.ic_media_play) in <lambda>()
102 assertThat(iconView.drawable.intrinsicWidth).isEqualTo(40) in <lambda>()
103 assertThat(iconView.drawable.intrinsicHeight).isEqualTo(30) in <lambda>()
115 .setSmallIcon(R.drawable.ic_media_play) in <lambda>()
128 assertThat(iconView.drawable.intrinsicWidth).isEqualTo(40) in <lambda>()
129 assertThat(iconView.drawable.intrinsicHeight).isEqualTo(30) in <lambda>()
[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 …]
DIncomingCallTestActivity.java83 mStep1Status.setImageResource(R.drawable.fs_error); in onCreate()
98 mStep1Status.setImageResource(R.drawable.fs_good); in onCreate()
102 mStep1Status.setImageResource(R.drawable.fs_error); in onCreate()
121 mStep2Status.setImageResource(R.drawable.fs_error); in onCreate()
126 mStep2Status.setImageResource(R.drawable.fs_good); in onCreate()
137 mStep3Status.setImageResource(R.drawable.fs_good); in onCreate()
140 mStep3Status.setImageResource(R.drawable.fs_error); in onCreate()
148 mStep1Status.setImageResource(R.drawable.fs_indeterminate); in onCreate()
149 mStep2Status.setImageResource(R.drawable.fs_indeterminate); in onCreate()
150 mStep3Status.setImageResource(R.drawable.fs_indeterminate); in onCreate()
/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/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()
DShortcutManagerPreUpgradeTest.java23 import android.graphics.drawable.Icon;
33 Log.i(Consts.TAG, "Pre: ResIDs=" + R.drawable.black_32x32 + ", " + R.drawable.black_64x64); in testPreUpgrade()
36 final Icon icon1 = Icon.createWithResource(getContext(), R.drawable.black_32x32); in testPreUpgrade()
37 final Icon icon2 = Icon.createWithResource(getContext(), R.drawable.black_64x64); in testPreUpgrade()
41 b1.putInt(Consts.EXTRA_ICON_RES_ID, R.drawable.black_32x32); in testPreUpgrade()
50 b2.putInt(Consts.EXTRA_ICON_RES_ID, R.drawable.black_64x64); in testPreUpgrade()
/cts/tests/app/src/android/app/cts/
DNotificationTemplateTest.kt27 import android.graphics.drawable.Icon in <lambda>()
43 .setSmallIcon(R.drawable.ic_media_play) in <lambda>()
58 .setSmallIcon(R.drawable.ic_media_play) in <lambda>()
74 .setSmallIcon(R.drawable.ic_media_play) in <lambda>()
89 .setSmallIcon(R.drawable.ic_media_play) in <lambda>()
102 .setSmallIcon(R.drawable.ic_media_play) in <lambda>()
117 .setSmallIcon(R.drawable.ic_media_play) in <lambda>()
132 .setSmallIcon(R.drawable.ic_media_play) in <lambda>()
146 .setSmallIcon(R.drawable.ic_media_play) in <lambda>()
163 .setSmallIcon(R.drawable.ic_media_play) in <lambda>()
[all …]

12345678910>>...16