/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/ |
D | ShadowTypedArrayTest.java | 44 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 …]
|
D | ShadowResourcesTest.java | 114 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 …]
|
D | ShadowAssetManagerTest.java | 136 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()
|
D | ShadowThemeTest.java | 241 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()
|
D | ShadowContextTest.java | 266 …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/ |
D | ShadowTypedArray.java | 36 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 …]
|
D | ShadowResources.java | 188 TypedArray typedArray = shadowAssetManager.getTypedArrayResource(realResources, id); in obtainTypedArray() local 189 if (typedArray != null) { in obtainTypedArray() 190 return typedArray; in obtainTypedArray()
|
D | ShadowLegacyAssetManager.java | 1219 …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/ |
D | RecyclerItemAdapter.java | 110 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/ |
D | HashCodeAndEqualsSafeSet.java | 110 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/ |
D | SystemNavBarMixin.java | 203 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/ |
D | SystemBarHelper.java | 193 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()
|