共用方式為


Resources.Theme Class

Definition

This class holds the current attribute values for a particular theme.

[Android.Runtime.Register("android/content/res/Resources$Theme", DoNotGenerateAcw=true)]
public sealed class Resources.Theme : Java.Lang.Object
[<Android.Runtime.Register("android/content/res/Resources$Theme", DoNotGenerateAcw=true)>]
type Resources.Theme = class
    inherit Object
Inheritance
Resources.Theme
Attributes

Remarks

This class holds the current attribute values for a particular theme. In other words, a Theme is a set of values for resource attributes; these are used in conjunction with TypedArray to resolve the final value for an attribute.

The Theme's attributes come into play in two ways: (1) a styled attribute can explicit reference a value in the theme through the "?themeAttribute" syntax; (2) if no value has been defined for a particular styled attribute, as a last resort we will try to find that attribute's value in the Theme.

You will normally use the #obtainStyledAttributes APIs to retrieve XML attributes with style and theme information applied.

Java documentation for android.content.res.Resources.Theme.

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

ChangingConfigurations

Returns a bit mask of configuration changes that will impact this theme (and thus require completely reloading it).

Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
Resources

Returns the resources to which this theme belongs.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)

Methods

ApplyStyle(Int32, Boolean)

Place new attribute values into the theme.

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Dump(LogPriority, String, String)

Print contents of this theme out to the log.

Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetAttributeResolutionStack(Int32, Int32, Int32)

Returns the ordered list of resource ID that are considered when resolving attribute values when making an equivalent call to #obtainStyledAttributes(AttributeSet, int[], int, int) .

GetDrawable(Int32)

Return a drawable object associated with a particular resource ID and styled for the Theme.

GetExplicitStyle(IAttributeSet)

Returns the resource ID for the style specified using style="..." in the AttributeSet's backing XML element or Resources#ID_NULL otherwise if not specified or otherwise not applicable.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
ObtainStyledAttributes(IAttributeSet, Int32[], Int32, Int32)

Return a TypedArray holding the attribute values in <var>set</var> that are listed in <var>attrs</var>.

ObtainStyledAttributes(Int32, Int32[])

Return a TypedArray holding the values defined by the style resource <var>resid</var> which are listed in <var>attrs</var>.

ObtainStyledAttributes(Int32[])

Return a TypedArray holding the values defined by <var>Theme</var> which are listed in <var>attrs</var>.

Rebase()

Rebases the theme against the parent Resource object's current configuration by re-applying the styles passed to #applyStyle(int, boolean).

ResolveAttribute(Int32, TypedValue, Boolean)

Retrieve the value of an attribute in the Theme.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetTo(Resources+Theme)

Set this theme to hold the same contents as the theme other.

ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to