Home
last modified time | relevance | path

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

123456

/frameworks/base/core/java/android/content/res/
DTypedArray.java31 import android.util.TypedValue;
135 /*package*/ TypedValue mValue = new TypedValue();
230 if (type == TypedValue.TYPE_NULL) { in getText()
232 } else if (type == TypedValue.TYPE_STRING) { in getText()
236 final TypedValue v = mValue; in getText()
267 if (type == TypedValue.TYPE_NULL) { in getString()
269 } else if (type == TypedValue.TYPE_STRING) { in getString()
273 final TypedValue v = mValue; in getString()
306 if (type == TypedValue.TYPE_STRING) { in getNonResourceString()
343 if (type == TypedValue.TYPE_NULL) { in getNonConfigurationString()
[all …]
DResources.java58 import android.util.TypedValue;
131 private TypedValue mTmpValue = new TypedValue();
383 final TypedValue value = obtainTempTypedValue(); in getFont()
399 Typeface getFont(@NonNull TypedValue value, @FontRes int id) throws NotFoundException { in getFont()
672 final TypedValue value = obtainTempTypedValue(); in getDimension()
676 if (value.type == TypedValue.TYPE_DIMENSION) { in getDimension()
677 return TypedValue.complexToDimension(value.data, impl.getDisplayMetrics()); in getDimension()
706 final TypedValue value = obtainTempTypedValue(); in getDimensionPixelOffset()
710 if (value.type == TypedValue.TYPE_DIMENSION) { in getDimensionPixelOffset()
711 return TypedValue.complexToDimensionPixelOffset(value.data, in getDimensionPixelOffset()
[all …]
DXmlBlock.java24 import android.util.TypedValue;
226 if (t == TypedValue.TYPE_NULL) { in getAttributeValue()
231 return TypedValue.coerceToString(t, v); in getAttributeValue()
387 if (t == TypedValue.TYPE_STRING) { in getAttributeListValue()
398 if (t >= TypedValue.TYPE_FIRST_INT && in getAttributeBooleanValue()
399 t <= TypedValue.TYPE_LAST_INT) { in getAttributeBooleanValue()
408 if (t == TypedValue.TYPE_REFERENCE) { in getAttributeResourceValue()
417 if (t >= TypedValue.TYPE_FIRST_INT && in getAttributeIntValue()
418 t <= TypedValue.TYPE_LAST_INT) { in getAttributeIntValue()
427 if (t >= TypedValue.TYPE_FIRST_INT && in getAttributeUnsignedIntValue()
[all …]
DResourcesImpl.java54 import android.util.TypedValue;
231 void getValue(@AnyRes int id, TypedValue outValue, boolean resolveRefs) in getValue()
240 void getValueForDensity(@AnyRes int id, int density, TypedValue outValue, in getValueForDensity()
249 void getValue(String name, TypedValue outValue, boolean resolveRefs) in getValue()
339 AssetFileDescriptor openRawResourceFd(@RawRes int id, TypedValue tempValue) in openRawResourceFd()
351 InputStream openRawResource(@RawRes int id, TypedValue value) throws NotFoundException { in openRawResource()
576 Drawable loadDrawable(@NonNull Resources wrapper, @NonNull TypedValue value, int id, in loadDrawable()
589 if (density > 0 && value.density > 0 && value.density != TypedValue.DENSITY_NONE) { in loadDrawable()
611 if (value.type >= TypedValue.TYPE_FIRST_COLOR_INT in loadDrawable()
612 && value.type <= TypedValue.TYPE_LAST_COLOR_INT) { in loadDrawable()
[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();
543 new UnitEntry("px", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_PX, 1.0f),
544 new UnitEntry("dip", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_DIP, 1.0f),
545 new UnitEntry("dp", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_DIP, 1.0f),
546 new UnitEntry("sp", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_SP, 1.0f),
547 new UnitEntry("pt", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_PT, 1.0f),
548 new UnitEntry("in", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_IN, 1.0f),
549 new UnitEntry("mm", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_MM, 1.0f),
550 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 …]
DAnimation.java30 import android.util.TypedValue;
1189 static Description parseValue(TypedValue value) { in parseValue()
1195 if (value.type == TypedValue.TYPE_FRACTION) { in parseValue()
1196 d.type = (value.data & TypedValue.COMPLEX_UNIT_MASK) == in parseValue()
1197 TypedValue.COMPLEX_UNIT_FRACTION_PARENT ? in parseValue()
1199 d.value = TypedValue.complexToFloat(value.data); in parseValue()
1201 } else if (value.type == TypedValue.TYPE_FLOAT) { in parseValue()
1205 } else if (value.type >= TypedValue.TYPE_FIRST_INT && in parseValue()
1206 value.type <= TypedValue.TYPE_LAST_INT) { in parseValue()
/frameworks/layoutlib/studio-custom-widgets/src/com/android/tools/idea/editors/theme/widgets/
DThemePreviewLayout.java22 import android.util.TypedValue;
77 mMaxColumnWidth = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, in ThemePreviewLayout()
80 mMinColumnWidth = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, in ThemePreviewLayout()
83 mItemHorizontalMargin = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, in ThemePreviewLayout()
86 mItemVerticalMargin = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, in ThemePreviewLayout()
/frameworks/base/services/core/java/com/android/server/wm/
DWatermark.java30 import android.util.TypedValue;
86 TypedValue.COMPLEX_UNIT_DIP, 20, dm); in Watermark()
97 TypedValue.COMPLEX_UNIT_PX, mTextWidth*2, dm); in Watermark()
99 TypedValue.COMPLEX_UNIT_PX, mTextHeight*3, dm); in Watermark()
101 TypedValue.COMPLEX_UNIT_PX, 0xb0000000, dm); in Watermark()
103 TypedValue.COMPLEX_UNIT_PX, 0x60ffffff, dm); in Watermark()
105 TypedValue.COMPLEX_UNIT_PX, 7, dm); in Watermark()
107 TypedValue.COMPLEX_UNIT_PX, 0, dm); in Watermark()
109 TypedValue.COMPLEX_UNIT_PX, 0, dm); in Watermark()
DLaunchWarningWindow.java23 import android.util.TypedValue;
41 TypedValue out = new TypedValue(); in LaunchWarningWindow()
/frameworks/base/core/java/android/util/
DTypedValue.java26 public class TypedValue { class
234 1.0f / (1<<TypedValue.COMPLEX_MANTISSA_SHIFT);
264 return (complex&(TypedValue.COMPLEX_MANTISSA_MASK in complexToFloat()
265 <<TypedValue.COMPLEX_MANTISSA_SHIFT)) in complexToFloat()
266 * RADIX_MULTS[(complex>>TypedValue.COMPLEX_RADIX_SHIFT) in complexToFloat()
267 & TypedValue.COMPLEX_RADIX_MASK]; in complexToFloat()
368 return COMPLEX_UNIT_MASK & (data>>TypedValue.COMPLEX_UNIT_SHIFT); in getComplexUnit()
530 public void setTo(TypedValue other) in setTo()
/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;
51 final TypedValue useAdditionalSummary = attributes.peekValue( in RestrictedSwitchPreference()
55 (useAdditionalSummary.type == TypedValue.TYPE_INT_BOOLEAN in RestrictedSwitchPreference()
59 final TypedValue restrictedSwitchSummary = attributes.peekValue( in RestrictedSwitchPreference()
62 && restrictedSwitchSummary.type == TypedValue.TYPE_STRING) { in RestrictedSwitchPreference()
/frameworks/base/services/tests/servicestests/src/com/android/server/display/whitebalance/
DAmbientFilterTest.java28 import android.util.TypedValue;
113 TypedValue value = (TypedValue) invocation.getArguments()[1]; in setMockValues()
114 value.type = TypedValue.TYPE_FLOAT; in setMockValues()
120 any(TypedValue.class), eq(true)); in setMockValues()
/frameworks/layoutlib/bridge/src/android/content/res/
DBridgeTypedArray.java42 import android.util.TypedValue;
50 import static android.util.TypedValue.TYPE_ATTRIBUTE;
51 import static android.util.TypedValue.TYPE_DIMENSION;
52 import static android.util.TypedValue.TYPE_FLOAT;
53 import static android.util.TypedValue.TYPE_INT_BOOLEAN;
54 import static android.util.TypedValue.TYPE_INT_COLOR_ARGB4;
55 import static android.util.TypedValue.TYPE_INT_COLOR_ARGB8;
56 import static android.util.TypedValue.TYPE_INT_COLOR_RGB4;
57 import static android.util.TypedValue.TYPE_INT_COLOR_RGB8;
58 import static android.util.TypedValue.TYPE_INT_DEC;
[all …]
DTypedArray_Delegate.java21 import android.util.TypedValue;
26 public static boolean getValueAt(TypedArray theTypedArray, int index, TypedValue outValue) { in getValueAt()
/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/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/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/base/services/autofill/java/com/android/server/autofill/ui/
DCustomScrollView.java24 import android.util.TypedValue;
74 final TypedValue typedValue = new TypedValue(); in calculateDimensions()
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
DVolumeToolTipView.java24 import android.util.TypedValue;
67 TypedValue typedValue = new TypedValue(); in drawArrow()
/frameworks/base/tests/UiBench/src/com/android/test/uibench/leanback/
DTestHelper.java30 import android.util.TypedValue;
110 (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, mWidthDP, dm), in build()
111 (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, mHeightDP, dm)); in build()
/frameworks/base/core/java/com/android/internal/globalactions/
DActionsDialog.java22 import android.util.TypedValue;
43 TypedValue outValue = new TypedValue(); in getDialogTheme()
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DFontSizeUtils.java19 import android.util.TypedValue;
36 v.setTextSize(TypedValue.COMPLEX_UNIT_PX, in updateFontSize()

123456