共用方式為


IAttributeSet.GetAttributeFloatValue Method

Definition

Overloads

GetAttributeFloatValue(Int32, Single)

Return the float value of attribute at 'index'.

GetAttributeFloatValue(String, String, Single)

Return the float value of 'attribute'.

GetAttributeFloatValue(Int32, Single)

Return the float value of attribute at 'index'.

[Android.Runtime.Register("getAttributeFloatValue", "(IF)F", "GetGetAttributeFloatValue_IFHandler:Android.Util.IAttributeSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public float GetAttributeFloatValue (int index, float defaultValue);
[<Android.Runtime.Register("getAttributeFloatValue", "(IF)F", "GetGetAttributeFloatValue_IFHandler:Android.Util.IAttributeSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetAttributeFloatValue : int * single -> single

Parameters

index
Int32

Index of the desired attribute, 0...count-1.

defaultValue
Single

What to return if the attribute isn't found.

Returns

Resulting value.

Attributes

Remarks

Return the float value of attribute at 'index'.

Java documentation for android.util.AttributeSet.getAttributeFloatValue(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.

Applies to

GetAttributeFloatValue(String, String, Single)

Return the float value of 'attribute'.

[Android.Runtime.Register("getAttributeFloatValue", "(Ljava/lang/String;Ljava/lang/String;F)F", "GetGetAttributeFloatValue_Ljava_lang_String_Ljava_lang_String_FHandler:Android.Util.IAttributeSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public float GetAttributeFloatValue (string? namespace, string? attribute, float defaultValue);
[<Android.Runtime.Register("getAttributeFloatValue", "(Ljava/lang/String;Ljava/lang/String;F)F", "GetGetAttributeFloatValue_Ljava_lang_String_Ljava_lang_String_FHandler:Android.Util.IAttributeSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetAttributeFloatValue : string * string * single -> single

Parameters

namespace
String

Namespace of attribute to retrieve.

attribute
String

The attribute to retrieve.

defaultValue
Single

What to return if the attribute isn't found.

Returns

Resulting value.

Attributes

Remarks

Return the float value of 'attribute'.

Java documentation for android.util.AttributeSet.getAttributeFloatValue(java.lang.String, 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