Lines Matching refs:resource
177 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
181 | 9001009 | Failed to access the system resource.which is not mapped to application sandbox, This …
320 |[_Resource](resource.md#resource-1)|表示资源信息。|
330 > - 资源文件在工程的resources目录中定义,通过resId、resName、resource对象等可以获取对应的字符串、字符串数组等,resId可通过`$r(资源地址).id`的方式获取,…
332 > - resource对象适用于多工程应用内的跨包访问,因resource对象需创建对应module的context获取资源,故相比于入参为resId、resName的接口耗时长。
334 > - 单HAP包和跨HAP/HSP包资源的访问方式具体请参考[资源访问](../../quick-start/resource-categories-and-access.md#资源访问)。
362 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
367 | 9001001 | Invalid resource ID. |
368 | 9001002 | No matching resource is found based on the resource ID. |
369 | 9001006 | The resource is referenced cyclically. |
408 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
413 | 9001001 | Invalid resource ID. |
414 | 9001002 | No matching resource is found based on the resource ID. |
415 | 9001006 | The resource is referenced cyclically. |
416 | 9001007 | Failed to format the resource obtained based on the resource ID. |
433 getStringSync(resource: Resource): string
435 用户获取指定resource对象对应的字符串,使用同步方式返回字符串。
447 | resource | [Resource](#resource9) | 是 | 资源信息。 |
453 | string | resource对象对应的字符串。 |
457 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
462 | 9001001 | Invalid resource ID. |
463 | 9001002 | No matching resource is found based on the resource ID. |
464 | 9001006 | The resource is referenced cyclically. |
471 let resource: resourceManager.Resource = {
477 this.context.resourceManager.getStringSync(resource);
487 getStringSync(resource: Resource, ...args: Array<string | number>): string
489 用户获取指定resource对象对应的字符串,根据args参数进行格式化,使用同步方式返回相应字符串。
501 | resource | [Resource](#resource9) | 是 | 资源信息。 |
508 | string | resource对象对应的格式化字符串。|
511 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
516 | 9001001 | Invalid resource ID. |
517 | 9001002 | No matching resource is found based on the resource ID. |
518 | 9001006 | The resource is referenced cyclically. |
519 | 9001007 | Failed to format the resource obtained based on the resource ID. |
526 let resource: resourceManager.Resource = {
532 this.context.resourceManager.getStringSync(resource, "format string", 10, 98.78);
564 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
569 | 9001003 | Invalid resource name. |
570 | 9001004 | No matching resource is found based on the resource name. |
571 | 9001006 | The resource is referenced cyclically. |
611 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
616 | 9001003 | Invalid resource name. |
617 | 9001004 | No matching resource is found based on the resource name. |
618 | 9001006 | The resource is referenced cyclically. |
619 | 9001008 | Failed to format the resource obtained based on the resource Name. |
653 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
659 | 9001002 | No matching resource is found based on the resource ID. |
660 | 9001006 | The resource is referenced cyclically. |
705 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
710 | 9001001 | Invalid resource ID. |
711 | 9001002 | No matching resource is found based on the resource ID. |
712 | 9001006 | The resource is referenced cyclically. |
733 getStringValue(resource: Resource, callback: AsyncCallback<string>): void
735 用户获取指定resource对象对应的字符串,使用callback异步回调。
747 | resource | [Resource](#resource9) | 是 | 资源信息。 |
752 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
757 | 9001001 | Invalid resource ID. |
758 | 9001002 | No matching resource is found based on the resource ID. |
759 | 9001006 | The resource is referenced cyclically. |
766 let resource: resourceManager.Resource = {
772 this.context.resourceManager.getStringValue(resource, (error: BusinessError, value: string) => {
788 getStringValue(resource: Resource): Promise<string>
790 用户获取指定resource对象对应的字符串,使用Promise异步回调。
802 | resource | [Resource](#resource9) | 是 | 资源信息。 |
808 | Promise<string> | resource对象对应的字符串。 |
812 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
817 | 9001001 | Invalid resource ID. |
818 | 9001002 | No matching resource is found based on the resource ID. |
819 | 9001006 | The resource is referenced cyclically. |
826 let resource: resourceManager.Resource = {
832 this.context.resourceManager.getStringValue(resource).then((value: string) => {
862 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
867 | 9001003 | Invalid resource name. |
868 | 9001004 | No matching resource is found based on the resource name. |
869 | 9001006 | The resource is referenced cyclically. |
914 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
919 | 9001003 | Invalid resource name. |
920 | 9001004 | No matching resource is found based on the resource name. |
921 | 9001006 | The resource is referenced cyclically. |
964 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
969 | 9001001 | Invalid resource ID. |
970 | 9001002 | No matching resource is found based on the resource ID. |
971 | 9001006 | The resource is referenced cyclically. |
988 getStringArrayValueSync(resource: Resource): Array<string>
990 用户获取指定resource对象对应的字符串数组,使用同步方式返回。
1002 | resource | [Resource](#resource9) | 是 | 资源信息。 |
1008 | Array<string> | resource对象对应的字符串数组。 |
1012 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
1017 | 9001001 | Invalid resource ID. |
1018 | 9001002 | No matching resource is found based on the resource ID. |
1019 | 9001006 | The resource is referenced cyclically. |
1026 let resource: resourceManager.Resource = {
1032 this.context.resourceManager.getStringArrayValueSync(resource);
1064 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
1069 | 9001003 | Invalid resource name. |
1070 | 9001004 | No matching resource is found based on the resource name. |
1071 | 9001006 | The resource is referenced cyclically. |
1102 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
1107 | 9001001 | Invalid resource ID. |
1108 | 9001002 | No matching resource is found based on the resource ID. |
1109 | 9001006 | The resource is referenced cyclically. |
1153 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
1158 | 9001001 | Invalid resource ID. |
1159 | 9001002 | No matching resource is found based on the resource ID. |
1160 | 9001006 | The resource is referenced cyclically. |
1181 getStringArrayValue(resource: Resource, callback: AsyncCallback<Array<string>>): void
1183 用户获取指定resource对象对应的字符串数组,使用callback异步回调。
1195 | resource | [Resource](#resource9) | 是 | 资源信息。 |
1200 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
1205 | 9001001 | Invalid resource ID. |
1206 | 9001002 | No matching resource is found based on the resource ID. |
1207 | 9001006 | The resource is referenced cyclically. |
1214 let resource: resourceManager.Resource = {
1220 …this.context.resourceManager.getStringArrayValue(resource, (error: BusinessError, value: Array<str…
1236 getStringArrayValue(resource: Resource): Promise<Array<string>>
1238 用户获取指定resource对象对应的字符串数组,使用Promise异步回调。
1250 | resource | [Resource](#resource9) | 是 | 资源信息。 |
1256 | Promise<Array<string>> | resource对象对应的字符串数组。 |
1260 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
1265 | 9001001 | Invalid resource ID. |
1266 | 9001002 | No matching resource is found based on the resource ID. |
1267 | 9001006 | The resource is referenced cyclically. |
1274 let resource: resourceManager.Resource = {
1280 this.context.resourceManager.getStringArrayValue(resource).then((value: Array<string>) => {
1311 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
1316 | 9001003 | Invalid resource name. |
1317 | 9001004 | No matching resource is found based on the resource name. |
1318 | 9001006 | The resource is referenced cyclically. |
1363 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
1368 | 9001003 | Invalid resource name. |
1369 | 9001004 | No matching resource is found based on the resource name. |
1370 | 9001006 | The resource is referenced cyclically. |
1418 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
1423 | 9001001 | Invalid resource ID. |
1424 | 9001002 | No matching resource is found based on the resource ID. |
1425 | 9001006 | The resource is referenced cyclically. |
1442 getPluralStringValueSync(resource: Resource, num: number): string
1444 根据指定数量获取指定resource对象表示的单复数字符串,使用同步方式返回。
1460 | resource | [Resource](#resource9) | 是 | 资源信息。 |
1467 | string | 根据指定数量获取指定resource对象表示的单复数字符串。 |
1471 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
1476 | 9001001 | Invalid resource ID. |
1477 | 9001002 | No matching resource is found based on the resource ID. |
1478 | 9001006 | The resource is referenced cyclically. |
1485 let resource: resourceManager.Resource = {
1491 this.context.resourceManager.getPluralStringValueSync(resource, 1);
1528 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
1533 | 9001003 | Invalid resource name. |
1534 | 9001004 | No matching resource is found based on the resource name. |
1535 | 9001006 | The resource is referenced cyclically. |
1574 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
1579 | 9001001 | Invalid resource ID. |
1580 | 9001002 | No matching resource is found based on the resource ID. |
1581 | 9001006 | The resource is referenced cyclically. |
1631 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
1636 | 9001001 | Invalid resource ID. |
1637 | 9001002 | No matching resource is found based on the resource ID. |
1638 | 9001006 | The resource is referenced cyclically. |
1659 getPluralStringValue(resource: Resource, num: number, callback: AsyncCallback<string>): void
1661 根据指定数量获取指定resource对象表示的单复数字符串,使用callback异步回调。
1677 | resource | [Resource](#resource9) | 是 | 资源信息。 |
1679 | callback | AsyncCallback<string> | 是 | 根据指定数量,获取指定resource对象表示的单复数字符串。 |
1683 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
1688 | 9001001 | Invalid resource ID. |
1689 | 9001002 | No matching resource is found based on the resource ID. |
1690 | 9001006 | The resource is referenced cyclically. |
1697 let resource: resourceManager.Resource = {
1703 …this.context.resourceManager.getPluralStringValue(resource, 1, (error: BusinessError, value: strin…
1719 getPluralStringValue(resource: Resource, num: number): Promise<string>
1721 根据指定数量获取对指定resource对象表示的单复数字符串,使用Promise异步回调。
1737 | resource | [Resource](#resource9) | 是 | 资源信息。 |
1744 | Promise<string> | 根据提供的数量,获取对应resource对象表示的单复数字符串。 |
1748 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
1753 | 9001001 | Invalid resource ID. |
1754 | 9001002 | No matching resource is found based on the resource ID. |
1755 | 9001006 | The resource is referenced cyclically. |
1762 let resource: resourceManager.Resource = {
1768 this.context.resourceManager.getPluralStringValue(resource, 1).then((value: string) => {
1804 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
1809 | 9001003 | Invalid resource name. |
1810 | 9001004 | No matching resource is found based on the resource name. |
1811 | 9001006 | The resource is referenced cyclically. |
1861 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
1866 | 9001003 | Invalid resource name. |
1867 | 9001004 | No matching resource is found based on the resource name. |
1868 | 9001006 | The resource is referenced cyclically. |
1912 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
1917 | 9001001 | Invalid resource ID. |
1918 | 9001002 | No matching resource is found based on the resource ID. |
1943 getMediaContentSync(resource: Resource, density?: number): Uint8Array
1945 用户获取指定resource对象对应的默认或指定的屏幕密度媒体文件内容,使用同步方式返回。
1957 | resource | [Resource](#resource9) | 是 | 资源信息。 |
1964 | Uint8Array | resource对象对应的媒体文件内容。 |
1968 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
1973 | 9001001 | Invalid resource ID. |
1974 | 9001002 | No matching resource is found based on the resource ID. |
1981 let resource: resourceManager.Resource = {
1987 this.context.resourceManager.getMediaContentSync(resource); // 默认屏幕密度
1995 this.context.resourceManager.getMediaContentSync(resource, 120); // 指定屏幕密度
2028 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
2033 | 9001003 | Invalid resource name. |
2034 | 9001004 | No matching resource is found based on the resource name. |
2076 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
2081 | 9001001 | Invalid resource ID. |
2082 | 9001002 | No matching resource is found based on the resource ID. |
2123 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
2128 | 9001001 | Invalid resource ID. |
2129 | 9001002 | No matching resource is found based on the resource ID. |
2174 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
2179 | 9001001 | Invalid resource ID. |
2180 | 9001002 | No matching resource is found based on the resource ID. |
2224 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
2229 | 9001001 | Invalid resource ID. |
2230 | 9001002 | No matching resource is found based on the resource ID. |
2251 getMediaContent(resource: Resource, callback: AsyncCallback<Uint8Array>): void
2253 用户获取指定resource对象对应的媒体文件内容,使用callback异步回调。
2265 | resource | [Resource](#resource9) | 是 | 资源信息。 |
2270 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
2275 | 9001001 | Invalid resource ID. |
2276 | 9001002 | No matching resource is found based on the resource ID. |
2283 let resource: resourceManager.Resource = {
2289 …this.context.resourceManager.getMediaContent(resource, (error: BusinessError, value: Uint8Array) =…
2305 getMediaContent(resource: Resource, density: number, callback: AsyncCallback<Uint8Array>): vo…
2307 用户获取指定resource对象对应的指定屏幕密度媒体文件内容,使用callback异步回调。
2319 | resource | [Resource](#resource9) | 是 | 资源信息。 |
2325 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
2330 | 9001001 | Invalid resource ID. |
2331 | 9001002 | No matching resource is found based on the resource ID. |
2338 let resource: resourceManager.Resource = {
2344 …this.context.resourceManager.getMediaContent(resource, 120, (error: BusinessError, value: Uint8Arr…
2360 getMediaContent(resource: Resource): Promise<Uint8Array>
2362 用户获取指定resource对象对应的媒体文件内容,使用Promise异步回调。
2374 | resource | [Resource](#resource9) | 是 | 资源信息。 |
2380 | Promise<Uint8Array> | resource对象对应的媒体文件内容。 |
2384 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
2389 | 9001001 | Invalid resource ID. |
2390 | 9001002 | No matching resource is found based on the resource ID. |
2397 let resource: resourceManager.Resource = {
2403 this.context.resourceManager.getMediaContent(resource).then((value: Uint8Array) => {
2417 getMediaContent(resource: Resource, density: number): Promise<Uint8Array>
2419 用户获取指定resource对象对应的指定屏幕密度媒体文件内容,使用Promise异步回调。
2431 | resource | [Resource](#resource9) | 是 | 资源信息。 |
2438 | Promise<Uint8Array> | resource对象对应的媒体文件内容。 |
2442 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
2447 | 9001001 | Invalid resource ID. |
2448 | 9001002 | No matching resource is found based on the resource ID. |
2455 let resource: resourceManager.Resource = {
2461 this.context.resourceManager.getMediaContent(resource, 120).then((value: Uint8Array) => {
2491 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
2496 | 9001003 | Invalid resource name. |
2497 | 9001004 | No matching resource is found based on the resource name. |
2538 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
2543 | 9001003 | Invalid resource name. |
2544 | 9001004 | No matching resource is found based on the resource name. |
2589 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
2594 | 9001003 | Invalid resource name. |
2595 | 9001004 | No matching resource is found based on the resource name. |
2639 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
2644 | 9001003 | Invalid resource name. |
2645 | 9001004 | No matching resource is found based on the resource name. |
2689 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
2694 | 9001001 | Invalid resource ID. |
2695 | 9001002 | No matching resource is found based on the resource ID. |
2720 getMediaContentBase64Sync(resource: Resource, density?: number): string
2722 用户获取指定resource对象对应的默认或指定的屏幕密度图片资源Base64编码,使用同步方式返回。
2734 | resource | [Resource](#resource9) | 是 | 资源信息。 |
2741 | string | resource对象对应的图片资源Base64编码。 |
2745 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
2750 | 9001001 | Invalid resource ID. |
2751 | 9001002 | No matching resource is found based on the resource ID. |
2758 let resource: resourceManager.Resource = {
2764 this.context.resourceManager.getMediaContentBase64Sync(resource); // 默认屏幕密度
2772 this.context.resourceManager.getMediaContentBase64Sync(resource, 120); // 指定屏幕密度
2805 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
2810 | 9001003 | Invalid resource name. |
2811 | 9001004 | No matching resource is found based on the resource name. |
2853 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
2858 | 9001001 | Invalid resource ID. |
2859 | 9001002 | No matching resource is found based on the resource ID. |
2900 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
2905 | 9001001 | Invalid resource ID. |
2906 | 9001002 | No matching resource is found based on the resource ID. |
2951 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
2956 | 9001001 | Invalid resource ID. |
2957 | 9001002 | No matching resource is found based on the resource ID. |
3001 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
3006 | 9001001 | Invalid resource ID. |
3007 | 9001002 | No matching resource is found based on the resource ID. |
3028 getMediaContentBase64(resource: Resource, callback: AsyncCallback<string>): void
3030 用户获取指定resource对象对应的图片资源Base64编码,使用callback异步回调。
3042 | resource | [Resource](#resource9) | 是 | 资源信息。 |
3047 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
3052 | 9001001 | Invalid resource ID. |
3053 | 9001002 | No matching resource is found based on the resource ID. |
3060 let resource: resourceManager.Resource = {
3066 …this.context.resourceManager.getMediaContentBase64(resource, (error: BusinessError, value: string)…
3082 getMediaContentBase64(resource: Resource, density: number, callback: AsyncCallback<string>): …
3084 用户获取指定resource对象对应的指定屏幕密度图片资源Base64编码,使用callback异步回调。
3096 | resource | [Resource](#resource9) | 是 | 资源信息。 |
3102 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
3107 | 9001001 | Invalid resource ID. |
3108 | 9001002 | No matching resource is found based on the resource ID. |
3115 let resource: resourceManager.Resource = {
3121 …this.context.resourceManager.getMediaContentBase64(resource, 120, (error: BusinessError, value: st…
3137 getMediaContentBase64(resource: Resource): Promise<string>
3139 用户获取指定resource对象对应的图片资源Base64编码,使用Promise异步回调。
3151 | resource | [Resource](#resource9) | 是 | 资源信息。 |
3157 | Promise<string> | resource对象对应的图片资源Base64编码。 |
3161 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
3166 | 9001001 | Invalid resource ID. |
3167 | 9001002 | No matching resource is found based on the resource ID. |
3174 let resource: resourceManager.Resource = {
3180 this.context.resourceManager.getMediaContentBase64(resource).then((value: string) => {
3194 getMediaContentBase64(resource: Resource, density: number): Promise<string>
3196 用户获取指定resource对象对应的指定屏幕密度图片资源Base64编码,使用Promise异步回调。
3208 | resource | [Resource](#resource9) | 是 | 资源信息。 |
3215 | Promise<string> | resource对象对应的图片资源Base64编码。 |
3219 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
3224 | 9001001 | Invalid resource ID. |
3225 | 9001002 | No matching resource is found based on the resource ID. |
3232 let resource: resourceManager.Resource = {
3238 this.context.resourceManager.getMediaContentBase64(resource, 120).then((value: string) => {
3269 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
3274 | 9001003 | Invalid resource name. |
3275 | 9001004 | No matching resource is found based on the resource name. |
3316 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
3321 | 9001003 | Invalid resource name. |
3322 | 9001004 | No matching resource is found based on the resource name. |
3367 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
3372 | 9001003 | Invalid resource name. |
3373 | 9001004 | No matching resource is found based on the resource name. |
3417 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
3422 | 9001003 | Invalid resource name. |
3423 | 9001004 | No matching resource is found based on the resource name. |
3468 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
3473 | 9001001 | Invalid resource ID. |
3474 | 9001002 | No matching resource is found based on the resource ID. |
3506 getDrawableDescriptor(resource: Resource, density?: number, type?: number): DrawableDescriptor
3508 用户获取指定resource对应的DrawableDescriptor对象,用于图标的显示,使用同步方式返回。
3520 | resource | [Resource](#resource9) | 是 | 资源信息。 |
3532 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
3537 | 9001001 | Invalid resource ID. |
3538 | 9001002 | No matching resource is found based on the resource ID. |
3546 let resource: resourceManager.Resource = {
3552 …awableDescriptor:DrawableDescriptor = this.context.resourceManager.getDrawableDescriptor(resource);
3559 …eDescriptor:DrawableDescriptor = this.context.resourceManager.getDrawableDescriptor(resource, 120);
3566 …Descriptor:DrawableDescriptor = this.context.resourceManager.getDrawableDescriptor(resource, 0, 1);
3600 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
3605 | 9001003 | Invalid resource name. |
3606 | 9001004 | No matching resource is found based on the resource name. |
3660 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
3665 | 9001001 | Invalid resource ID. |
3666 | 9001002 | No matching resource is found based on the resource ID. |
3667 | 9001006 | The resource is referenced cyclically. |
3683 getBoolean(resource: Resource): boolean
3685 使用同步方式,返回获取指定resource对象对应的布尔结果。
3697 | resource | [Resource](#resource9) | 是 | 资源信息。 |
3703 | boolean | resource对象对应的布尔结果。 |
3707 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
3712 | 9001001 | Invalid resource ID. |
3713 | 9001002 | No matching resource is found based on the resource ID. |
3714 | 9001006 | The resource is referenced cyclically. |
3721 let resource: resourceManager.Resource = {
3727 this.context.resourceManager.getBoolean(resource);
3759 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
3764 | 9001003 | Invalid resource name. |
3765 | 9001004 | No matching resource is found based on the resource name. |
3766 | 9001006 | The resource is referenced cyclically. |
3805 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
3810 | 9001001 | Invalid resource ID. |
3811 | 9001002 | No matching resource is found based on the resource ID. |
3812 | 9001006 | The resource is referenced cyclically. |
3837 getNumber(resource: Resource): number
3839 用户获取指定resource对象对应的integer数值或者float数值,使用同步方式返回。
3843 > 使用接口获取单位为"vp"的float值时,通过resId和resource对象获取到的值不一致,resId获取的值是准确的。该问题正在优化改进。
3855 | resource | [Resource](#resource9) | 是 | 资源信息。 |
3865 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
3870 | 9001001 | Invalid resource ID. |
3871 | 9001002 | No matching resource is found based on the resource ID. |
3872 | 9001006 | The resource is referenced cyclically. |
3879 let resource: resourceManager.Resource = {
3885 this.context.resourceManager.getNumber(resource);
3917 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
3922 | 9001003 | Invalid resource name. |
3923 | 9001004 | No matching resource is found based on the resource name. |
3924 | 9001006 | The resource is referenced cyclically. |
3971 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
3976 | 9001001 | Invalid resource ID. |
3977 | 9001002 | No matching resource is found based on the resource ID. |
3978 | 9001006 | The resource is referenced cyclically. |
3995 getColorSync(resource: Resource): number
3997 用户获取指定resource对象对应的颜色值,使用同步方式返回。
4009 | resource | [Resource](#resource9) | 是 | 资源信息。 |
4015 | number | resource对象对应的颜色值(十进制)。 |
4019 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
4024 | 9001001 | Invalid resource ID. |
4025 | 9001002 | No matching resource is found based on the resource ID. |
4026 | 9001006 | The resource is referenced cyclically. |
4033 let resource: resourceManager.Resource = {
4039 this.context.resourceManager.getColorSync(resource);
4071 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
4076 | 9001003 | Invalid resource name. |
4077 | 9001004 | No matching resource is found based on the resource name. |
4078 | 9001006 | The resource is referenced cyclically. |
4112 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
4118 | 9001002 | No matching resource is found based on the resource ID. |
4119 | 9001006 | The resource is referenced cyclically. |
4164 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
4169 | 9001001 | Invalid resource ID. |
4170 | 9001002 | No matching resource is found based on the resource ID. |
4171 | 9001006 | The resource is referenced cyclically. |
4192 getColor(resource: Resource, callback: AsyncCallback<number>): void;
4194 用户获取指定resource对象对应的颜色值,使用callback异步回调。
4206 | resource | [Resource](#resource9) | 是 | 资源信息。 |
4211 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
4216 | 9001001 | Invalid resource ID. |
4217 | 9001002 | No matching resource is found based on the resource ID. |
4218 | 9001006 | The resource is referenced cyclically. |
4225 let resource: resourceManager.Resource = {
4231 this.context.resourceManager.getColor(resource, (error: BusinessError, value: number) => {
4247 getColor(resource: Resource): Promise<number>;
4249 用户获取指定resource对象对应的颜色值,使用Promise异步回调。
4261 | resource | [Resource](#resource9) | 是 | 资源信息。 |
4267 | Promise<number> | resource对象对应的颜色值(十进制)。 |
4271 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
4276 | 9001001 | Invalid resource ID. |
4277 | 9001002 | No matching resource is found based on the resource ID. |
4278 | 9001006 | The resource is referenced cyclically. |
4285 let resource: resourceManager.Resource = {
4291 this.context.resourceManager.getColor(resource).then((value: number) => {
4322 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
4327 | 9001003 | Invalid resource name. |
4328 | 9001004 | No matching resource is found based on the resource name. |
4329 | 9001006 | The resource is referenced cyclically. |
4374 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
4379 | 9001003 | Invalid resource name. |
4380 | 9001004 | No matching resource is found based on the resource name. |
4381 | 9001006 | The resource is referenced cyclically. |
4424 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
4463 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
4512 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
4564 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
4607 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
4661 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
4709 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
4748 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
4801 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
4846 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
4851 | 9001005 | The resource not found by path. |
4885 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
4890 | 9001005 | The resource not found by path. |
4933 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)和[通用错误码](../errorcode-universal.md)。
5159 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
5198 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
5295 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
5300 | 9001001 | Invalid resource ID. |
5301 | 9001002 | No matching resource is found based on the resource ID. |
5302 | 9001006 | The resource is referenced cyclically. |
5318 getSymbol(resource: Resource): number
5320 用户获取指定resource对象对应的符号值,使用同步方式返回。
5332 | resource | [Resource](#resource9) | 是 | 资源信息。 |
5338 | number | resource对象对应的符号值(十进制)。 |
5342 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
5347 | 9001001 | Invalid resource ID. |
5348 | 9001002 | No matching resource is found based on the resource ID. |
5349 | 9001006 | The resource is referenced cyclically. |
5356 let resource: resourceManager.Resource = {
5362 this.context.resourceManager.getSymbol(resource);
5394 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。
5399 | 9001003 | Invalid resource name. |
5400 | 9001004 | No matching resource is found based on the resource name. |
5401 | 9001006 | The resource is referenced cyclically. |
5440 以下错误码的详细介绍请参见[资源管理错误码](errorcode-resource-manager.md)。