共用方式為


ClassLoader.FindResource(String) Method

Definition

Finds the resource with the given name.

[Android.Runtime.Register("findResource", "(Ljava/lang/String;)Ljava/net/URL;", "GetFindResource_Ljava_lang_String_Handler")]
protected virtual Java.Net.URL? FindResource (string? name);
[<Android.Runtime.Register("findResource", "(Ljava/lang/String;)Ljava/net/URL;", "GetFindResource_Ljava_lang_String_Handler")>]
abstract member FindResource : string -> Java.Net.URL
override this.FindResource : string -> Java.Net.URL

Parameters

name
String

The resource name

Returns

URL

A URL object for reading the resource, or null if the resource could not be found

Attributes

Remarks

Finds the resource with the given name. Class loader implementations should override this method to specify where to find resources.

Added in 1.2.

Java documentation for java.lang.ClassLoader.findResource(java.lang.String).

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