<resources>
<item name="float1" format="float" type="dimen">1.0</item>
<item name="float2" format="float" type="dimen">0.95</item>
</resources>
final TypedValue typedValue = new TypedValue();
getResources().getValue(R.dimen.flaot1, typedValue, true);
final float value1 = typedValue.getFloat();
getResources().getValue(R.dimen.flaot2, typedValue, true);
final float value2 = typedValue.getFloat();