code: public static TypedValue getValue(String attribute, String value, boolean requireUnit) {
      if (parseFloatAttribute(attribute, value, mValue, requireUnit)) {
        return mValue;
      }
  
      return null;
    }
docs: Returns the raw value from the given attribute float-type value string.
  This object is only valid until the next call on to {@link ResourceHelper2}.
  
  @param attribute Attribute name.
  @param value Attribute value.
  @param requireUnit whether the value is expected to contain a unit.
  @return The typed value.