TypedArray.GetFloat(Int32, Single) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieve the float value for the attribute at <var>index</var>.
[Android.Runtime.Register("getFloat", "(IF)F", "GetGetFloat_IFHandler")]
public virtual float GetFloat (int index, float defValue);
[<Android.Runtime.Register("getFloat", "(IF)F", "GetGetFloat_IFHandler")>]
abstract member GetFloat : int * single -> single
override this.GetFloat : int * single -> single
Parameters
- index
- Int32
Index of attribute to retrieve.
- defValue
- Single
Returns
Attribute float value, or defValue if the attribute was not defined or could not be coerced to a float.
- Attributes
Exceptions
if the TypedArray has already been recycled.
Remarks
Retrieve the float value for the attribute at <var>index</var>.
If the attribute is not a float or an integer, this method will attempt to coerce it to a float using Float#parseFloat(String)
.
Java documentation for android.content.res.TypedArray.getFloat(int, float)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.