Skip to content

Commit 6779cdc

Browse files
authored
fix(android): native-helper utils types are now correct (NativeScript#10231)
1 parent 11cdf08 commit 6779cdc

2 files changed

Lines changed: 1 addition & 83 deletions

File tree

apps/toolbox/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { Application, Utils } from '@nativescript/core';
1+
import { Application } from '@nativescript/core';
22

33
Application.run({ moduleName: 'app-root' });

packages/core/utils/index.d.ts

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -21,88 +21,6 @@ interface Owned {
2121
}
2222
//@endprivate
2323

24-
/**
25-
* Module with android specific utilities.
26-
*/
27-
export namespace ad {
28-
/**
29-
* Gets the native Android application instance.
30-
*/
31-
export function getApplication(): any; /* android.app.Application */
32-
33-
/**
34-
* Gets the Android application context.
35-
*/
36-
export function getApplicationContext(): any; /* android.content.Context */
37-
38-
/**
39-
* Gets the native Android input method manager.
40-
*/
41-
export function getInputMethodManager(): any; /* android.view.inputmethod.InputMethodManager */
42-
43-
/**
44-
* Hides the soft input method, usually a soft keyboard.
45-
*/
46-
export function dismissSoftInput(nativeView?: any /* android.view.View */): void;
47-
48-
/**
49-
* Shows the soft input method, usually a soft keyboard.
50-
*/
51-
export function showSoftInput(nativeView: any /* android.view.View */): void;
52-
53-
/**
54-
* Utility module dealing with some android collections.
55-
*/
56-
namespace collections {
57-
/**
58-
* Converts string array into a String [hash set](http://developer.android.com/reference/java/util/HashSet.html).
59-
* @param str - An array of strings to convert.
60-
*/
61-
export function stringArrayToStringSet(str: string[]): any;
62-
63-
/**
64-
* Converts string hash set into array of strings.
65-
* @param stringSet - A string hash set to convert.
66-
*/
67-
export function stringSetToStringArray(stringSet: any): string[];
68-
}
69-
70-
/**
71-
* Utility module related to android resources.
72-
*/
73-
export namespace resources {
74-
/**
75-
* Gets the drawable id from a given name.
76-
* @param name - Name of the resource.
77-
*/
78-
export function getDrawableId(name);
79-
80-
/**
81-
* Gets the string id from a given name.
82-
* @param name - Name of the resource.
83-
*/
84-
export function getStringId(name);
85-
86-
/**
87-
* Gets the id from a given name.
88-
* @param name - Name of the resource.
89-
*/
90-
export function getId(name: string): number;
91-
92-
/**
93-
* [Obsolete - please use getPaletteColor] Gets a color from current theme.
94-
* @param name - Name of the color
95-
*/
96-
export function getPalleteColor();
97-
98-
/**
99-
* Gets a color from the current theme.
100-
* @param name - Name of the color resource.
101-
*/
102-
export function getPaletteColor(name: string, context: any /* android.content.Context */): number;
103-
}
104-
}
105-
10624
/**
10725
* An utility function that invokes garbage collection on the JavaScript side.
10826
*/

0 commit comments

Comments
 (0)