mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Resolved Issue #391: Added cancellable Android activityBackPressed event + fixed the names of the other activity events because they were wrong.
This commit is contained in:
20
application/application.d.ts
vendored
20
application/application.d.ts
vendored
@@ -250,6 +250,16 @@ declare module "application" {
|
||||
intent: android.content.Intent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Data for the Android activity back pressed event.
|
||||
*/
|
||||
export interface AndroidActivityBackPressedEventData extends AndroidActivityEventData {
|
||||
/**
|
||||
* In the event handler, set this value to true if you want to cancel the back navigation and do something else instead.
|
||||
*/
|
||||
cancel: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* This event is raised on android application ActivityCreated.
|
||||
*/
|
||||
@@ -290,6 +300,11 @@ declare module "application" {
|
||||
*/
|
||||
export function on(event: "activityResult", callback: (args: AndroidActivityResultEventData) => void, thisArg?: any);
|
||||
|
||||
/**
|
||||
* This event is raised on the back button is pressed in an android application.
|
||||
*/
|
||||
export function on(event: "activityBackPressed", callback: (args: AndroidActivityBackPressedEventData) => void, thisArg?: any);
|
||||
|
||||
/**
|
||||
* String value used when hooking to ActivityCreated event.
|
||||
*/
|
||||
@@ -330,6 +345,11 @@ declare module "application" {
|
||||
*/
|
||||
export var androidActivityResultEvent: string;
|
||||
|
||||
/**
|
||||
* String value used when hooking to ActivityBackPressed event.
|
||||
*/
|
||||
export var androidActivityBackPressedEvent: string;
|
||||
|
||||
/**
|
||||
* The abstraction of an Android-specific application object.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user