fix(android): native-helper utils types are now correct (#10231)

This commit is contained in:
Nathan Walker
2023-03-07 19:22:37 -08:00
committed by GitHub
parent 11cdf08ad7
commit 6779cdcb55
2 changed files with 1 additions and 83 deletions

View File

@ -1,3 +1,3 @@
import { Application, Utils } from '@nativescript/core';
import { Application } from '@nativescript/core';
Application.run({ moduleName: 'app-root' });

View File

@ -21,88 +21,6 @@ interface Owned {
}
//@endprivate
/**
* Module with android specific utilities.
*/
export namespace ad {
/**
* Gets the native Android application instance.
*/
export function getApplication(): any; /* android.app.Application */
/**
* Gets the Android application context.
*/
export function getApplicationContext(): any; /* android.content.Context */
/**
* Gets the native Android input method manager.
*/
export function getInputMethodManager(): any; /* android.view.inputmethod.InputMethodManager */
/**
* Hides the soft input method, usually a soft keyboard.
*/
export function dismissSoftInput(nativeView?: any /* android.view.View */): void;
/**
* Shows the soft input method, usually a soft keyboard.
*/
export function showSoftInput(nativeView: any /* android.view.View */): void;
/**
* Utility module dealing with some android collections.
*/
namespace collections {
/**
* Converts string array into a String [hash set](http://developer.android.com/reference/java/util/HashSet.html).
* @param str - An array of strings to convert.
*/
export function stringArrayToStringSet(str: string[]): any;
/**
* Converts string hash set into array of strings.
* @param stringSet - A string hash set to convert.
*/
export function stringSetToStringArray(stringSet: any): string[];
}
/**
* Utility module related to android resources.
*/
export namespace resources {
/**
* Gets the drawable id from a given name.
* @param name - Name of the resource.
*/
export function getDrawableId(name);
/**
* Gets the string id from a given name.
* @param name - Name of the resource.
*/
export function getStringId(name);
/**
* Gets the id from a given name.
* @param name - Name of the resource.
*/
export function getId(name: string): number;
/**
* [Obsolete - please use getPaletteColor] Gets a color from current theme.
* @param name - Name of the color
*/
export function getPalleteColor();
/**
* Gets a color from the current theme.
* @param name - Name of the color resource.
*/
export function getPaletteColor(name: string, context: any /* android.content.Context */): number;
}
}
/**
* An utility function that invokes garbage collection on the JavaScript side.
*/