Home
last modified time | relevance | path

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

12345678910>>...19

/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DAnimatedImageDrawableTest.java17 package android.graphics.drawable.cts;
41 import android.graphics.drawable.AnimatedImageDrawable;
42 import android.graphics.drawable.Drawable;
75 private static final int RES_ID = R.drawable.animated;
115 AnimatedImageDrawable aid1 = (AnimatedImageDrawable) res.getDrawable(R.drawable.animated); in testMutate()
116 AnimatedImageDrawable aid2 = (AnimatedImageDrawable) res.getDrawable(R.drawable.animated); in testMutate()
127 res.getDrawable(R.drawable.animated).setAlpha(originalAlpha); in testMutate()
135 Drawable drawable = ImageDecoder.decodeDrawable(source); in createFromImageDecoder() local
136 assertTrue(drawable instanceof AnimatedImageDrawable); in createFromImageDecoder()
137 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;
32 import android.graphics.drawable.Drawable;
33 import android.graphics.drawable.Drawable.ConstantState;
34 import android.graphics.drawable.RippleDrawable;
66 RippleDrawable drawable = in testAccessRadius() local
68 assertEquals(RippleDrawable.RADIUS_AUTO, drawable.getRadius()); in testAccessRadius()
69 drawable.setRadius(10); in testAccessRadius()
70 assertEquals(10, drawable.getRadius()); in testAccessRadius()
75 RippleDrawable drawable = in testRadiusAttr() local
76 (RippleDrawable) mContext.getDrawable(R.drawable.rippledrawable_radius); in testRadiusAttr()
[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 …]
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 …]
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 …]
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()
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 …]
DAnimationDrawableTest.java17 package android.graphics.drawable.cts;
33 import android.graphics.drawable.AnimationDrawable;
34 import android.graphics.drawable.Drawable;
35 import android.graphics.drawable.DrawableContainer.DrawableContainerState;
93 imageView.setBackgroundResource(R.drawable.animationdrawable); in setup()
192 Drawable frame = mResources.getDrawable(R.drawable.failed); in testGetNumberOfFrames()
211 Drawable drawable = mResources.getDrawable(R.drawable.testimage); in testGetFrame() local
212 assertEquals(drawable.getIntrinsicWidth(), frame.getIntrinsicWidth()); in testGetFrame()
213 assertEquals(drawable.getIntrinsicHeight(), frame.getIntrinsicHeight()); in testGetFrame()
216 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.java86 R.drawable.hello1); in testDefaultFont()
93 R.drawable.bold1); in testBoldFont()
100 R.drawable.italic1); in testItalicFont()
107 R.drawable.bolditalic1); in testBoldItalicFont()
114 R.drawable.medium1); in testMediumFont()
121 R.drawable.extrabold1); in testMediumBoldFont()
128 R.drawable.mediumitalic1); in testMediumItalicFont()
135 R.drawable.extrabolditalic1); in testMediumBoldItalicFont()
142 R.drawable.light1); in testLightFont()
150 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/devicepolicy/src/android/devicepolicy/cts/
DDevicePolicyResourcesTest.java32 import android.graphics.drawable.Drawable;
33 import android.graphics.drawable.Icon;
103 UPDATABLE_DRAWABLE_ID_1, DRAWABLE_STYLE_1, R.drawable.test_drawable_1))); in setDrawables_withoutRequiredPermission_throwsSecurityException()
111 UPDATABLE_DRAWABLE_ID_1, DRAWABLE_STYLE_1, R.drawable.test_drawable_1)); in setDrawables_withRequiredPermission_doesNotThrowSecurityException()
119 UPDATABLE_DRAWABLE_ID_1, DRAWABLE_STYLE_1, R.drawable.test_drawable_1)); in setDrawables_updatesCorrectUpdatableDrawable()
121 Drawable drawable = sDpm.getResources().getDrawable( in setDrawables_updatesCorrectUpdatableDrawable() local
125 assertThat(areSameDrawables(drawable, sContext.getDrawable(R.drawable.test_drawable_1))) in setDrawables_updatesCorrectUpdatableDrawable()
134 UPDATABLE_DRAWABLE_ID_1, DRAWABLE_STYLE_1, R.drawable.test_drawable_1)); in setDrawables_updatesCurrentlyUpdatedDrawable()
137 UPDATABLE_DRAWABLE_ID_1, DRAWABLE_STYLE_1, R.drawable.test_drawable_2)); in setDrawables_updatesCurrentlyUpdatedDrawable()
139 Drawable drawable = sDpm.getResources().getDrawable( in setDrawables_updatesCurrentlyUpdatedDrawable() local
[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.java56 import android.graphics.drawable.BitmapDrawable;
57 import android.graphics.drawable.ColorDrawable;
58 import android.graphics.drawable.Drawable;
59 import android.graphics.drawable.Icon;
60 import android.graphics.drawable.PaintDrawable;
275 Icon icon = Icon.createWithResource(mActivity, R.drawable.testimage); in testSetImageIcon()
279 Drawable drawable = mActivity.getDrawable(R.drawable.testimage); in testSetImageIcon() local
280 BitmapDrawable testimageBitmap = (BitmapDrawable) drawable; in testSetImageIcon()
292 mImageViewRegular.setImageResource(R.drawable.testimage); in testSetImageResource()
295 Drawable drawable = mActivity.getDrawable(R.drawable.testimage); in testSetImageResource() local
[all …]
DCompoundButtonTest.java44 import android.graphics.drawable.ColorDrawable;
45 import android.graphics.drawable.Drawable;
46 import android.graphics.drawable.GradientDrawable;
47 import android.graphics.drawable.Icon;
211 Drawable drawable = mActivity.getDrawable(R.drawable.statelistdrawable); in testDrawableStateChanged() local
212 compoundButton.setButtonDrawable(drawable); in testDrawableStateChanged()
213 drawable.setState(null); in testDrawableStateChanged()
214 assertNull(drawable.getState()); in testDrawableStateChanged()
217 assertNotNull(drawable.getState()); in testDrawableStateChanged()
218 assertSame(compoundButton.getDrawableState(), drawable.getState()); in testDrawableStateChanged()
[all …]
DImageSwitcherTest.java29 import android.graphics.drawable.BitmapDrawable;
30 import android.graphics.drawable.Drawable;
103 mImageSwitcher.setImageResource(R.drawable.scenery); in testSetImageResource()
106 Drawable drawable = resources.getDrawable(R.drawable.scenery); in testSetImageResource() local
107 BitmapDrawable sceneryBitmap = (BitmapDrawable) drawable; in testSetImageResource()
112 mImageSwitcher.setImageResource(R.drawable.testimage); in testSetImageResource()
114 drawable = resources.getDrawable(R.drawable.testimage); in testSetImageResource()
115 BitmapDrawable testimageBitmap = (BitmapDrawable) drawable; in testSetImageResource()
177 Drawable drawable = resources.getDrawable(R.drawable.scenery); in testSetImageDrawable() local
178 mImageSwitcher.setImageDrawable(drawable); in testSetImageDrawable()
[all …]
DToggleButtonTest.java29 import android.graphics.drawable.Drawable;
30 import android.graphics.drawable.StateListDrawable;
139 final StateListDrawable drawable = new StateListDrawable(); in testDrawableStateChanged() local
140 drawable.addState(new int[] { android.R.attr.state_pressed }, in testDrawableStateChanged()
141 mActivity.getDrawable(R.drawable.scenery)); in testDrawableStateChanged()
142 drawable.addState(new int[] {}, in testDrawableStateChanged()
143 mActivity.getDrawable(R.drawable.scenery)); in testDrawableStateChanged()
146 toggleButton.setButtonDrawable(drawable); in testDrawableStateChanged()
147 drawable.setState(null); in testDrawableStateChanged()
148 assertNull(drawable.getState()); in testDrawableStateChanged()
[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/apps/CtsVerifier/src/com/android/cts/verifier/telecom/
DTelecomDefaultDialerTestActivity.java88 mStep1Status.setImageResource(R.drawable.fs_indeterminate); in onCreate()
89 mStep2Status.setImageResource(R.drawable.fs_indeterminate); in onCreate()
90 mStep3Status.setImageResource(R.drawable.fs_indeterminate); in onCreate()
91 mStep3Status.setImageResource(R.drawable.fs_indeterminate); in onCreate()
99 mStep1Status.setImageResource(R.drawable.fs_good); in onCreate()
109 mStep2Status.setImageResource(R.drawable.fs_good); in onCreate()
128 mStep1Status.setImageResource(R.drawable.fs_good); in onActivityResult()
130 mStep1Status.setImageResource(R.drawable.fs_error); in onActivityResult()
135 mStep2Status.setImageResource(R.drawable.fs_good); in onActivityResult()
137 mStep2Status.setImageResource(R.drawable.fs_error); in onActivityResult()
[all …]
DCallSwitchingAudioTestActivity.java83 mStep4Status.setImageResource(R.drawable.fs_good);
129 mStep1Status.setImageResource(R.drawable.fs_indeterminate); in initAllUiComponents()
130 mStep2Status.setImageResource(R.drawable.fs_indeterminate); in initAllUiComponents()
131 mStep3Status.setImageResource(R.drawable.fs_indeterminate); in initAllUiComponents()
132 mStep4Status.setImageResource(R.drawable.fs_indeterminate); in initAllUiComponents()
133 mStep6Status.setImageResource(R.drawable.fs_indeterminate); in initAllUiComponents()
153 mStep1Status.setImageResource(R.drawable.fs_good); in defineTestButtonActions()
158 mStep1Status.setImageResource(R.drawable.fs_error); in defineTestButtonActions()
180 mStep3Status.setImageResource(R.drawable.fs_good); in defineTestButtonActions()
182 mStep3Status.setImageResource(R.drawable.fs_error); in defineTestButtonActions()
[all …]
/cts/tests/tests/content/src/android/content/pm/cts/
DPackageItemInfoIconTest.java28 import android.graphics.drawable.Drawable;
64 com.android.internal.R.drawable.sym_def_app_icon); 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()
101 assertThat(itemInfo.icon).isEqualTo(R.drawable.start); in testFromActivity()
112 com.android.internal.R.drawable.sym_def_app_icon); 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()
[all …]
/cts/tests/app/WallpaperTest/src/android/app/cts/wallpapers/util/
DWallpaperTestUtils.java22 import android.graphics.drawable.BitmapDrawable;
23 import android.graphics.drawable.Drawable;
34 public static Bitmap getBitmap(Drawable drawable) { in getBitmap() argument
35 if (drawable == null) return null; in getBitmap()
36 if (drawable instanceof BitmapDrawable) { in getBitmap()
37 return ((BitmapDrawable) drawable).getBitmap(); in getBitmap()
40 int width = Math.max(1, drawable.getIntrinsicWidth()); in getBitmap()
41 int height = Math.max(1, drawable.getIntrinsicHeight()); in getBitmap()
45 drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight()); in getBitmap()
46 drawable.draw(canvas); in getBitmap()
/cts/hostsidetests/shortcuts/deviceside/upgrade/src/android/content/pm/cts/shortcut/upgrade/
DShortcutManagerPostUpgradeTest.java21 import android.graphics.drawable.Icon;
31 Log.i(Consts.TAG, "Post: ResIDs=" + R.drawable.black_32x32 + ", " + R.drawable.black_64x64); in testPostUpgrade()
41 R.drawable.black_32x32 != in testPostUpgrade()
46 R.drawable.black_64x64 != in testPostUpgrade()
51 final Icon icon1 = Icon.createWithResource(getContext(), R.drawable.black_32x32); in testPostUpgrade()
52 final Icon icon2 = Icon.createWithResource(getContext(), R.drawable.black_64x64); in testPostUpgrade()
DShortcutManagerPreUpgradeTest.java23 import android.graphics.drawable.Icon;
34 Log.i(Consts.TAG, "Pre: ResIDs=" + R.drawable.black_32x32 + ", " + R.drawable.black_64x64); in testPreUpgrade()
37 final Icon icon1 = Icon.createWithResource(getContext(), R.drawable.black_32x32); in testPreUpgrade()
38 final Icon icon2 = Icon.createWithResource(getContext(), R.drawable.black_64x64); in testPreUpgrade()
42 b1.putInt(Consts.EXTRA_ICON_RES_ID, R.drawable.black_32x32); in testPreUpgrade()
51 b2.putInt(Consts.EXTRA_ICON_RES_ID, R.drawable.black_64x64); in testPreUpgrade()

12345678910>>...19