Home
last modified time | relevance | path

Searched refs:TypedValue (Results 1 – 25 of 186) sorted by relevance

12345678

/frameworks/base/core/tests/coretests/src/android/util/
DTypedValueTest.kt36 val complex = TypedValue.floatToComplex(value) in testFloatToComplex()
39 assertEquals(value, TypedValue.complexToFloat(complex), delta) in testFloatToComplex()
42 val actualRadix = ((complex shr TypedValue.COMPLEX_RADIX_SHIFT) in testFloatToComplex()
43 and TypedValue.COMPLEX_RADIX_MASK) in testFloatToComplex()
48 assertRoundTripEquals(0f, TypedValue.COMPLEX_RADIX_23p0) in testFloatToComplex()
50 assertRoundTripEquals(0.5f, TypedValue.COMPLEX_RADIX_0p23) in testFloatToComplex()
51 assertRoundTripEquals(0.05f, TypedValue.COMPLEX_RADIX_0p23) in testFloatToComplex()
52 assertRoundTripEquals(0.005f, TypedValue.COMPLEX_RADIX_0p23) in testFloatToComplex()
53 assertRoundTripEquals(0.0005f, TypedValue.COMPLEX_RADIX_0p23) in testFloatToComplex()
54 assertRoundTripEquals(0.00005f, TypedValue.COMPLEX_RADIX_0p23) in testFloatToComplex()
[all …]
/frameworks/base/core/java/android/content/res/
DTypedArray.java32 import android.util.TypedValue;
136 /*package*/ TypedValue mValue = new TypedValue();
231 if (type == TypedValue.TYPE_NULL) { in getText()
233 } else if (type == TypedValue.TYPE_STRING) { in getText()
237 final TypedValue v = mValue; in getText()
268 if (type == TypedValue.TYPE_NULL) { in getString()
270 } else if (type == TypedValue.TYPE_STRING) { in getString()
274 final TypedValue v = mValue; in getString()
307 if (type == TypedValue.TYPE_STRING) { in getNonResourceString()
344 if (type == TypedValue.TYPE_NULL) { in getNonConfigurationString()
[all …]
DResources.java61 import android.util.TypedValue;
152 private TypedValue mTmpValue = new TypedValue();
460 final TypedValue value = obtainTempTypedValue(); in getFont()
476 Typeface getFont(@NonNull TypedValue value, @FontRes int id) throws NotFoundException { in getFont()
749 final TypedValue value = obtainTempTypedValue(); in getDimension()
753 if (value.type == TypedValue.TYPE_DIMENSION) { in getDimension()
754 return TypedValue.complexToDimension(value.data, impl.getDisplayMetrics()); in getDimension()
783 final TypedValue value = obtainTempTypedValue(); in getDimensionPixelOffset()
787 if (value.type == TypedValue.TYPE_DIMENSION) { in getDimensionPixelOffset()
788 return TypedValue.complexToDimensionPixelOffset(value.data, in getDimensionPixelOffset()
[all …]
DXmlBlock.java26 import android.util.TypedValue;
237 if (t == TypedValue.TYPE_NULL) { in getAttributeValue()
242 return TypedValue.coerceToString(t, v); in getAttributeValue()
398 if (t == TypedValue.TYPE_STRING) { in getAttributeListValue()
409 if (t >= TypedValue.TYPE_FIRST_INT && in getAttributeBooleanValue()
410 t <= TypedValue.TYPE_LAST_INT) { in getAttributeBooleanValue()
419 if (t == TypedValue.TYPE_REFERENCE) { in getAttributeResourceValue()
428 if (t >= TypedValue.TYPE_FIRST_INT && in getAttributeIntValue()
429 t <= TypedValue.TYPE_LAST_INT) { in getAttributeIntValue()
438 if (t >= TypedValue.TYPE_FIRST_INT && in getAttributeUnsignedIntValue()
[all …]
DResourcesImpl.java51 import android.util.TypedValue;
219 void getValue(@AnyRes int id, TypedValue outValue, boolean resolveRefs) in getValue()
228 void getValueForDensity(@AnyRes int id, int density, TypedValue outValue, in getValueForDensity()
237 void getValue(String name, TypedValue outValue, boolean resolveRefs) in getValue()
327 AssetFileDescriptor openRawResourceFd(@RawRes int id, TypedValue tempValue) in openRawResourceFd()
339 InputStream openRawResource(@RawRes int id, TypedValue value) throws NotFoundException { in openRawResource()
595 Drawable loadDrawable(@NonNull Resources wrapper, @NonNull TypedValue value, int id, in loadDrawable()
608 if (density > 0 && value.density > 0 && value.density != TypedValue.DENSITY_NONE) { in loadDrawable()
630 if (value.type >= TypedValue.TYPE_FIRST_COLOR_INT in loadDrawable()
631 && value.type <= TypedValue.TYPE_LAST_COLOR_INT) { in loadDrawable()
[all …]
/frameworks/layoutlib/bridge/tests/src/android/content/res/
DBridgeTypedArrayTest.java21 import static android.util.TypedValue.TYPE_ATTRIBUTE;
22 import static android.util.TypedValue.TYPE_DIMENSION;
23 import static android.util.TypedValue.TYPE_FLOAT;
24 import static android.util.TypedValue.TYPE_INT_BOOLEAN;
25 import static android.util.TypedValue.TYPE_INT_COLOR_ARGB4;
26 import static android.util.TypedValue.TYPE_INT_COLOR_ARGB8;
27 import static android.util.TypedValue.TYPE_INT_COLOR_RGB4;
28 import static android.util.TypedValue.TYPE_INT_COLOR_RGB8;
29 import static android.util.TypedValue.TYPE_INT_DEC;
30 import static android.util.TypedValue.TYPE_INT_HEX;
[all …]
/frameworks/base/core/java/android/util/
DTypedValue.java32 public class TypedValue { class
252 1.0f / (1<<TypedValue.COMPLEX_MANTISSA_SHIFT);
282 return (complex&(TypedValue.COMPLEX_MANTISSA_MASK in complexToFloat()
283 <<TypedValue.COMPLEX_MANTISSA_SHIFT)) in complexToFloat()
284 * RADIX_MULTS[(complex>>TypedValue.COMPLEX_RADIX_SHIFT) in complexToFloat()
285 & TypedValue.COMPLEX_RADIX_MASK]; in complexToFloat()
386 return COMPLEX_UNIT_MASK & (data>>TypedValue.COMPLEX_UNIT_SHIFT); in getComplexUnit()
452 if (radix < TypedValue.COMPLEX_RADIX_23p0 || radix > TypedValue.COMPLEX_RADIX_0p23) { in createComplex()
455 return ((mantissa & TypedValue.COMPLEX_MANTISSA_MASK) << TypedValue.COMPLEX_MANTISSA_SHIFT) in createComplex()
456 | (radix << TypedValue.COMPLEX_RADIX_SHIFT); in createComplex()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/res/
DConfigurationBoundResourceCacheTest.java20 import android.util.TypedValue;
81 TypedValue staticValue = new TypedValue(); in testVoidConfigChange()
85 float staticDim = TypedValue.complexToDimension(staticValue.data, res.getDisplayMetrics()); in testVoidConfigChange()
102 TypedValue changingValue = new TypedValue(); in testEffectiveConfigChange()
106 float changingDim = TypedValue.complexToDimension(changingValue.data, in testEffectiveConfigChange()
125 TypedValue staticValue = new TypedValue(); in testConfigChangeMultipleResources()
126 TypedValue changingValue = new TypedValue(); in testConfigChangeMultipleResources()
130 float staticDim = TypedValue.complexToDimension(staticValue.data, res.getDisplayMetrics()); in testConfigChangeMultipleResources()
131 float changingDim = TypedValue.complexToDimension(changingValue.data, in testConfigChangeMultipleResources()
158 TypedValue[] staticValues = new TypedValue[]{new TypedValue(), new TypedValue()}; in testConfigChangeMultipleThemes()
[all …]
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/
DResourceHelper.java61 import android.util.TypedValue;
83 private static final TypedValue mValue = new TypedValue();
556 new UnitEntry("px", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_PX, 1.0f),
557 new UnitEntry("dip", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_DIP, 1.0f),
558 new UnitEntry("dp", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_DIP, 1.0f),
559 new UnitEntry("sp", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_SP, 1.0f),
560 new UnitEntry("pt", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_PT, 1.0f),
561 new UnitEntry("in", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_IN, 1.0f),
562 new UnitEntry("mm", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_MM, 1.0f),
563 new UnitEntry("%", TypedValue.TYPE_FRACTION, TypedValue.COMPLEX_UNIT_FRACTION, 1.0f/100),
[all …]
/frameworks/base/core/java/android/view/animation/
DScaleAnimation.java23 import android.util.TypedValue;
38 private int mFromXType = TypedValue.TYPE_NULL;
39 private int mToXType = TypedValue.TYPE_NULL;
40 private int mFromYType = TypedValue.TYPE_NULL;
41 private int mToYType = TypedValue.TYPE_NULL;
70 TypedValue tv = a.peekValue( in ScaleAnimation()
74 if (tv.type == TypedValue.TYPE_FLOAT) { in ScaleAnimation()
86 if (tv.type == TypedValue.TYPE_FLOAT) { in ScaleAnimation()
99 if (tv.type == TypedValue.TYPE_FLOAT) { in ScaleAnimation()
111 if (tv.type == TypedValue.TYPE_FLOAT) { in ScaleAnimation()
[all …]
/frameworks/base/apct-tests/perftests/core/src/android/app/
DResourcesPerfTest.java26 import android.util.TypedValue;
60 TypedValue value = new TypedValue(); in getValue()
69 TypedValue value = new TypedValue(); in getFrameworkValue()
79 TypedValue value = new TypedValue(); in getValueString()
88 TypedValue value = new TypedValue(); in getFrameworkStringValue()
97 TypedValue value = new TypedValue(); in getValueManyConfigurations()
/frameworks/base/core/tests/overlaytests/device/src/com/android/overlaytest/
DFabricatedOverlaysTest.java36 import android.util.TypedValue;
89 .setResourceValue(TEST_RESOURCE, TypedValue.TYPE_INT_DEC, 1) in testFabricatedOverlay()
121 .setResourceValue(TEST_RESOURCE, TypedValue.TYPE_INT_DEC, 1) in testRegisterEnableAtomic()
137 .setResourceValue(TEST_RESOURCE, TypedValue.TYPE_INT_DEC, 1) in testRegisterTwice()
149 .setResourceValue(TEST_RESOURCE, TypedValue.TYPE_INT_DEC, 2) in testRegisterTwice()
162 .setResourceValue(TEST_RESOURCE, TypedValue.TYPE_INT_DEC, 1) in testInvalidOwningPackageName()
179 .setResourceValue(TEST_RESOURCE, TypedValue.TYPE_INT_DEC, 1) in testInvalidOverlayName()
200 .setResourceValue(TEST_RESOURCE, TypedValue.TYPE_INT_DEC, 1) in testOverlayIdentifierLongest()
211 .setResourceValue(TEST_RESOURCE, TypedValue.TYPE_INT_DEC, 1) in testOverlayIdentifierLongest()
227 .setResourceValue(TEST_RESOURCE, TypedValue.TYPE_INT_DEC, 1) in testInvalidResourceValues()
[all …]
/frameworks/base/services/core/java/com/android/server/wm/
DWatermark.java30 import android.util.TypedValue;
84 TypedValue.COMPLEX_UNIT_DIP, 20, dm); in Watermark()
95 TypedValue.COMPLEX_UNIT_PX, mTextWidth*2, dm); in Watermark()
97 TypedValue.COMPLEX_UNIT_PX, mTextHeight*3, dm); in Watermark()
99 TypedValue.COMPLEX_UNIT_PX, 0xb0000000, dm); in Watermark()
101 TypedValue.COMPLEX_UNIT_PX, 0x60ffffff, dm); in Watermark()
103 TypedValue.COMPLEX_UNIT_PX, 7, dm); in Watermark()
105 TypedValue.COMPLEX_UNIT_PX, 0, dm); in Watermark()
107 TypedValue.COMPLEX_UNIT_PX, 0, dm); in Watermark()
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
DDualHeightHorizontalLinearLayout.kt23 import android.util.TypedValue in <lambda>()
54 private val singleLineHeightValue: TypedValue? in <lambda>()
57 private val singleLineVerticalPaddingValue: TypedValue? in <lambda>()
78 val tempHeight = TypedValue() in <lambda>()
88 val tempPadding = TypedValue() in <lambda>()
157 tv: TypedValue?, in <lambda>()
/frameworks/base/services/core/java/com/android/server/display/utils/
DAmbientFilterFactory.java21 import android.util.TypedValue;
95 TypedValue value = new TypedValue(); in getFloat()
98 if (value.type != TypedValue.TYPE_FLOAT) { in getFloat()
/frameworks/base/core/java/android/accessibilityservice/util/
DAccessibilityUtils.java27 import android.util.TypedValue;
122 return Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, screenWidthDp, in getScreenWidthPixels()
136 return Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, screenHeightDp, in getScreenHeightPixels()
/frameworks/base/packages/SystemUI/src/com/android/systemui/tuner/
DSelectablePreference.java19 import android.util.TypedValue;
32 mSize = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 32, in SelectablePreference()
/frameworks/base/services/tests/servicestests/src/com/android/server/display/utils/
DAmbientFilterTest.java28 import android.util.TypedValue;
114 TypedValue value = (TypedValue) invocation.getArguments()[1]; in setMockValues()
115 value.type = TypedValue.TYPE_FLOAT; in setMockValues()
121 any(TypedValue.class), eq(true)); in setMockValues()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
DRestrictedPreferenceHelper.java26 import android.util.TypedValue;
53 final TypedValue userRestriction = in RestrictedPreferenceHelper()
56 if (userRestriction != null && userRestriction.type == TypedValue.TYPE_STRING) { in RestrictedPreferenceHelper()
71 final TypedValue useAdminDisabledSummary = in RestrictedPreferenceHelper()
75 (useAdminDisabledSummary.type == TypedValue.TYPE_INT_BOOLEAN in RestrictedPreferenceHelper()
DRestrictedSwitchPreference.java25 import android.util.TypedValue;
54 final TypedValue useAdditionalSummary = attributes.peekValue( in RestrictedSwitchPreference()
58 (useAdditionalSummary.type == TypedValue.TYPE_INT_BOOLEAN in RestrictedSwitchPreference()
62 final TypedValue restrictedSwitchSummary = attributes.peekValue( in RestrictedSwitchPreference()
65 && restrictedSwitchSummary.type == TypedValue.TYPE_STRING) { in RestrictedSwitchPreference()
/frameworks/layoutlib/bridge/src/android/content/res/
DBridgeTypedArray.java45 import android.util.TypedValue;
54 import static android.util.TypedValue.TYPE_ATTRIBUTE;
55 import static android.util.TypedValue.TYPE_DIMENSION;
56 import static android.util.TypedValue.TYPE_FLOAT;
57 import static android.util.TypedValue.TYPE_INT_BOOLEAN;
58 import static android.util.TypedValue.TYPE_INT_COLOR_ARGB4;
59 import static android.util.TypedValue.TYPE_INT_COLOR_ARGB8;
60 import static android.util.TypedValue.TYPE_INT_COLOR_RGB4;
61 import static android.util.TypedValue.TYPE_INT_COLOR_RGB8;
62 import static android.util.TypedValue.TYPE_INT_DEC;
[all …]
/frameworks/base/core/java/android/animation/
DAnimatorInflater.java35 import android.util.TypedValue;
79 private static final TypedValue sTmpTypedValue = new TypedValue();
275 TypedValue tvFrom = styledAttributes.peekValue(valueFromId); in getPVH()
278 TypedValue tvTo = styledAttributes.peekValue(valueToId); in getPVH()
334 if (fromType == TypedValue.TYPE_DIMENSION) { in getPVH()
340 if (toType == TypedValue.TYPE_DIMENSION) { in getPVH()
351 if (toType == TypedValue.TYPE_DIMENSION) { in getPVH()
362 if (fromType == TypedValue.TYPE_DIMENSION) { in getPVH()
370 if (toType == TypedValue.TYPE_DIMENSION) { in getPVH()
383 if (toType == TypedValue.TYPE_DIMENSION) { in getPVH()
[all …]
/frameworks/base/packages/overlays/tests/src/com/android/theme/icon/
DIconPackOverlayTest.java31 import android.util.TypedValue;
81 private final TypedValue mTargetTypedValue = new TypedValue();
82 private final TypedValue mOverlayTypedValue = new TypedValue();
266 private static boolean attributesEquals(TypedValue target, TypedValue overlay) { in attributesEquals()
/frameworks/opt/setupwizard/library/gingerbread/test/robotest/src/com/android/setupwizardlib/util/
DDimensionConsistencyTest.java25 import android.util.TypedValue;
63 return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, displayMetrics); in dp2Px()
/frameworks/opt/car/setupwizard/library/main/src/com/android/car/setupwizardlib/partner/
DPartnerConfigHelper.java29 import android.util.TypedValue;
139 TypedValue outValue = new TypedValue(); in getColorStateList()
141 if (outValue.type == TypedValue.TYPE_REFERENCE && outValue.data == 0) { in getColorStateList()
182 TypedValue outValue = new TypedValue(); in getDrawable()
184 if (outValue.type == TypedValue.TYPE_REFERENCE && outValue.data == 0) { in getDrawable()

12345678