Home
last modified time | relevance | path

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

1234567891011

/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DVectorDrawableTest.java17 package android.graphics.drawable.cts;
34 import android.graphics.drawable.Drawable.ConstantState;
35 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 …]
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;
30 import android.graphics.drawable.BitmapDrawable;
31 import android.graphics.drawable.ColorDrawable;
32 import android.graphics.drawable.GradientDrawable;
33 import android.graphics.drawable.LayerDrawable;
34 import android.graphics.drawable.NinePatchDrawable;
35 import android.graphics.drawable.RippleDrawable;
68 BitmapDrawable d = (BitmapDrawable) mContext.getDrawable(R.drawable.bitmapdrawable_theme); in testBitmapDrawable()
87 ColorDrawable d = (ColorDrawable) mContext.getDrawable(R.drawable.colordrawable_theme); in testColorDrawable()
95 R.drawable.gradientdrawable_theme); in testGradientDrawable()
[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;
63 RippleDrawable drawable = in testAccessRadius() local
65 assertEquals(RippleDrawable.RADIUS_AUTO, drawable.getRadius()); in testAccessRadius()
66 drawable.setRadius(10); in testAccessRadius()
67 assertEquals(10, drawable.getRadius()); in testAccessRadius()
72 RippleDrawable drawable = in testRadiusAttr() local
73 (RippleDrawable) mContext.getDrawable(R.drawable.rippledrawable_radius); in testRadiusAttr()
[all …]
DVectorDrawableSizeTest.java17 package android.graphics.drawable.cts;
24 import android.graphics.drawable.VectorDrawable;
47 {"size_1", R.drawable.vector_icon_size_1, 7}, in data()
48 {"size_2", R.drawable.vector_icon_size_2, 9} in data()
70 VectorDrawable drawable = (VectorDrawable) mResources.getDrawable(mResId, null); in testVectorDrawableSize() local
71 assertEquals(Math.round(mDpSize * densityDpi / 160f), drawable.getIntrinsicWidth()); in testVectorDrawableSize()
72 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;
69 mRotateDrawable = (RotateDrawable) mResources.getDrawable(R.drawable.rotatedrawable); in setup()
87 d = (RotateDrawable) mResources.getDrawable(R.drawable.rotatedrawable_rel); in testInflate()
95 d = (RotateDrawable) mResources.getDrawable(R.drawable.rotatedrawable_abs); in testInflate()
178 Drawable drawable = mResources.getDrawable(R.drawable.pass); in testInvalidateDrawable() local
[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;
79 imageView.setBackgroundResource(R.drawable.animationdrawable); in setup()
167 Drawable frame = mResources.getDrawable(R.drawable.failed); in testGetNumberOfFrames()
186 Drawable drawable = mResources.getDrawable(R.drawable.testimage); in testGetFrame() local
187 assertEquals(drawable.getIntrinsicWidth(), frame.getIntrinsicWidth()); in testGetFrame()
188 assertEquals(drawable.getIntrinsicHeight(), frame.getIntrinsicHeight()); in testGetFrame()
191 drawable = mResources.getDrawable(R.drawable.pass); in testGetFrame()
[all …]
DCustomAnimationScaleListDrawableTest.java17 package android.graphics.drawable.cts;
22 import android.graphics.drawable.Animatable;
23 import android.graphics.drawable.Drawable;
24 import android.graphics.drawable.DrawableContainer;
46 private static final int DRAWABLE_ID = R.drawable.custom_animation_scale_list_drawable;
DInsetDrawableTest.java17 package android.graphics.drawable.cts;
36 import android.graphics.drawable.Drawable;
37 import android.graphics.drawable.BitmapDrawable;
38 import android.graphics.drawable.Drawable.ConstantState;
39 import android.graphics.drawable.InsetDrawable;
67 mPassDrawable = mContext.getDrawable(R.drawable.pass); in setup()
273 mPassDrawable = mContext.getDrawable(R.drawable.statelistdrawable); in testOnStateChange()
365 mPassDrawable = mContext.getDrawable(R.drawable.scenery); in testGetIntrinsicWidth()
371 mPassDrawable = mContext.getDrawable(R.drawable.scenery); in testGetIntrinsicWidth()
377 mPassDrawable = mContext.getDrawable(R.drawable.inset_color); in testGetIntrinsicWidth()
[all …]
DNinePatchDrawableTest.java17 package android.graphics.drawable.cts;
44 import android.graphics.drawable.Drawable;
45 import android.graphics.drawable.Drawable.ConstantState;
46 import android.graphics.drawable.NinePatchDrawable;
87 mNinePatchDrawable = getNinePatchDrawable(R.drawable.ninepatch_0); in setup()
98 Bitmap bmp = BitmapFactory.decodeResource(mResources, R.drawable.ninepatch_0); in testConstructors()
99 String name = mResources.getResourceName(R.drawable.ninepatch_0); in testConstructors()
174 NinePatchDrawable npd = (NinePatchDrawable) mResources.getDrawable(R.drawable.ninepatch_0); in testGetPadding()
182 npd = (NinePatchDrawable) mResources.getDrawable(R.drawable.ninepatch_1); in testGetPadding()
269 Bitmap bmp = getBitmapUnscaled(R.drawable.ninepatch_0); in testGetIntrinsicWidth()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DFontRenderingTests.java74 R.drawable.hello1); in testDefaultFont()
81 R.drawable.bold1); in testBoldFont()
88 R.drawable.italic1); in testItalicFont()
95 R.drawable.bolditalic1); in testBoldItalicFont()
102 R.drawable.medium1); in testMediumFont()
110 R.drawable.black1); in testMediumBoldFont()
117 R.drawable.mediumitalic1); in testMediumItalicFont()
124 R.drawable.blackitalic1); in testMediumBoldItalicFont()
131 R.drawable.light1); in testLightFont()
139 R.drawable.medium1); in testLightBoldFont()
[all …]
DHardwareBitmapTests.java30 import android.graphics.drawable.Drawable;
31 import android.graphics.drawable.NinePatchDrawable;
75 Bitmap hardwareBitmap = BitmapFactory.decodeResource(mRes, R.drawable.robot, in testDecodeResource()
79 R.drawable.golden_robot, new MSSIMComparer(0.95))); in testDecodeResource()
84 InputStream inputStream = mRes.openRawResource(R.drawable.robot); in testBitmapRegionDecode()
91 R.drawable.golden_headless_robot, new MSSIMComparer(0.95))); in testBitmapRegionDecode()
96 testBitmapCopy(R.drawable.robot, Bitmap.Config.RGB_565, Bitmap.Config.HARDWARE); in testBitmapConfigFromRGB565()
101 testBitmapCopy(R.drawable.robot, Bitmap.Config.ARGB_8888, Bitmap.Config.HARDWARE); in testBitmapConfigFromARGB8888()
113 testBitmapCopy(R.drawable.index_8, null, Bitmap.Config.HARDWARE); in testBitmapConfigFromIndex8()
118 testBitmapCopy(R.drawable.robot, Bitmap.Config.HARDWARE, Bitmap.Config.HARDWARE); in testBitmapConfigFromHardwareToHardware()
[all …]
/cts/tests/tests/widget/src/android/widget/cts/
DImageViewTest.java46 import android.graphics.drawable.BitmapDrawable;
47 import android.graphics.drawable.ColorDrawable;
48 import android.graphics.drawable.Drawable;
49 import android.graphics.drawable.Icon;
50 import android.graphics.drawable.PaintDrawable;
202 Icon icon = Icon.createWithResource(mActivity, R.drawable.testimage); in testSetImageIcon()
206 Drawable drawable = mActivity.getDrawable(R.drawable.testimage); in testSetImageIcon() local
207 BitmapDrawable testimageBitmap = (BitmapDrawable) drawable; in testSetImageIcon()
219 mImageViewRegular.setImageResource(R.drawable.testimage); in testSetImageResource()
222 Drawable drawable = mActivity.getDrawable(R.drawable.testimage); in testSetImageResource() local
[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,
DCompoundButtonTest.java42 import android.graphics.drawable.ColorDrawable;
43 import android.graphics.drawable.Drawable;
198 Drawable drawable = mActivity.getDrawable(R.drawable.statelistdrawable); in testDrawableStateChanged() local
199 compoundButton.setButtonDrawable(drawable); in testDrawableStateChanged()
200 drawable.setState(null); in testDrawableStateChanged()
201 assertNull(drawable.getState()); in testDrawableStateChanged()
204 assertNotNull(drawable.getState()); in testDrawableStateChanged()
205 assertSame(compoundButton.getDrawableState(), drawable.getState()); in testDrawableStateChanged()
217 Drawable firstDrawable = mActivity.getDrawable(R.drawable.scenery); in testSetButtonDrawableByDrawable()
227 Drawable secondDrawable = mActivity.getDrawable(R.drawable.pass); in testSetButtonDrawableByDrawable()
[all …]
DImageSwitcherTest.java28 import android.graphics.drawable.BitmapDrawable;
29 import android.graphics.drawable.Drawable;
94 mImageSwitcher.setImageResource(R.drawable.scenery); in testSetImageResource()
97 Drawable drawable = resources.getDrawable(R.drawable.scenery); in testSetImageResource() local
98 BitmapDrawable sceneryBitmap = (BitmapDrawable) drawable; in testSetImageResource()
103 mImageSwitcher.setImageResource(R.drawable.testimage); in testSetImageResource()
105 drawable = resources.getDrawable(R.drawable.testimage); in testSetImageResource()
106 BitmapDrawable testimageBitmap = (BitmapDrawable) drawable; in testSetImageResource()
168 Drawable drawable = resources.getDrawable(R.drawable.scenery); in testSetImageDrawable() local
169 mImageSwitcher.setImageDrawable(drawable); in testSetImageDrawable()
[all …]
DToggleButtonTest.java28 import android.graphics.drawable.Drawable;
29 import android.graphics.drawable.StateListDrawable;
129 final StateListDrawable drawable = new StateListDrawable(); in testDrawableStateChanged() local
130 drawable.addState(new int[] { android.R.attr.state_pressed }, in testDrawableStateChanged()
131 mActivity.getDrawable(R.drawable.scenery)); in testDrawableStateChanged()
132 drawable.addState(new int[] {}, in testDrawableStateChanged()
133 mActivity.getDrawable(R.drawable.scenery)); in testDrawableStateChanged()
136 toggleButton.setButtonDrawable(drawable); in testDrawableStateChanged()
137 drawable.setState(null); in testDrawableStateChanged()
138 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/tests/tests/text/src/android/text/style/cts/
DImageSpanTest.java25 import android.graphics.drawable.BitmapDrawable;
26 import android.graphics.drawable.Drawable;
66 Drawable d = mContext.getResources().getDrawable(R.drawable.pass); in testConstructor()
81 new ImageSpan(mContext, R.drawable.pass); in testConstructor()
82 new ImageSpan(mContext, R.drawable.pass, DynamicDrawableSpan.ALIGN_BOTTOM); in testConstructor()
83 new ImageSpan(mContext, R.drawable.pass, DynamicDrawableSpan.ALIGN_BASELINE); in testConstructor()
97 Drawable d = mContext.getDrawable(R.drawable.pass); in testGetSource()
113 Drawable drawable = mContext.getDrawable(R.drawable.pass); in testGetDrawable() local
115 ImageSpan imageSpan = new ImageSpan(drawable); in testGetDrawable()
116 assertSame(drawable, imageSpan.getDrawable()); in testGetDrawable()
[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/apps/CtsVerifier/src/com/android/cts/verifier/telecom/
DSelfManagedIncomingCallTestActivity.java77 mStep1Status.setImageResource(R.drawable.fs_good); in onCreate()
79 mStep1Status.setImageResource(R.drawable.fs_error); in onCreate()
96 mStep2Status.setImageResource(R.drawable.fs_error); in onCreate()
105 mStep2Status.setImageResource(R.drawable.fs_error); in onCreate()
111 mStep2Status.setImageResource(R.drawable.fs_error); in onCreate()
137 mStep2Status.setImageResource(R.drawable.fs_good); in onCreate()
141 mStep2Status.setImageResource(R.drawable.fs_error); in onCreate()
154 mStep3Status.setImageResource(R.drawable.fs_error); in onCreate()
159 mStep3Status.setImageResource(R.drawable.fs_error); in onCreate()
167 mStep3Status.setImageResource(R.drawable.fs_good); in onCreate()
[all …]
DIncomingCallTestActivity.java80 mStep1Status.setImageResource(R.drawable.fs_error); in onCreate()
94 mStep1Status.setImageResource(R.drawable.fs_good); in onCreate()
97 mStep1Status.setImageResource(R.drawable.fs_error); in onCreate()
115 mStep2Status.setImageResource(R.drawable.fs_error); in onCreate()
119 mStep2Status.setImageResource(R.drawable.fs_good); in onCreate()
129 mStep3Status.setImageResource(R.drawable.fs_good); in onCreate()
131 mStep3Status.setImageResource(R.drawable.fs_error); in onCreate()
139 mStep1Status.setImageResource(R.drawable.fs_indeterminate); in onCreate()
140 mStep2Status.setImageResource(R.drawable.fs_indeterminate); in onCreate()
141 mStep3Status.setImageResource(R.drawable.fs_indeterminate); in onCreate()
DOutgoingCallTestActivity.java77 mStep1Status.setImageResource(R.drawable.fs_error); in onCreate()
93 mStep1Status.setImageResource(R.drawable.fs_good); in onCreate()
96 mStep1Status.setImageResource(R.drawable.fs_error); in onCreate()
109 mStep2Status.setImageResource(R.drawable.fs_good); in onCreate()
118 mStep3Status.setImageResource(R.drawable.fs_good); in onCreate()
120 mStep3Status.setImageResource(R.drawable.fs_error); in onCreate()
128 mStep1Status.setImageResource(R.drawable.fs_indeterminate); in onCreate()
129 mStep2Status.setImageResource(R.drawable.fs_indeterminate); in onCreate()
130 mStep3Status.setImageResource(R.drawable.fs_indeterminate); in onCreate()
/cts/tests/tests/graphics/src/android/graphics/cts/
DBitmapFactoryTest.java69 R.drawable.baseline_jpeg, R.drawable.png_test, R.drawable.gif_test,
70 R.drawable.bmp_test, R.drawable.webp_test
128 Bitmap b = BitmapFactory.decodeResource(mRes, R.drawable.start, in testDecodeResource1()
135 assertNull(BitmapFactory.decodeResource(mRes, R.drawable.start, mOpt2)); in testDecodeResource1()
140 Bitmap b = BitmapFactory.decodeResource(mRes, R.drawable.start); in testDecodeResource2()
224 InputStream iStreamPng = obtainInputStream(R.drawable.png_test); in testDecodeStream4()
231 InputStream iStreamWebp1 = obtainInputStream(R.drawable.webp_test); in testDecodeStream4()
259 InputStream iStreamPng = obtainInputStream(R.drawable.google_logo_1); in testDecodeStream5()
267 InputStream iStreamWebP1 = obtainInputStream(R.drawable.google_logo_2); in testDecodeStream5()
385 Bitmap start = BitmapFactory.decodeResource(mRes, R.drawable.start, options); in testDecodeReuseBasic()
[all …]

1234567891011