共用方式為


Resources.GetFloat(Int32) Method

Definition

Retrieve a floating-point value for a particular resource ID.

[Android.Runtime.Register("getFloat", "(I)F", "GetGetFloat_IHandler", ApiSince=29)]
public virtual float GetFloat (int id);
[<Android.Runtime.Register("getFloat", "(I)F", "GetGetFloat_IHandler", ApiSince=29)>]
abstract member GetFloat : int -> single
override this.GetFloat : int -> single

Parameters

id
Int32

The desired resource identifier, as generated by the aapt tool. This integer encodes the package, type, and resource entry. The value 0 is an invalid identifier.

Returns

Returns the floating-point value contained in the resource.

Attributes

Remarks

Retrieve a floating-point value for a particular resource ID.

Java documentation for android.content.res.Resources.getFloat(int).

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