MockResources Class

Definition

A mock android.content.res.Resources class.

[Android.Runtime.Register("android/test/mock/MockResources", DoNotGenerateAcw=true)]
public class MockResources : Android.Content.Res.Resources
[<Android.Runtime.Register("android/test/mock/MockResources", DoNotGenerateAcw=true)>]
type MockResources = class
    inherit Resources
Inheritance
MockResources
Attributes

Remarks

A mock android.content.res.Resources class. All methods are non-functional and throw java.lang.UnsupportedOperationException. Override it to provide the operations that you need.

This member is deprecated. Use a mocking framework like Mockito. New tests should be written using the Android Testing Support Library.

Java documentation for android.test.mock.MockResources.

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.

Constructors

MockResources()
MockResources(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Fields

IdNull

The null resource ID.

(Inherited from Resources)

Properties

Assets

Retrieve underlying AssetManager storage for these resources.

(Inherited from Resources)
Class

Returns the runtime class of this Object.

(Inherited from Object)
Configuration

Return the current configuration that is in effect for this resource object.

(Inherited from Resources)
DisplayMetrics

Returns the current display metrics that are in effect for this resource object.

(Inherited from Resources)
Handle

The handle to the underlying Android instance.

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

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

ThresholdType

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

Methods

AddLoaders(ResourcesLoader[])

Adds a loader to the list of loaders.

(Inherited from Resources)
Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

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

(Inherited from Object)
FinishPreloading()

Called by zygote when it is done preloading resources, to change back to normal Resources operation.

(Inherited from Resources)
FlushLayoutCache()

Call this to remove all cached loaded layout resources from the Resources object.

(Inherited from Resources)
GetAnimation(Int32)

Return an XmlResourceParser through which you can read an animation description for the given resource ID.

(Inherited from Resources)
GetBoolean(Int32)

Return a boolean associated with a particular resource ID.

(Inherited from Resources)
GetColor(Int32)

Returns a color integer associated with a particular resource ID.

(Inherited from Resources)
GetColor(Int32, Resources+Theme)

Returns a color integer associated with a particular resource ID.

(Inherited from Resources)
GetColorStateList(Int32)

Returns a color state list associated with a particular resource ID.

(Inherited from Resources)
GetColorStateList(Int32, Resources+Theme)

Returns a color state list associated with a particular resource ID.

(Inherited from Resources)
GetDimension(Int32)

Retrieve a dimensional for a particular resource ID.

(Inherited from Resources)
GetDimensionPixelOffset(Int32)

Retrieve a dimensional for a particular resource ID for use as an offset in raw pixels.

(Inherited from Resources)
GetDimensionPixelSize(Int32)

Retrieve a dimensional for a particular resource ID for use as a size in raw pixels.

(Inherited from Resources)
GetDrawable(Int32)

Return a drawable object associated with a particular resource ID.

(Inherited from Resources)
GetDrawable(Int32, Resources+Theme)

Return a drawable object associated with a particular resource ID.

(Inherited from Resources)
GetDrawableForDensity(Int32, Int32)

Return a drawable object associated with a particular resource ID for the given screen density in DPI.

(Inherited from Resources)
GetDrawableForDensity(Int32, Int32, Resources+Theme)

Return a drawable object associated with a particular resource ID for the given screen density in DPI.

(Inherited from Resources)
GetFloat(Int32)

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

(Inherited from Resources)
GetFont(Int32)

Return the Typeface value associated with a particular resource ID.

(Inherited from Resources)
GetFraction(Int32, Int32, Int32)

Retrieve a fractional unit for a particular resource ID.

(Inherited from Resources)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetIdentifier(String, String, String)

Return a resource identifier for the given resource name.

(Inherited from Resources)
GetIntArray(Int32)

Return the int array associated with a particular resource ID.

(Inherited from Resources)
GetInteger(Int32)

Return an integer associated with a particular resource ID.

(Inherited from Resources)
GetLayout(Int32)

Return an XmlResourceParser through which you can read a view layout description for the given resource ID.

(Inherited from Resources)
GetMovie(Int32)

Return a movie object associated with the particular resource ID.

(Inherited from Resources)
GetQuantityString(Int32, Int32)

Returns the string necessary for grammatically correct pluralization of the given resource ID for the given quantity.

(Inherited from Resources)
GetQuantityString(Int32, Int32, Object[])

Returns the string necessary for grammatically correct pluralization of the given resource ID for the given quantity.

(Inherited from Resources)
GetQuantityText(Int32, Int32)

Returns the character sequence necessary for grammatically correct pluralization of the given resource ID for the given quantity.

(Inherited from Resources)
GetQuantityTextFormatted(Int32, Int32)

Returns the character sequence necessary for grammatically correct pluralization of the given resource ID for the given quantity.

(Inherited from Resources)
GetResourceEntryName(Int32)

Return the entry name for a given resource identifier.

(Inherited from Resources)
GetResourceName(Int32)

Return the full name for a given resource identifier.

(Inherited from Resources)
GetResourcePackageName(Int32)

Return the package name for a given resource identifier.

(Inherited from Resources)
GetResourceTypeName(Int32)

Return the type name for a given resource identifier.

(Inherited from Resources)
GetString(Int32)

Return the string value associated with a particular resource ID.

(Inherited from Resources)
GetString(Int32, Object[]) (Inherited from Resources)
GetStringArray(Int32)

Return the string array associated with a particular resource ID.

(Inherited from Resources)
GetText(Int32)

Return the string value associated with a particular resource ID.

(Inherited from Resources)
GetText(Int32, String)

Return the string value associated with a particular resource ID.

(Inherited from Resources)
GetTextArray(Int32)

Return the styled text array associated with a particular resource ID.

(Inherited from Resources)
GetTextArrayFormatted(Int32)

Return the styled text array associated with a particular resource ID.

(Inherited from Resources)
GetTextFormatted(Int32)

Return the string value associated with a particular resource ID.

(Inherited from Resources)
GetTextFormatted(Int32, ICharSequence)

Return the string value associated with a particular resource ID.

(Inherited from Resources)
GetValue(Int32, TypedValue, Boolean)

Return the raw data associated with a particular resource ID.

(Inherited from Resources)
GetValue(String, TypedValue, Boolean)

Return the raw data associated with a particular resource ID.

(Inherited from Resources)
GetValueForDensity(Int32, Int32, TypedValue, Boolean)

Get the raw value associated with a resource with associated density.

(Inherited from Resources)
GetXml(Int32)

Return an XmlResourceParser through which you can read a generic XML resource for the given resource ID.

(Inherited from Resources)
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)
NewTheme()

Generate a new Theme object for this set of Resources.

(Inherited from Resources)
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)
ObtainAttributes(IAttributeSet, Int32[])

Retrieve a set of basic attribute values from an AttributeSet, not performing styling of them using a theme and/or style resources.

(Inherited from Resources)
ObtainTypedArray(Int32)

Return an array of heterogeneous values.

(Inherited from Resources)
OpenRawResource(Int32)

Open a data stream for reading a raw resource.

(Inherited from Resources)
OpenRawResource(Int32, TypedValue)

Open a data stream for reading a raw resource.

(Inherited from Resources)
OpenRawResourceFd(Int32)

Open a file descriptor for reading a raw resource.

(Inherited from Resources)
ParseBundleExtra(String, IAttributeSet, Bundle)

Parse a name/value pair out of an XML tag holding that data.

(Inherited from Resources)
ParseBundleExtras(XmlReader, Bundle)

Parse a series of android.R.styleable#Extra &lt;extra&gt; tags from an XML file.

(Inherited from Resources)
RemoveLoaders(ResourcesLoader[])

Removes loaders from the list of loaders.

(Inherited from Resources)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

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

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
UpdateConfiguration(Configuration, DisplayMetrics)

Store the newly updated configuration.

(Inherited from Resources)
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)

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, 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)

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