Compartir a través de


IAttributeSet Interface

Definition

A collection of attributes, as found associated with a tag in an XML document.

[Android.Runtime.Register("android/util/AttributeSet", "", "Android.Util.IAttributeSetInvoker")]
public interface IAttributeSet : Android.Runtime.IJavaObject, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/util/AttributeSet", "", "Android.Util.IAttributeSetInvoker")>]
type IAttributeSet = interface
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Derived
Attributes
Implements

Remarks

A collection of attributes, as found associated with a tag in an XML document. Often you will not want to use this interface directly, instead passing it to android.content.res.Resources.Theme#obtainStyledAttributes(AttributeSet, int[], int, int) Resources.Theme.obtainStyledAttributes() which will take care of parsing the attributes for you. In particular, the Resources API will convert resource references (attribute values such as "

Java documentation for android.util.AttributeSet.

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.

Properties

AttributeCount

Returns the number of attributes available in the set.

ClassAttribute

Return the value of the "class" attribute or null if there is not one.

Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
IdAttribute

Return the value of the "id" attribute or null if there is not one.

JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)
PositionDescription

Returns a description of the current position of the attribute set.

StyleAttribute

Return the value of the "style" attribute or 0 if there is not one.

Methods

Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
GetAttributeBooleanValue(Int32, Boolean)

Return the boolean value of attribute at 'index'.

GetAttributeBooleanValue(String, String, Boolean)

Return the boolean value of 'attribute'.

GetAttributeFloatValue(Int32, Single)

Return the float value of attribute at 'index'.

GetAttributeFloatValue(String, String, Single)

Return the float value of 'attribute'.

GetAttributeIntValue(Int32, Int32)

Return the integer value of attribute at 'index'.

GetAttributeIntValue(String, String, Int32)

Return the integer value of 'attribute'.

GetAttributeListValue(Int32, String[], Int32)

Return the index of the value of attribute at 'index' in the list 'options'.

GetAttributeListValue(String, String, String[], Int32)

Return the index of the value of 'attribute' in the list 'options'.

GetAttributeName(Int32)

Returns the name of the specified attribute.

GetAttributeNameResource(Int32)

Return the resource ID associated with the given attribute name.

GetAttributeNamespace(Int32)

Returns the namespace of the specified attribute.

GetAttributeResourceValue(Int32, Int32)

Return the value of attribute at 'index' as a resource identifier.

GetAttributeResourceValue(String, String, Int32)

Return the value of 'attribute' as a resource identifier.

GetAttributeUnsignedIntValue(Int32, Int32)

Return the integer value of attribute at 'index' that is formatted as an unsigned value.

GetAttributeUnsignedIntValue(String, String, Int32)

Return the boolean value of 'attribute' that is formatted as an unsigned value.

GetAttributeValue(Int32)

Returns the value of the specified attribute as a string representation.

GetAttributeValue(String, String)

Returns the value of the specified attribute as a string representation.

GetIdAttributeResourceValue(Int32)

Return the integer value of the "id" attribute or defaultValue if there is none.

SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to