FabricatedOverlay.SetResourceValue Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| SetResourceValue(String, AssetFileDescriptor, String) |
Sets the resource value in the fabricated overlay for the file descriptor type with the configuration. |
| SetResourceValue(String, ParcelFileDescriptor, String) |
Sets the resource value in the fabricated overlay for the file descriptor type with the configuration. |
| SetResourceValue(String, Single, String) |
Sets the resource value in the fabricated overlay for the float type with the given configuration. |
| SetResourceValue(String, Int32, Int32, String) |
Sets the resource value in the fabricated overlay for the integer-like types with the configuration. |
| SetResourceValue(String, Int32, String, String) |
Sets the resource value in the fabricated overlay for the string-like type with the configuration. |
| SetResourceValue(String, Single, Int32, String) |
Sets the resource value in the fabricated overlay for the dimension type with the given configuration. |
SetResourceValue(String, AssetFileDescriptor, String)
Sets the resource value in the fabricated overlay for the file descriptor type with the configuration.
[Android.Runtime.Register("setResourceValue", "(Ljava/lang/String;Landroid/content/res/AssetFileDescriptor;Ljava/lang/String;)V", "GetSetResourceValue_Ljava_lang_String_Landroid_content_res_AssetFileDescriptor_Ljava_lang_String_Handler", ApiSince=35)]
public virtual void SetResourceValue(string resourceName, Android.Content.Res.AssetFileDescriptor value, string? configuration);
[<Android.Runtime.Register("setResourceValue", "(Ljava/lang/String;Landroid/content/res/AssetFileDescriptor;Ljava/lang/String;)V", "GetSetResourceValue_Ljava_lang_String_Landroid_content_res_AssetFileDescriptor_Ljava_lang_String_Handler", ApiSince=35)>]
abstract member SetResourceValue : string * Android.Content.Res.AssetFileDescriptor * string -> unit
override this.SetResourceValue : string * Android.Content.Res.AssetFileDescriptor * string -> unit
Parameters
- resourceName
- String
name of the target resource to overlay (in the form [package]:type/entry)
- value
- AssetFileDescriptor
the file descriptor whose contents are the value of the frro
- configuration
- String
The string representation of the config this overlay is enabled for
- Attributes
Remarks
Sets the resource value in the fabricated overlay for the file descriptor type with the configuration.
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
SetResourceValue(String, ParcelFileDescriptor, String)
Sets the resource value in the fabricated overlay for the file descriptor type with the configuration.
[Android.Runtime.Register("setResourceValue", "(Ljava/lang/String;Landroid/os/ParcelFileDescriptor;Ljava/lang/String;)V", "GetSetResourceValue_Ljava_lang_String_Landroid_os_ParcelFileDescriptor_Ljava_lang_String_Handler", ApiSince=34)]
public virtual void SetResourceValue(string resourceName, Android.OS.ParcelFileDescriptor value, string? configuration);
[<Android.Runtime.Register("setResourceValue", "(Ljava/lang/String;Landroid/os/ParcelFileDescriptor;Ljava/lang/String;)V", "GetSetResourceValue_Ljava_lang_String_Landroid_os_ParcelFileDescriptor_Ljava_lang_String_Handler", ApiSince=34)>]
abstract member SetResourceValue : string * Android.OS.ParcelFileDescriptor * string -> unit
override this.SetResourceValue : string * Android.OS.ParcelFileDescriptor * string -> unit
Parameters
- resourceName
- String
name of the target resource to overlay (in the form [package]:type/entry)
- value
- ParcelFileDescriptor
the file descriptor whose contents are the value of the frro
- configuration
- String
The string representation of the config this overlay is enabled for
- Attributes
Remarks
Sets the resource value in the fabricated overlay for the file descriptor type with the configuration.
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
SetResourceValue(String, Single, String)
Sets the resource value in the fabricated overlay for the float type with the given configuration.
[Android.Runtime.Register("setResourceValue", "(Ljava/lang/String;FLjava/lang/String;)V", "GetSetResourceValue_Ljava_lang_String_FLjava_lang_String_Handler", ApiSince=36)]
public virtual void SetResourceValue(string resourceName, float value, string? configuration);
[<Android.Runtime.Register("setResourceValue", "(Ljava/lang/String;FLjava/lang/String;)V", "GetSetResourceValue_Ljava_lang_String_FLjava_lang_String_Handler", ApiSince=36)>]
abstract member SetResourceValue : string * single * string -> unit
override this.SetResourceValue : string * single * string -> unit
Parameters
- resourceName
- String
name of the target resource to overlay (in the form [package]:type/entry)
- value
- Single
the float representing the new value
- configuration
- String
The string representation of the config this overlay is enabled for
- Attributes
Remarks
Sets the resource value in the fabricated overlay for the float type with the given configuration.
This can be used to overlay unitless float resources of the following format.
<item name="foo" format="float" type="dimen">0.015</item>
For overlaying dimension resources with units, use #setResourceValue(String, float, int, String) instead.
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
SetResourceValue(String, Int32, Int32, String)
Sets the resource value in the fabricated overlay for the integer-like types with the configuration.
[Android.Runtime.Register("setResourceValue", "(Ljava/lang/String;IILjava/lang/String;)V", "GetSetResourceValue_Ljava_lang_String_IILjava_lang_String_Handler", ApiSince=34)]
public virtual void SetResourceValue(string resourceName, int dataType, int value, string? configuration);
[<Android.Runtime.Register("setResourceValue", "(Ljava/lang/String;IILjava/lang/String;)V", "GetSetResourceValue_Ljava_lang_String_IILjava_lang_String_Handler", ApiSince=34)>]
abstract member SetResourceValue : string * int * int * string -> unit
override this.SetResourceValue : string * int * int * string -> unit
Parameters
- resourceName
- String
name of the target resource to overlay (in the form [package]:type/entry)
- dataType
- Int32
the data type of the new value
- value
- Int32
the integer representing the new value
- configuration
- String
The string representation of the config this overlay is enabled for
- Attributes
Remarks
Sets the resource value in the fabricated overlay for the integer-like types with the configuration.
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
SetResourceValue(String, Int32, String, String)
Sets the resource value in the fabricated overlay for the string-like type with the configuration.
[Android.Runtime.Register("setResourceValue", "(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V", "GetSetResourceValue_Ljava_lang_String_ILjava_lang_String_Ljava_lang_String_Handler", ApiSince=34)]
public virtual void SetResourceValue(string resourceName, int dataType, string value, string? configuration);
[<Android.Runtime.Register("setResourceValue", "(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V", "GetSetResourceValue_Ljava_lang_String_ILjava_lang_String_Ljava_lang_String_Handler", ApiSince=34)>]
abstract member SetResourceValue : string * int * string * string -> unit
override this.SetResourceValue : string * int * string * string -> unit
Parameters
- resourceName
- String
name of the target resource to overlay (in the form [package]:type/entry)
- dataType
- Int32
the data type of the new value
- value
- String
the string representing the new value
- configuration
- String
The string representation of the config this overlay is enabled for
- Attributes
Remarks
Sets the resource value in the fabricated overlay for the string-like type with the configuration.
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
SetResourceValue(String, Single, Int32, String)
Sets the resource value in the fabricated overlay for the dimension type with the given configuration.
[Android.Runtime.Register("setResourceValue", "(Ljava/lang/String;FILjava/lang/String;)V", "GetSetResourceValue_Ljava_lang_String_FILjava_lang_String_Handler", ApiSince=36)]
public virtual void SetResourceValue(string resourceName, float dimensionValue, int dimensionUnit, string? configuration);
[<Android.Runtime.Register("setResourceValue", "(Ljava/lang/String;FILjava/lang/String;)V", "GetSetResourceValue_Ljava_lang_String_FILjava_lang_String_Handler", ApiSince=36)>]
abstract member SetResourceValue : string * single * int * string -> unit
override this.SetResourceValue : string * single * int * string -> unit
Parameters
- resourceName
- String
name of the target resource to overlay (in the form [package]:type/entry)
- dimensionValue
- Single
the float representing the dimension value
- dimensionUnit
- Int32
the integer representing the dimension unit
- configuration
- String
The string representation of the config this overlay is enabled for
- Attributes
Remarks
Sets the resource value in the fabricated overlay for the dimension type with the given configuration.
This can be used to overlay dimension resources of the following formats.
<dimen name="foo">10dp</dimen>
<dimen name="foo">10sp</dimen>
<dimen name="foo">10px</dimen>
<dimen name="foo">10mm</dimen>
<dimen name="foo">10in</dimen>
<dimen name="foo">10pt</dimen>
For overlaying unitless dimension resources, use #setResourceValue(String, float, String) instead.
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.