TypedValue outValue = new TypedValue(); getResources().getValue(R.dimen.text_line_spacing, outValue, true); float value = outValue.getFloat();
TypedValue typedValue = new TypedValue(); getResources().getValue(R.dimen.my_float_value, typedValue, true); float myFloatValue = typedValue.getFloat();
TypedValue out = new TypedValue(); context.getResources().getValue(R.raw.float_resource, out, true); float floatResource = out.getFloat();
TypedValue tempVal = new TypedValue(); getResources().getValue(R.vals.some_decimal, tempVal, true); float some_decimal = tempVal.getFloat();
TypedValue typedValue = new TypedValue(); getResources().getValue(R.dimen.my_float_value, typedValue, true); float myFloatValue = typedValue.getFloat();
public FloatingHintEditText(Context context) { super(context); init(); } public FloatingHintEditText(Context context, AttributeSet attrs) { super(context, attrs); init(); } public FloatingHintEditText(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(); } private void init() { TypedValue typedValue = new TypedValue(); getResources().getValue(R.dimen.floatinghintedittext_hint_scale, typedValue, true); mHintScale = typedValue.getFloat(); mAnimationSteps = getResources().getInteger(R.dimen.floatinghintedittext_animation_steps); mHintColors = getHintTextColors(); mWasEmpty = TextUtils.isEmpty(getText()); }