次の方法で共有


Bundle.GetFloat Method

Definition

Overloads

GetFloat(String)

Returns the value associated with the given key, or 0.

GetFloat(String, Single)

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.

GetFloat(String)

Returns the value associated with the given key, or 0.

[Android.Runtime.Register("getFloat", "(Ljava/lang/String;)F", "")]
public float GetFloat (string? key);
[<Android.Runtime.Register("getFloat", "(Ljava/lang/String;)F", "")>]
member this.GetFloat : string -> single

Parameters

key
String

a String

Returns

a float value

Attributes

Remarks

Returns the value associated with the given key, or 0.0f if no mapping of the desired type exists for the given key.

Java documentation for android.os.Bundle.getFloat(java.lang.String).

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.

Applies to

GetFloat(String, Single)

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.

[Android.Runtime.Register("getFloat", "(Ljava/lang/String;F)F", "")]
public float GetFloat (string? key, float defaultValue);
[<Android.Runtime.Register("getFloat", "(Ljava/lang/String;F)F", "")>]
member this.GetFloat : string * single -> single

Parameters

key
String

a String

defaultValue
Single

Value to return if key does not exist

Returns

a float value

Attributes

Remarks

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.

Java documentation for android.os.Bundle.getFloat(java.lang.String, 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.

Applies to