Home
last modified time | relevance | path

Searched refs:typedArray (Results 1 – 25 of 30) sorted by relevance

12

/external/robolectric/robolectric/src/test/java/org/robolectric/shadows/
DShadowTypedArrayTest.java44 TypedArray typedArray = context.obtainStyledAttributes( in getInt_withFlags_shouldReturnValue() local
49 assertThat(typedArray.getInt(0, -1)).isEqualTo(0x33); in getInt_withFlags_shouldReturnValue()
59 TypedArray typedArray = context.obtainStyledAttributes( in getResourceId_shouldReturnActualValue() local
64 assertThat(typedArray.getResourceId(0, -1)).isEqualTo(R.id.snippet_text); in getResourceId_shouldReturnActualValue()
75 TypedArray typedArray = context.obtainStyledAttributes( in getFraction_shouldReturnGivenValue() local
80 assertThat(typedArray.getFraction(0, 100, 1, -1)) in getFraction_shouldReturnGivenValue()
91 TypedArray typedArray = context.obtainStyledAttributes( in getDimension_shouldReturnGivenValue() local
96 assertThat(typedArray.getDimension(0, -1)).isEqualTo(50f); in getDimension_shouldReturnGivenValue()
101 TypedArray typedArray = context.obtainStyledAttributes( in getDrawable_withExplicitColorValue_shouldReturnColorDrawable() local
106 ColorDrawable drawable = (ColorDrawable) typedArray.getDrawable(0); in getDrawable_withExplicitColorValue_shouldReturnColorDrawable()
[all …]
DShadowResourcesTest.java145 TypedArray typedArray = in obtainStyledAttributes_shouldCheckXmlFirst_fromAttributeSetBuilder() local
153 assertThat(typedArray.getFloat(0, 0)).isEqualTo(12.0f); in obtainStyledAttributes_shouldCheckXmlFirst_fromAttributeSetBuilder()
154 assertThat(typedArray.getFloat(1, 0)).isEqualTo(24.0f); in obtainStyledAttributes_shouldCheckXmlFirst_fromAttributeSetBuilder()
155 typedArray.recycle(); in obtainStyledAttributes_shouldCheckXmlFirst_fromAttributeSetBuilder()
174 TypedArray typedArray = in obtainAttributes() local
180 assertThat(typedArray).isNotNull(); in obtainAttributes()
181 assertThat(typedArray.peekValue(0).resourceId).isEqualTo(R.xml.shortcuts); in obtainAttributes()
191 TypedArray typedArray = resources.obtainAttributes(attributeSet, new int[] {android.R.attr.id}); in obtainAttributes_shouldUseReferencedIdFromAttributeSet() local
192 assertThat(typedArray.getResourceId(0, -9)).isEqualTo(android.R.id.mask); in obtainAttributes_shouldUseReferencedIdFromAttributeSet()
203 TypedArray typedArray = in obtainAttributes_shouldReturnValuesFromAttributeSet() local
[all …]
DShadowAssetManagerTest.java134 TypedArray typedArray = in multiFormatAttributes_integerDecimalValue() local
137 typedArray.getValue(0, outValue); in multiFormatAttributes_integerDecimalValue()
146 TypedArray typedArray = in multiFormatAttributes_integerHexValue() local
149 typedArray.getValue(0, outValue); in multiFormatAttributes_integerHexValue()
158 TypedArray typedArray = in multiFormatAttributes_stringValue() local
161 typedArray.getValue(0, outValue); in multiFormatAttributes_stringValue()
170 TypedArray typedArray = in multiFormatAttributes_booleanValue() local
173 typedArray.getValue(0, outValue); in multiFormatAttributes_booleanValue()
DShadowThemeTest.java255 TypedArray typedArray = resources.newTheme().obtainStyledAttributes( in dimenRef() local
257 assertThat(typedArray.getDimensionPixelSize(0, -1)).isEqualTo(15); in dimenRef()
265 TypedArray typedArray = resources.newTheme().obtainStyledAttributes( in dimenRefRef() local
267 assertThat(typedArray.getDimensionPixelSize(0, -1)).isEqualTo(15); in dimenRefRef()
273 TypedArray typedArray = theme.obtainStyledAttributes(R.style.StyleA, new int[]{R.attr.string1}); in obtainStyledAttributes_shouldFindAttributeInDefaultStyle() local
274 assertThat(typedArray.getString(0)).isEqualTo("string 1 from style A"); in obtainStyledAttributes_shouldFindAttributeInDefaultStyle()
DShadowContextTest.java292 …TypedArray typedArray = context.obtainStyledAttributes(roboAttributeSet, new int[]{R.attr.quitKeyC… in obtainStyledAttributes_shouldExtractAttributesFromAttributeSet() local
293 assertThat(typedArray.getString(0)).isEqualTo("^q"); in obtainStyledAttributes_shouldExtractAttributesFromAttributeSet()
294 assertThat(typedArray.getInt(1, -1234)).isEqualTo(1 /* ungulate */); in obtainStyledAttributes_shouldExtractAttributesFromAttributeSet()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DShadowTypedArrayTest.java44 TypedArray typedArray = context.obtainStyledAttributes( in getInt_withFlags_shouldReturnValue() local
49 assertThat(typedArray.getInt(0, -1)).isEqualTo(0x33); in getInt_withFlags_shouldReturnValue()
59 TypedArray typedArray = context.obtainStyledAttributes( in getResourceId_shouldReturnActualValue() local
64 assertThat(typedArray.getResourceId(0, -1)).isEqualTo(R.id.snippet_text); in getResourceId_shouldReturnActualValue()
75 TypedArray typedArray = context.obtainStyledAttributes( in getFraction_shouldReturnGivenValue() local
80 assertThat(typedArray.getFraction(0, 100, 1, -1)) in getFraction_shouldReturnGivenValue()
91 TypedArray typedArray = context.obtainStyledAttributes( in getDimension_shouldReturnGivenValue() local
96 assertThat(typedArray.getDimension(0, -1)).isEqualTo(50f); in getDimension_shouldReturnGivenValue()
101 TypedArray typedArray = context.obtainStyledAttributes( in getDrawable_withExplicitColorValue_shouldReturnColorDrawable() local
106 ColorDrawable drawable = (ColorDrawable) typedArray.getDrawable(0); in getDrawable_withExplicitColorValue_shouldReturnColorDrawable()
[all …]
DShadowResourcesTest.java114 TypedArray typedArray = resources.obtainAttributes(attributeSet, new int[]{android.R.attr.id}); in obtainAttributes_shouldUseReferencedIdFromAttributeSet() local
115 assertThat(typedArray.getResourceId(0, -9)).isEqualTo(android.R.id.mask); in obtainAttributes_shouldUseReferencedIdFromAttributeSet()
121 TypedArray typedArray = resources.obtainAttributes(Robolectric.buildAttributeSet() in obtainAttributes() local
124 assertThat(typedArray).isNotNull(); in obtainAttributes()
125 assertThat(typedArray.peekValue(0).resourceId).isEqualTo(R.xml.shortcuts); in obtainAttributes()
136 TypedArray typedArray = resources in obtainAttributes_shouldReturnValuesFromAttributeSet() local
140 assertThat(typedArray.getDimension(0, 0)).isEqualTo(160f); in obtainAttributes_shouldReturnValuesFromAttributeSet()
141 assertThat(typedArray.getDimension(1, 0)).isEqualTo(12f); in obtainAttributes_shouldReturnValuesFromAttributeSet()
142 assertThat(typedArray.getString(2)).isEqualTo("A title!"); in obtainAttributes_shouldReturnValuesFromAttributeSet()
143 typedArray.recycle(); in obtainAttributes_shouldReturnValuesFromAttributeSet()
[all …]
DShadowAssetManagerTest.java136 TypedArray typedArray = in multiFormatAttributes_integerDecimalValue() local
139 typedArray.getValue(0, outValue); in multiFormatAttributes_integerDecimalValue()
148 TypedArray typedArray = in multiFormatAttributes_integerHexValue() local
151 typedArray.getValue(0, outValue); in multiFormatAttributes_integerHexValue()
160 TypedArray typedArray = in multiFormatAttributes_stringValue() local
163 typedArray.getValue(0, outValue); in multiFormatAttributes_stringValue()
172 TypedArray typedArray = in multiFormatAttributes_booleanValue() local
175 typedArray.getValue(0, outValue); in multiFormatAttributes_booleanValue()
DShadowThemeTest.java241 TypedArray typedArray = resources.newTheme().obtainStyledAttributes( in dimenRef() local
243 assertThat(typedArray.getDimensionPixelSize(0, -1)).isEqualTo(15); in dimenRef()
251 TypedArray typedArray = resources.newTheme().obtainStyledAttributes( in dimenRefRef() local
253 assertThat(typedArray.getDimensionPixelSize(0, -1)).isEqualTo(15); in dimenRefRef()
258 TypedArray typedArray = theme.obtainStyledAttributes(R.style.StyleA, new int[]{R.attr.string1}); in obtainStyledAttributes_shouldFindAttributeInDefaultStyle() local
259 assertThat(typedArray.getString(0)).isEqualTo("string 1 from style A"); in obtainStyledAttributes_shouldFindAttributeInDefaultStyle()
DShadowContextTest.java266 …TypedArray typedArray = context.obtainStyledAttributes(roboAttributeSet, new int[]{R.attr.quitKeyC… in obtainStyledAttributes_shouldExtractAttributesFromAttributeSet() local
267 assertThat(typedArray.getString(0)).isEqualTo("^q"); in obtainStyledAttributes_shouldExtractAttributesFromAttributeSet()
268 assertThat(typedArray.getInt(1, -1234)).isEqualTo(1 /* ungulate */); in obtainStyledAttributes_shouldExtractAttributesFromAttributeSet()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowTypedArray.java36 TypedArray typedArray; in create() local
38 typedArray = ReflectionHelpers.callConstructor(TypedArray.class, in create()
40 ReflectionHelpers.setField(typedArray, "mData", data); in create()
41 ReflectionHelpers.setField(typedArray, "mLength", len); in create()
42 ReflectionHelpers.setField(typedArray, "mIndices", indices); in create()
44 typedArray = ReflectionHelpers.callConstructor(TypedArray.class, in create()
51 ShadowTypedArray shadowTypedArray = Shadow.extract(typedArray); in create()
53 return typedArray; in create()
85 public static void dump(TypedArray typedArray) { in dump() argument
86 int[] data = ReflectionHelpers.getField(typedArray, "mData"); in dump()
[all …]
DShadowResources.java188 TypedArray typedArray = shadowAssetManager.getTypedArrayResource(realResources, id); in obtainTypedArray() local
189 if (typedArray != null) { in obtainTypedArray()
190 return typedArray; in obtainTypedArray()
/external/skia/modules/canvaskit/
Dmemory.js26 CanvasKit.Malloc = function(typedArray, len) { argument
27 var byteLen = len * typedArray.BYTES_PER_ELEMENT;
33 typedArray: null,
43 if (this.typedArray && this.typedArray.length) {
44 return this.typedArray;
46 this.typedArray = new typedArray(CanvasKit.HEAPU8.buffer, ptr, len);
48 this.typedArray['_ck'] = true;
49 return this.typedArray;
63 mallocObj.typedArray = null;
/external/robolectric/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowTypedArray.java44 TypedArray typedArray; in create() local
46 typedArray = in create()
49 ReflectionHelpers.setField(typedArray, "mData", data); in create()
50 ReflectionHelpers.setField(typedArray, "mLength", len); in create()
51 ReflectionHelpers.setField(typedArray, "mIndices", indices); in create()
53 typedArray = in create()
62 ShadowTypedArray shadowTypedArray = Shadow.extract(typedArray); in create()
64 return typedArray; in create()
88 public static void dump(TypedArray typedArray) { in dump() argument
89 int[] data = ReflectionHelpers.getField(typedArray, "mData"); in dump()
[all …]
/external/perfetto/ui/src/common/
Darray_buffer_builder.ts46 typedArray: Uint8Array,
51 const written = utf8Write(token, typedArray, byteOffset);
55 typedArray.set(token, byteOffset);
85 const typedArray = new Uint8Array(buffer); constant
89 insertToken(dataView, typedArray, byteOffset, token);
/external/lottie/sample/src/main/kotlin/com/airbnb/lottie/samples/views/
DMarquee.kt25 val typedArray = context.obtainStyledAttributes(it, R.styleable.Marquee, 0, 0) in <lambda>() constant
27 val titleRes = typedArray.getResourceId(R.styleable.Marquee_titleText, 0) in <lambda>()
32 val subtitleRes = typedArray.getResourceId(R.styleable.Marquee_subtitleText, 0) in <lambda>()
37 typedArray.recycle() in <lambda>()
DControlBarItemToggleView.kt31 … val typedArray = context.obtainStyledAttributes(it, R.styleable.ControlBarItemToggleView, 0, 0) in <lambda>() constant
33 val textRes = typedArray.getResourceId(R.styleable.ControlBarItemToggleView_text, 0) in <lambda>()
38 val drawableRes = typedArray.getResourceId(R.styleable.ControlBarItemToggleView_src, 0) in <lambda>()
45 typedArray.recycle() in <lambda>()
/external/setupcompat/main/java/com/google/android/setupcompat/template/
DSystemNavBarMixin.java96 TypedArray typedArray = in applyPartnerCustomizations() local
98 int defaultColor = typedArray.getColor(/* index= */ 0, /* defValue= */ 0); in applyPartnerCustomizations()
102 typedArray.recycle(); in applyPartnerCustomizations()
248 TypedArray typedArray = in showSystemBars() local
251 int statusBarColor = typedArray.getColor(0, 0); in showSystemBars()
252 int navigationBarColor = typedArray.getColor(1, 0); in showSystemBars()
263 typedArray.recycle(); in showSystemBars()
/external/setupdesign/main/src/com/google/android/setupdesign/items/
DRecyclerItemAdapter.java119 final TypedArray typedArray = in onCreateViewHolder() local
122 typedArray.getDrawable( in onCreateViewHolder()
126 typedArray.getDrawable(R.styleable.SudRecyclerItemAdapter_selectableItemBackground); in onCreateViewHolder()
139 typedArray.getDrawable(R.styleable.SudRecyclerItemAdapter_android_colorBackground); in onCreateViewHolder()
157 typedArray.recycle(); in onCreateViewHolder()
/external/mockito/src/main/java/org/mockito/internal/util/collections/
DHashCodeAndEqualsSafeSet.java110 public <T> T[] toArray(T[] typedArray) { in toArray() argument
111 …T[] array = typedArray.length >= size() ? typedArray : (T[]) newInstance(typedArray.getClass().get… in toArray()
/external/setupdesign/main/src/com/google/android/setupdesign/transition/
DTransitionHelper.java272 TypedArray typedArray = in applyForwardTransition() local
279 typedArray.getResourceId(/* index= */ 0, /* defValue= */ 0), in applyForwardTransition()
280 typedArray.getResourceId(/* index= */ 1, /* defValue= */ 0)); in applyForwardTransition()
281 typedArray.recycle(); in applyForwardTransition()
430 TypedArray typedArray = in applyBackwardTransition() local
438 typedArray.getResourceId(/* index= */ 0, /* defValue= */ 0), in applyBackwardTransition()
439 typedArray.getResourceId(/* index= */ 1, /* defValue= */ 0)); in applyBackwardTransition()
440 typedArray.recycle(); in applyBackwardTransition()
/external/setupcompat/main/java/com/google/android/setupcompat/util/
DSystemBarHelper.java192 final TypedArray typedArray = in showSystemBars() local
195 final int statusBarColor = typedArray.getColor(0, 0); in showSystemBars()
196 final int navigationBarColor = typedArray.getColor(1, 0); in showSystemBars()
199 typedArray.recycle(); in showSystemBars()
/external/robolectric/integration_tests/ctesque/src/sharedTest/java/android/content/res/
DCopiedResourcesTest.java185 TypedArray typedArray = resources.obtainTypedArray(R.array.typed_array_with_resource_id); in withIdReferenceEntry_obtainTypedArray() local
186 assertThat(typedArray.length()).isEqualTo(2); in withIdReferenceEntry_obtainTypedArray()
188 assertThat(typedArray.getResourceId(0, 0)).isEqualTo(R.id.id_declared_in_item_tag); in withIdReferenceEntry_obtainTypedArray()
189 assertThat(typedArray.getResourceId(1, 0)).isEqualTo(R.id.id_declared_in_layout); in withIdReferenceEntry_obtainTypedArray()
720 TypedArray typedArray = in obtainAttributes_shouldReturnValuesFromResources() local
724 assertThat(typedArray.getString(0)).isEqualTo("Android Title"); in obtainAttributes_shouldReturnValuesFromResources()
725 assertThat(typedArray.getInt(1, 0)).isEqualTo(1111); in obtainAttributes_shouldReturnValuesFromResources()
726 typedArray.recycle(); in obtainAttributes_shouldReturnValuesFromResources()
789 TypedArray typedArray = context.getTheme().obtainStyledAttributes(attributeSet, new int[] { in obtainStyledAttributes_shouldCheckXmlFirst_fromXmlLoadedFromResources() local
793 assertThat(typedArray.getFloat(0, 0)).isEqualTo(12.0f); in obtainStyledAttributes_shouldCheckXmlFirst_fromXmlLoadedFromResources()
[all …]
DResourcesTest.java184 TypedArray typedArray = resources.obtainTypedArray(R.array.typed_array_with_resource_id); in withIdReferenceEntry_obtainTypedArray() local
185 assertThat(typedArray.length()).isEqualTo(2); in withIdReferenceEntry_obtainTypedArray()
187 assertThat(typedArray.getResourceId(0, 0)).isEqualTo(R.id.id_declared_in_item_tag); in withIdReferenceEntry_obtainTypedArray()
188 assertThat(typedArray.getResourceId(1, 0)).isEqualTo(R.id.id_declared_in_layout); in withIdReferenceEntry_obtainTypedArray()
719 TypedArray typedArray = in obtainAttributes_shouldReturnValuesFromResources() local
723 assertThat(typedArray.getString(0)).isEqualTo("Android Title"); in obtainAttributes_shouldReturnValuesFromResources()
724 assertThat(typedArray.getInt(1, 0)).isEqualTo(1111); in obtainAttributes_shouldReturnValuesFromResources()
725 typedArray.recycle(); in obtainAttributes_shouldReturnValuesFromResources()
786 TypedArray typedArray = context.getTheme().obtainStyledAttributes(attributeSet, new int[] { in obtainStyledAttributes_shouldCheckXmlFirst_fromXmlLoadedFromResources() local
790 assertThat(typedArray.getFloat(0, 0)).isEqualTo(12.0f); in obtainStyledAttributes_shouldCheckXmlFirst_fromXmlLoadedFromResources()
[all …]
/external/robolectric/integration_tests/memoryleaks/src/test/java/org/robolectric/integrationtests/memoryleaks/
DBaseMemoryLeaksTest.java138 TypedArray typedArray = context.obtainStyledAttributes(new int[] {}); in typedArrayData() local
139 return ReflectionHelpers.getField(typedArray, "mData"); in typedArrayData()

12