MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / getId

Function getId

packages/core/utils/native-helper-for-android.ts:251–257  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

249 }
250
251 export function getId(name: string): number {
252 const resources = getResources();
253 const packageName = getPackageName();
254 const uri = packageName + name;
255
256 return resources.getIdentifier(uri, null, null);
257 }
258 export function getResource(name: string, type?: string): number {
259 return getResources().getIdentifier(name, type, getPackageName());
260 }

Callers 2

getDrawableIdFunction · 0.85
getStringIdFunction · 0.85

Calls 2

getResourcesFunction · 0.85
getPackageNameFunction · 0.85

Tested by

no test coverage detected