Home
last modified time | relevance | path

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

1234567

/frameworks/base/core/java/android/content/res/
DTypedArray.java29 import android.util.TypedValue;
82 /*package*/ TypedValue mValue = new TypedValue();
162 if (type == TypedValue.TYPE_NULL) { in getText()
164 } else if (type == TypedValue.TYPE_STRING) { in getText()
168 final TypedValue v = mValue; in getText()
199 if (type == TypedValue.TYPE_NULL) { in getString()
201 } else if (type == TypedValue.TYPE_STRING) { in getString()
205 final TypedValue v = mValue; in getString()
238 if (type == TypedValue.TYPE_STRING) { in getNonResourceString()
275 if (type == TypedValue.TYPE_NULL) { in getNonConfigurationString()
[all …]
DResources.java53 import android.util.TypedValue;
115 private TypedValue mTmpValue = new TypedValue();
590 final TypedValue value = obtainTempTypedValue(); in getDimension()
594 if (value.type == TypedValue.TYPE_DIMENSION) { in getDimension()
595 return TypedValue.complexToDimension(value.data, impl.getDisplayMetrics()); in getDimension()
624 final TypedValue value = obtainTempTypedValue(); in getDimensionPixelOffset()
628 if (value.type == TypedValue.TYPE_DIMENSION) { in getDimensionPixelOffset()
629 return TypedValue.complexToDimensionPixelOffset(value.data, in getDimensionPixelOffset()
660 final TypedValue value = obtainTempTypedValue(); in getDimensionPixelSize()
664 if (value.type == TypedValue.TYPE_DIMENSION) { in getDimensionPixelSize()
[all …]
DAssetManager.java28 import android.util.TypedValue;
74 private final TypedValue mValue = new TypedValue();
160 final TypedValue outValue = mValue; in getResourceText()
179 final TypedValue outValue = mValue; in getResourceBagText()
184 if (outValue.type == TypedValue.TYPE_STRING) { in getResourceBagText()
215 final boolean getResourceValue(@AnyRes int resId, int densityDpi, @NonNull TypedValue outValue, in getResourceValue()
221 if (outValue.type == TypedValue.TYPE_STRING) { in getResourceValue()
261 final boolean getThemeValue(long theme, @AnyRes int resId, @NonNull TypedValue outValue, in getThemeValue()
267 if (outValue.type == TypedValue.TYPE_STRING) { in getThemeValue()
789 private native final int loadResourceValue(int ident, short density, TypedValue outValue, in loadResourceValue()
[all …]
DXmlBlock.java19 import android.util.TypedValue;
207 if (t == TypedValue.TYPE_NULL) { in getAttributeValue()
212 return TypedValue.coerceToString(t, v); in getAttributeValue()
368 if (t == TypedValue.TYPE_STRING) { in getAttributeListValue()
379 if (t >= TypedValue.TYPE_FIRST_INT && in getAttributeBooleanValue()
380 t <= TypedValue.TYPE_LAST_INT) { in getAttributeBooleanValue()
389 if (t == TypedValue.TYPE_REFERENCE) { in getAttributeResourceValue()
398 if (t >= TypedValue.TYPE_FIRST_INT && in getAttributeIntValue()
399 t <= TypedValue.TYPE_LAST_INT) { in getAttributeIntValue()
408 if (t >= TypedValue.TYPE_FIRST_INT && in getAttributeUnsignedIntValue()
[all …]
DResourcesImpl.java45 import android.util.TypedValue;
184 void getValue(@AnyRes int id, TypedValue outValue, boolean resolveRefs) in getValue()
193 void getValueForDensity(@AnyRes int id, int density, TypedValue outValue, in getValueForDensity()
202 void getValue(String name, TypedValue outValue, boolean resolveRefs) in getValue()
285 AssetFileDescriptor openRawResourceFd(@RawRes int id, TypedValue tempValue) in openRawResourceFd()
297 InputStream openRawResource(@RawRes int id, TypedValue value) throws NotFoundException { in openRawResource()
519 Drawable loadDrawable(Resources wrapper, TypedValue value, int id, Resources.Theme theme, in loadDrawable()
535 if (value.type >= TypedValue.TYPE_FIRST_COLOR_INT in loadDrawable()
536 && value.type <= TypedValue.TYPE_LAST_COLOR_INT) { in loadDrawable()
612 private void cacheDrawable(TypedValue value, boolean isColorDrawable, DrawableCache caches, in cacheDrawable()
[all …]
/frameworks/support/v7/appcompat/src/android/support/v7/widget/
DContentFrameLayout.java24 import android.util.TypedValue;
41 private TypedValue mMinWidthMajor;
42 private TypedValue mMinWidthMinor;
43 private TypedValue mFixedWidthMajor;
44 private TypedValue mFixedWidthMinor;
45 private TypedValue mFixedHeightMajor;
46 private TypedValue mFixedHeightMinor;
99 final TypedValue tvw = isPortrait ? mFixedWidthMinor : mFixedWidthMajor; in onMeasure()
100 if (tvw != null && tvw.type != TypedValue.TYPE_NULL) { in onMeasure()
102 if (tvw.type == TypedValue.TYPE_DIMENSION) { in onMeasure()
[all …]
DThemeUtils.java23 import android.util.TypedValue;
27 private static final ThreadLocal<TypedValue> TL_TYPED_VALUE = new ThreadLocal<>();
89 final TypedValue tv = getTypedValue(); in getDisabledThemeAttrColor()
98 private static TypedValue getTypedValue() { in getTypedValue()
99 TypedValue typedValue = TL_TYPED_VALUE.get(); in getTypedValue()
101 typedValue = new TypedValue(); in getTypedValue()
DTintTypedArray.java27 import android.util.TypedValue;
41 private TypedValue mTypedValue;
177 public boolean getValue(int index, TypedValue outValue) { in getValue()
186 mTypedValue = new TypedValue(); in getType()
197 public TypedValue peekValue(int index) { in peekValue()
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/
DResourceHelper.java51 import android.util.TypedValue;
70 private final static TypedValue mValue = new TypedValue();
453 new UnitEntry("px", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_PX, 1.0f),
454 new UnitEntry("dip", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_DIP, 1.0f),
455 new UnitEntry("dp", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_DIP, 1.0f),
456 new UnitEntry("sp", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_SP, 1.0f),
457 new UnitEntry("pt", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_PT, 1.0f),
458 new UnitEntry("in", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_IN, 1.0f),
459 new UnitEntry("mm", TypedValue.TYPE_DIMENSION, TypedValue.COMPLEX_UNIT_MM, 1.0f),
460 new UnitEntry("%", TypedValue.TYPE_FRACTION, TypedValue.COMPLEX_UNIT_FRACTION, 1.0f/100),
[all …]
/frameworks/base/core/tests/coretests/src/android/content/res/
DConfigurationBoundResourceCacheTest.java21 import android.util.TypedValue;
80 TypedValue staticValue = new TypedValue(); in testVoidConfigChange()
84 float staticDim = TypedValue.complexToDimension(staticValue.data, res.getDisplayMetrics()); in testVoidConfigChange()
101 TypedValue changingValue = new TypedValue(); in testEffectiveConfigChange()
105 float changingDim = TypedValue.complexToDimension(changingValue.data, in testEffectiveConfigChange()
124 TypedValue staticValue = new TypedValue(); in testConfigChangeMultipleResources()
125 TypedValue changingValue = new TypedValue(); in testConfigChangeMultipleResources()
129 float staticDim = TypedValue.complexToDimension(staticValue.data, res.getDisplayMetrics()); in testConfigChangeMultipleResources()
130 float changingDim = TypedValue.complexToDimension(changingValue.data, in testConfigChangeMultipleResources()
157 TypedValue[] staticValues = new TypedValue[]{new TypedValue(), new TypedValue()}; in testConfigChangeMultipleThemes()
[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/support/v7/mediarouter/src/android/support/v7/app/
DMediaRouterThemeHelper.java25 import android.util.TypedValue;
76 TypedValue value = new TypedValue(); in getThemeResource()
81 TypedValue value = new TypedValue(); in getDisabledAlpha()
141 TypedValue value = new TypedValue(); in isLightTheme()
157 TypedValue value = new TypedValue(); in getThemeColor()
DMediaRouteDialogHelper.java26 import android.util.TypedValue;
46 TypedValue value = new TypedValue(); in getDialogWidth()
49 if (value.type == TypedValue.TYPE_DIMENSION) { in getDialogWidth()
51 } else if (value.type == TypedValue.TYPE_FRACTION) { in getDialogWidth()
/frameworks/base/tools/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/support/v7/appcompat/src/android/support/v7/content/res/
DAppCompatResources.java32 import android.util.TypedValue;
43 private static final ThreadLocal<TypedValue> TL_TYPED_VALUE = new ThreadLocal<>();
139 final TypedValue value = getTypedValue(); in isColorInt()
142 return value.type >= TypedValue.TYPE_FIRST_COLOR_INT in isColorInt()
143 && value.type <= TypedValue.TYPE_LAST_COLOR_INT; in isColorInt()
147 private static TypedValue getTypedValue() { in getTypedValue()
148 TypedValue tv = TL_TYPED_VALUE.get(); in getTypedValue()
150 tv = new TypedValue(); in getTypedValue()
/frameworks/base/services/core/java/com/android/server/wm/
DWatermark.java30 import android.util.TypedValue;
87 TypedValue.COMPLEX_UNIT_DIP, 20, dm); in Watermark()
98 TypedValue.COMPLEX_UNIT_PX, mTextWidth*2, dm); in Watermark()
100 TypedValue.COMPLEX_UNIT_PX, mTextHeight*3, dm); in Watermark()
102 TypedValue.COMPLEX_UNIT_PX, 0xb0000000, dm); in Watermark()
104 TypedValue.COMPLEX_UNIT_PX, 0x60ffffff, dm); in Watermark()
106 TypedValue.COMPLEX_UNIT_PX, 7, dm); in Watermark()
108 TypedValue.COMPLEX_UNIT_PX, 0, dm); in Watermark()
110 TypedValue.COMPLEX_UNIT_PX, 0, dm); in Watermark()
/frameworks/base/core/java/android/util/
DTypedValue.java26 public class TypedValue { class
207 1.0f / (1<<TypedValue.COMPLEX_MANTISSA_SHIFT);
225 return (complex&(TypedValue.COMPLEX_MANTISSA_MASK in complexToFloat()
226 <<TypedValue.COMPLEX_MANTISSA_SHIFT)) in complexToFloat()
227 * RADIX_MULTS[(complex>>TypedValue.COMPLEX_RADIX_SHIFT) in complexToFloat()
228 & TypedValue.COMPLEX_RADIX_MASK]; in complexToFloat()
329 return COMPLEX_UNIT_MASK & (data>>TypedValue.COMPLEX_UNIT_SHIFT); in getComplexUnit()
491 public void setTo(TypedValue other) in setTo()
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/
DDisplay.java22 import android.util.TypedValue;
49 TypedValue tv = new TypedValue(); in actionBarHeight()
51 actionBarHeight = TypedValue.complexToDimensionPixelSize(tv.data, in actionBarHeight()
DListItem.java22 import android.util.TypedValue;
41 TypedValue color = new TypedValue(); in onFocusChanged()
/frameworks/base/tools/layoutlib/bridge/src/android/content/res/
DBridgeTypedArray.java36 import android.util.TypedValue;
44 import static android.util.TypedValue.TYPE_ATTRIBUTE;
45 import static android.util.TypedValue.TYPE_DIMENSION;
46 import static android.util.TypedValue.TYPE_FLOAT;
47 import static android.util.TypedValue.TYPE_INT_BOOLEAN;
48 import static android.util.TypedValue.TYPE_INT_COLOR_ARGB4;
49 import static android.util.TypedValue.TYPE_INT_COLOR_ARGB8;
50 import static android.util.TypedValue.TYPE_INT_COLOR_RGB4;
51 import static android.util.TypedValue.TYPE_INT_COLOR_RGB8;
52 import static android.util.TypedValue.TYPE_INT_DEC;
[all …]
/frameworks/support/v7/appcompat/tests/src/android/support/v7/app/
DLayoutInflaterFactoryTestCase.java35 import android.util.TypedValue;
186 final TypedValue colorAccentValue = getColorAccentValue(viewContext.getTheme()); in assertThemedContext()
187 assertTrue(colorAccentValue.type >= TypedValue.TYPE_FIRST_COLOR_INT in assertThemedContext()
188 && colorAccentValue.type <= TypedValue.TYPE_LAST_COLOR_INT); in assertThemedContext()
193 private static TypedValue getColorAccentValue(final Resources.Theme theme) { in getColorAccentValue()
194 final TypedValue typedValue = new TypedValue(); in getColorAccentValue()
/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()
/frameworks/support/design/src/android/support/design/widget/
DBottomSheetDialog.java27 import android.util.TypedValue;
109 TypedValue value = new TypedValue(); in shouldWindowCloseOnTouchOutside()
121 TypedValue outValue = new TypedValue(); in getThemeResId()
/frameworks/base/core/java/android/app/
DTimePickerDialog.java23 import android.util.TypedValue;
84 final TypedValue outValue = new TypedValue(); in resolveDialogTheme()
114 final TypedValue outValue = new TypedValue(); in TimePickerDialog()
/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 …]

1234567