Home
last modified time | relevance | path

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

/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()
DShadowLegacyAssetManager.java1219 …TypedArray typedArray = ShadowTypedArray.create(resources, attrs, data, indices, nextIndex, string… in attrsToTypedArray() local
1221 ShadowTypedArray shadowTypedArray = Shadow.extract(typedArray); in attrsToTypedArray()
1224 return typedArray; in attrsToTypedArray()
/external/setupdesign/main/src/com/google/android/setupdesign/items/
DRecyclerItemAdapter.java110 final TypedArray typedArray = in onCreateViewHolder() local
113 typedArray.getDrawable( in onCreateViewHolder()
117 typedArray.getDrawable(R.styleable.SudRecyclerItemAdapter_selectableItemBackground); in onCreateViewHolder()
128 typedArray.getDrawable(R.styleable.SudRecyclerItemAdapter_android_colorBackground); in onCreateViewHolder()
146 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/setupcompat/main/java/com/google/android/setupcompat/template/
DSystemNavBarMixin.java203 TypedArray typedArray = in showSystemBars() local
206 int statusBarColor = typedArray.getColor(0, 0); in showSystemBars()
207 int navigationBarColor = typedArray.getColor(1, 0); in showSystemBars()
218 typedArray.recycle(); in showSystemBars()
/external/setupcompat/main/java/com/google/android/setupcompat/util/
DSystemBarHelper.java193 final TypedArray typedArray = in showSystemBars() local
196 final int statusBarColor = typedArray.getColor(0, 0); in showSystemBars()
197 final int navigationBarColor = typedArray.getColor(1, 0); in showSystemBars()
200 typedArray.recycle(); in showSystemBars()