mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: working android build
This commit is contained in:
@@ -58,6 +58,8 @@ export const hasListeners = (<any>global).NativeScriptGlobals.events.hasListener
|
|||||||
let app: iOSApplication | AndroidApplication;
|
let app: iOSApplication | AndroidApplication;
|
||||||
export function setApplication(instance: iOSApplication | AndroidApplication): void {
|
export function setApplication(instance: iOSApplication | AndroidApplication): void {
|
||||||
app = instance;
|
app = instance;
|
||||||
|
// signal when the application instance is ready globally
|
||||||
|
(<any>global).NativeScriptGlobals.appInstanceReady = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function livesync(rootView: View, context?: ModuleContext) {
|
export function livesync(rootView: View, context?: ModuleContext) {
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
// Types.
|
// Types.
|
||||||
import { AndroidApplication as AndroidApplicationDefinition } from '.';
|
import { AndroidApplication as AndroidApplicationDefinition } from '.';
|
||||||
import { AndroidActivityBackPressedEventData, AndroidActivityBundleEventData, AndroidActivityEventData, AndroidActivityNewIntentEventData, AndroidActivityRequestPermissionsEventData, AndroidActivityResultEventData, ApplicationEventData, CssChangedEventData, OrientationChangedEventData, SystemAppearanceChangedEventData } from './application-interfaces';
|
import { AndroidActivityBackPressedEventData, AndroidActivityBundleEventData, AndroidActivityEventData, AndroidActivityNewIntentEventData, AndroidActivityRequestPermissionsEventData, AndroidActivityResultEventData, ApplicationEventData, CssChangedEventData, OrientationChangedEventData, SystemAppearanceChangedEventData } from './application-interfaces';
|
||||||
import { View } from '../ui/core/view';
|
|
||||||
import { NavigationEntry, AndroidActivityCallbacks } from '../ui/frame/frame-interfaces';
|
|
||||||
import { Observable } from '../data/observable';
|
|
||||||
|
|
||||||
// Use requires to ensure order of imports is maintained
|
// Use requires to ensure order of imports is maintained
|
||||||
const appCommon = require('./application-common');
|
const appCommon = require('./application-common');
|
||||||
// First reexport so that app module is initialized.
|
// First reexport so that app module is initialized.
|
||||||
export * from './application-common';
|
export * from './application-common';
|
||||||
|
|
||||||
|
import { View } from '../ui/core/view';
|
||||||
|
import { NavigationEntry, AndroidActivityCallbacks } from '../ui/frame/frame-interfaces';
|
||||||
|
import { Observable } from '../data/observable';
|
||||||
|
|
||||||
import { profile } from '../profiling';
|
import { profile } from '../profiling';
|
||||||
|
|
||||||
const ActivityCreated = 'activityCreated';
|
const ActivityCreated = 'activityCreated';
|
||||||
@@ -482,6 +483,20 @@ function ensureBroadCastReceiverClass() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const BroadcastReceiver = (<any>android.content.BroadcastReceiver).extend({
|
||||||
|
init(onReceiveCallback: (context: android.content.Context, intent: android.content.Intent) => void) {
|
||||||
|
// super();
|
||||||
|
this._onReceiveCallback = onReceiveCallback;
|
||||||
|
|
||||||
|
// return global.__native(this);
|
||||||
|
},
|
||||||
|
_onReceiveCallback(context: android.content.Context, intent: android.content.Intent) {
|
||||||
|
if (this._onReceiveCallback) {
|
||||||
|
this._onReceiveCallback(context, intent);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
// @NativeClass
|
// @NativeClass
|
||||||
// class BroadcastReceiver extends android.content.BroadcastReceiver {
|
// class BroadcastReceiver extends android.content.BroadcastReceiver {
|
||||||
// private _onReceiveCallback: (context: android.content.Context, intent: android.content.Intent) => void;
|
// private _onReceiveCallback: (context: android.content.Context, intent: android.content.Intent) => void;
|
||||||
@@ -499,20 +514,20 @@ function ensureBroadCastReceiverClass() {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
var BroadcastReceiver = (function (_super) {
|
// var BroadcastReceiver = (function (_super) {
|
||||||
__extends(BroadcastReceiver, _super);
|
// __extends(BroadcastReceiver, _super);
|
||||||
function BroadcastReceiver(onReceiveCallback) {
|
// function BroadcastReceiver(onReceiveCallback) {
|
||||||
var _this = _super.call(this) || this;
|
// var _this = _super.call(this) || this;
|
||||||
_this._onReceiveCallback = onReceiveCallback;
|
// _this._onReceiveCallback = onReceiveCallback;
|
||||||
return global.__native(_this);
|
// return global.__native(_this);
|
||||||
}
|
// }
|
||||||
BroadcastReceiver.prototype.onReceive = function (context, intent) {
|
// BroadcastReceiver.prototype.onReceive = function (context, intent) {
|
||||||
if (this._onReceiveCallback) {
|
// if (this._onReceiveCallback) {
|
||||||
this._onReceiveCallback(context, intent);
|
// this._onReceiveCallback(context, intent);
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
return BroadcastReceiver;
|
// return BroadcastReceiver;
|
||||||
})(android.content.BroadcastReceiver);
|
// })(android.content.BroadcastReceiver);
|
||||||
|
|
||||||
BroadcastReceiverClass = BroadcastReceiver;
|
BroadcastReceiverClass = BroadcastReceiver;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { FileSystemAccess } from './file-system-access';
|
import { FileSystemAccess } from './file-system-access';
|
||||||
import { isIOS } from '../platform';
|
import { isIOS } from '../platform';
|
||||||
import { profile } from '../profiling';
|
|
||||||
|
|
||||||
// The FileSystemAccess implementation, used through all the APIs.
|
// The FileSystemAccess implementation, used through all the APIs.
|
||||||
let fileAccess: FileSystemAccess;
|
let fileAccess: FileSystemAccess;
|
||||||
@@ -319,7 +318,6 @@ export class File extends FileSystemEntity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@profile
|
|
||||||
public readTextSync(onError?: (error: any) => any, encoding?: string): string {
|
public readTextSync(onError?: (error: any) => any, encoding?: string): string {
|
||||||
this.checkAccess();
|
this.checkAccess();
|
||||||
|
|
||||||
|
|||||||
@@ -39,8 +39,11 @@ function registerOnGlobalContext(moduleName: string, exportName: string): void {
|
|||||||
* Manages internal framework global state
|
* Manages internal framework global state
|
||||||
*/
|
*/
|
||||||
export class NativeScriptGlobalState {
|
export class NativeScriptGlobalState {
|
||||||
events: Observable<any>;
|
events: Observable;
|
||||||
launched = false;
|
launched = false;
|
||||||
|
// used by various classes to setup callbacks to wire up global app event handling when the app instance is ready
|
||||||
|
appEventWiring: Array<any>;
|
||||||
|
private _appInstanceReady = false;
|
||||||
private _setLaunched: () => void;
|
private _setLaunched: () => void;
|
||||||
constructor() {
|
constructor() {
|
||||||
// console.log('creating NativeScriptGlobals...')
|
// console.log('creating NativeScriptGlobals...')
|
||||||
@@ -57,6 +60,37 @@ export class NativeScriptGlobalState {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get appInstanceReady() {
|
||||||
|
return this._appInstanceReady;
|
||||||
|
}
|
||||||
|
|
||||||
|
set appInstanceReady(value: boolean) {
|
||||||
|
this._appInstanceReady = value;
|
||||||
|
// app instance ready, wire up any app events waiting in startup queue
|
||||||
|
if (this.appEventWiring && this.appEventWiring.length) {
|
||||||
|
for (const callback of this.appEventWiring) {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
// cleanup
|
||||||
|
this.appEventWiring = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ability for classes to initialize app event handling early even before the app instance is ready during boot cycle avoiding boot race conditions
|
||||||
|
* @param callback wire up any global event handling inside the callback
|
||||||
|
*/
|
||||||
|
addEventWiring(callback: () => void) {
|
||||||
|
if (this._appInstanceReady) {
|
||||||
|
callback();
|
||||||
|
} else {
|
||||||
|
if (!this.appEventWiring) {
|
||||||
|
this.appEventWiring = [];
|
||||||
|
}
|
||||||
|
this.appEventWiring.push(callback);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private _setLaunchedFn() {
|
private _setLaunchedFn() {
|
||||||
// console.log('NativeScriptGlobals launch fired!');
|
// console.log('NativeScriptGlobals launch fired!');
|
||||||
this.launched = true;
|
this.launched = true;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"noImplicitAny": false,
|
"noImplicitAny": false,
|
||||||
"noImplicitUseStrict": true,
|
"noImplicitUseStrict": true,
|
||||||
"removeComments": false,
|
"removeComments": false,
|
||||||
|
"emitDecoratorMetadata": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"diagnostics": true,
|
"diagnostics": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ function initializeMenuItemClickListener(): void {
|
|||||||
|
|
||||||
AppCompatTextView = androidx.appcompat.widget.AppCompatTextView;
|
AppCompatTextView = androidx.appcompat.widget.AppCompatTextView;
|
||||||
|
|
||||||
|
@NativeClass
|
||||||
@Interfaces([androidx.appcompat.widget.Toolbar.OnMenuItemClickListener])
|
@Interfaces([androidx.appcompat.widget.Toolbar.OnMenuItemClickListener])
|
||||||
class MenuItemClickListenerImpl extends java.lang.Object implements androidx.appcompat.widget.Toolbar.OnMenuItemClickListener {
|
class MenuItemClickListenerImpl extends java.lang.Object implements androidx.appcompat.widget.Toolbar.OnMenuItemClickListener {
|
||||||
constructor(public owner: ActionBar) {
|
constructor(public owner: ActionBar) {
|
||||||
|
|||||||
@@ -199,6 +199,7 @@ function initializeNativeClasses() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NativeClass
|
||||||
@Interfaces([android.view.View.OnAttachStateChangeListener])
|
@Interfaces([android.view.View.OnAttachStateChangeListener])
|
||||||
class AttachListener extends java.lang.Object implements android.view.View.OnAttachStateChangeListener {
|
class AttachListener extends java.lang.Object implements android.view.View.OnAttachStateChangeListener {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ function initializeClickListener(): void {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NativeClass
|
||||||
@Interfaces([android.view.View.OnClickListener])
|
@Interfaces([android.view.View.OnClickListener])
|
||||||
class ClickListenerImpl extends java.lang.Object implements android.view.View.OnClickListener {
|
class ClickListenerImpl extends java.lang.Object implements android.view.View.OnClickListener {
|
||||||
constructor(public owner: Button) {
|
constructor(public owner: Button) {
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ function initializeTouchListener(): void {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NativeClass
|
||||||
@Interfaces([android.view.View.OnTouchListener])
|
@Interfaces([android.view.View.OnTouchListener])
|
||||||
class TouchListenerImpl extends java.lang.Object implements android.view.View.OnTouchListener {
|
class TouchListenerImpl extends java.lang.Object implements android.view.View.OnTouchListener {
|
||||||
private owner: WeakRef<View>;
|
private owner: WeakRef<View>;
|
||||||
@@ -122,212 +123,68 @@ function initializeTouchListener(): void {
|
|||||||
TouchListener = TouchListenerImpl;
|
TouchListener = TouchListenerImpl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// function initializeDialogFragment() {
|
|
||||||
// if (DialogFragment) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @NativeClass
|
|
||||||
// class DialogImpl extends android.app.Dialog {
|
|
||||||
// constructor(public fragment: DialogFragmentImpl, context: android.content.Context, themeResId: number) {
|
|
||||||
// super(context, themeResId);
|
|
||||||
|
|
||||||
// return global.__native(this);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public onDetachedFromWindow(): void {
|
|
||||||
// super.onDetachedFromWindow();
|
|
||||||
// this.fragment = null;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public onBackPressed(): void {
|
|
||||||
// const view = this.fragment.owner;
|
|
||||||
// const args = <AndroidActivityBackPressedEventData>{
|
|
||||||
// eventName: 'activityBackPressed',
|
|
||||||
// object: view,
|
|
||||||
// activity: view._context,
|
|
||||||
// cancel: false,
|
|
||||||
// };
|
|
||||||
|
|
||||||
// // Fist fire application.android global event
|
|
||||||
// androidApp.notify(args);
|
|
||||||
// if (args.cancel) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// view.notify(args);
|
|
||||||
|
|
||||||
// if (!args.cancel && !view.onBackPressed()) {
|
|
||||||
// super.onBackPressed();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// class DialogFragmentImpl extends androidx.fragment.app.DialogFragment {
|
|
||||||
// public owner: View;
|
|
||||||
// private _fullscreen: boolean;
|
|
||||||
// private _animated: boolean;
|
|
||||||
// private _stretched: boolean;
|
|
||||||
// private _cancelable: boolean;
|
|
||||||
// private _shownCallback: () => void;
|
|
||||||
// private _dismissCallback: () => void;
|
|
||||||
|
|
||||||
// constructor() {
|
|
||||||
// super();
|
|
||||||
|
|
||||||
// return global.__native(this);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public onCreateDialog(savedInstanceState: android.os.Bundle): android.app.Dialog {
|
|
||||||
// const ownerId = this.getArguments().getInt(DOMID);
|
|
||||||
// const options = getModalOptions(ownerId);
|
|
||||||
// this.owner = options.owner;
|
|
||||||
// // Set owner._dialogFragment to this in case the DialogFragment was recreated after app suspend
|
|
||||||
// this.owner._dialogFragment = this;
|
|
||||||
// this._fullscreen = options.fullscreen;
|
|
||||||
// this._animated = options.animated;
|
|
||||||
// this._cancelable = options.cancelable;
|
|
||||||
// this._stretched = options.stretched;
|
|
||||||
// this._dismissCallback = options.dismissCallback;
|
|
||||||
// this._shownCallback = options.shownCallback;
|
|
||||||
// this.setStyle(androidx.fragment.app.DialogFragment.STYLE_NO_TITLE, 0);
|
|
||||||
|
|
||||||
// let theme = this.getTheme();
|
|
||||||
// if (this._fullscreen) {
|
|
||||||
// // In fullscreen mode, get the application's theme.
|
|
||||||
// theme = this.getActivity().getApplicationInfo().theme;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const dialog = new DialogImpl(this, this.getActivity(), theme);
|
|
||||||
|
|
||||||
// // do not override alignment unless fullscreen modal will be shown;
|
|
||||||
// // otherwise we might break component-level layout:
|
|
||||||
// // https://github.com/NativeScript/NativeScript/issues/5392
|
|
||||||
// if (!this._fullscreen && !this._stretched) {
|
|
||||||
// this.owner.horizontalAlignment = 'center';
|
|
||||||
// this.owner.verticalAlignment = 'middle';
|
|
||||||
// } else {
|
|
||||||
// this.owner.horizontalAlignment = 'stretch';
|
|
||||||
// this.owner.verticalAlignment = 'stretch';
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // set the modal window animation
|
|
||||||
// // https://github.com/NativeScript/NativeScript/issues/5989
|
|
||||||
// if (this._animated) {
|
|
||||||
// dialog.getWindow().setWindowAnimations(styleAnimationDialog);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// dialog.setCanceledOnTouchOutside(this._cancelable);
|
|
||||||
|
|
||||||
// return dialog;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public onCreateView(inflater: android.view.LayoutInflater, container: android.view.ViewGroup, savedInstanceState: android.os.Bundle): android.view.View {
|
|
||||||
// const owner = this.owner;
|
|
||||||
// owner._setupAsRootView(this.getActivity());
|
|
||||||
// owner._isAddedToNativeVisualTree = true;
|
|
||||||
|
|
||||||
// return owner.nativeViewProtected;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public onStart(): void {
|
|
||||||
// super.onStart();
|
|
||||||
// if (this._fullscreen) {
|
|
||||||
// const window = this.getDialog().getWindow();
|
|
||||||
// const length = android.view.ViewGroup.LayoutParams.MATCH_PARENT;
|
|
||||||
// window.setLayout(length, length);
|
|
||||||
// // This removes the default backgroundDrawable so there are no margins.
|
|
||||||
// window.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.WHITE));
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const owner = this.owner;
|
|
||||||
// if (owner && !owner.isLoaded) {
|
|
||||||
// owner.callLoaded();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// this._shownCallback();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public onDismiss(dialog: android.content.DialogInterface): void {
|
|
||||||
// super.onDismiss(dialog);
|
|
||||||
// const manager = this.getFragmentManager();
|
|
||||||
// if (manager) {
|
|
||||||
// removeModal(this.owner._domId);
|
|
||||||
// this._dismissCallback();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const owner = this.owner;
|
|
||||||
// if (owner && owner.isLoaded) {
|
|
||||||
// owner.callUnloaded();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public onDestroy(): void {
|
|
||||||
// super.onDestroy();
|
|
||||||
// const owner = this.owner;
|
|
||||||
|
|
||||||
// if (owner) {
|
|
||||||
// // Android calls onDestroy before onDismiss.
|
|
||||||
// // Make sure we unload first and then call _tearDownUI.
|
|
||||||
// if (owner.isLoaded) {
|
|
||||||
// owner.callUnloaded();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// owner._isAddedToNativeVisualTree = false;
|
|
||||||
// owner._tearDownUI(true);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// DialogFragment = DialogFragmentImpl;
|
|
||||||
// }
|
|
||||||
function initializeDialogFragment() {
|
function initializeDialogFragment() {
|
||||||
if (DialogFragment) {
|
if (DialogFragment) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var DialogImpl = (function (_super) {
|
|
||||||
__extends(DialogImpl, _super);
|
@NativeClass
|
||||||
function DialogImpl(fragment, context, themeResId) {
|
class DialogImpl extends android.app.Dialog {
|
||||||
var _this = _super.call(this, context, themeResId) || this;
|
constructor(public fragment: DialogFragmentImpl, context: android.content.Context, themeResId: number) {
|
||||||
_this.fragment = fragment;
|
super(context, themeResId);
|
||||||
return global.__native(_this);
|
|
||||||
|
return global.__native(this);
|
||||||
}
|
}
|
||||||
DialogImpl.prototype.onDetachedFromWindow = function () {
|
|
||||||
_super.prototype.onDetachedFromWindow.call(this);
|
public onDetachedFromWindow(): void {
|
||||||
|
super.onDetachedFromWindow();
|
||||||
this.fragment = null;
|
this.fragment = null;
|
||||||
};
|
}
|
||||||
DialogImpl.prototype.onBackPressed = function () {
|
|
||||||
var view = this.fragment.owner;
|
public onBackPressed(): void {
|
||||||
if (!view) {
|
const view = this.fragment.owner;
|
||||||
return;
|
const args = <AndroidActivityBackPressedEventData>{
|
||||||
}
|
|
||||||
var args = {
|
|
||||||
eventName: 'activityBackPressed',
|
eventName: 'activityBackPressed',
|
||||||
object: view,
|
object: view,
|
||||||
activity: view._context,
|
activity: view._context,
|
||||||
cancel: false,
|
cancel: false,
|
||||||
};
|
};
|
||||||
application_1.android.notify(args);
|
|
||||||
|
// Fist fire application.android global event
|
||||||
|
androidApp.notify(args);
|
||||||
if (args.cancel) {
|
if (args.cancel) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
view.notify(args);
|
view.notify(args);
|
||||||
|
|
||||||
if (!args.cancel && !view.onBackPressed()) {
|
if (!args.cancel && !view.onBackPressed()) {
|
||||||
_super.prototype.onBackPressed.call(this);
|
super.onBackPressed();
|
||||||
}
|
}
|
||||||
};
|
|
||||||
return DialogImpl;
|
|
||||||
})(android.app.Dialog);
|
|
||||||
var DialogFragmentImpl = (function (_super) {
|
|
||||||
__extends(DialogFragmentImpl, _super);
|
|
||||||
function DialogFragmentImpl() {
|
|
||||||
var _this = _super.call(this) || this;
|
|
||||||
return global.__native(_this);
|
|
||||||
}
|
}
|
||||||
DialogFragmentImpl.prototype.onCreateDialog = function (savedInstanceState) {
|
}
|
||||||
var ownerId = this.getArguments().getInt(DOMID);
|
|
||||||
var options = getModalOptions(ownerId);
|
class DialogFragmentImpl extends androidx.fragment.app.DialogFragment {
|
||||||
|
public owner: View;
|
||||||
|
private _fullscreen: boolean;
|
||||||
|
private _animated: boolean;
|
||||||
|
private _stretched: boolean;
|
||||||
|
private _cancelable: boolean;
|
||||||
|
private _shownCallback: () => void;
|
||||||
|
private _dismissCallback: () => void;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
|
||||||
|
return global.__native(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public onCreateDialog(savedInstanceState: android.os.Bundle): android.app.Dialog {
|
||||||
|
const ownerId = this.getArguments().getInt(DOMID);
|
||||||
|
const options = getModalOptions(ownerId);
|
||||||
this.owner = options.owner;
|
this.owner = options.owner;
|
||||||
|
// Set owner._dialogFragment to this in case the DialogFragment was recreated after app suspend
|
||||||
|
this.owner._dialogFragment = this;
|
||||||
this._fullscreen = options.fullscreen;
|
this._fullscreen = options.fullscreen;
|
||||||
this._animated = options.animated;
|
this._animated = options.animated;
|
||||||
this._cancelable = options.cancelable;
|
this._cancelable = options.cancelable;
|
||||||
@@ -335,11 +192,18 @@ function initializeDialogFragment() {
|
|||||||
this._dismissCallback = options.dismissCallback;
|
this._dismissCallback = options.dismissCallback;
|
||||||
this._shownCallback = options.shownCallback;
|
this._shownCallback = options.shownCallback;
|
||||||
this.setStyle(androidx.fragment.app.DialogFragment.STYLE_NO_TITLE, 0);
|
this.setStyle(androidx.fragment.app.DialogFragment.STYLE_NO_TITLE, 0);
|
||||||
var theme = this.getTheme();
|
|
||||||
|
let theme = this.getTheme();
|
||||||
if (this._fullscreen) {
|
if (this._fullscreen) {
|
||||||
|
// In fullscreen mode, get the application's theme.
|
||||||
theme = this.getActivity().getApplicationInfo().theme;
|
theme = this.getActivity().getApplicationInfo().theme;
|
||||||
}
|
}
|
||||||
var dialog = new DialogImpl(this, this.getActivity(), theme);
|
|
||||||
|
const dialog = new DialogImpl(this, this.getActivity(), theme);
|
||||||
|
|
||||||
|
// do not override alignment unless fullscreen modal will be shown;
|
||||||
|
// otherwise we might break component-level layout:
|
||||||
|
// https://github.com/NativeScript/NativeScript/issues/5392
|
||||||
if (!this._fullscreen && !this._stretched) {
|
if (!this._fullscreen && !this._stretched) {
|
||||||
this.owner.horizontalAlignment = 'center';
|
this.owner.horizontalAlignment = 'center';
|
||||||
this.owner.verticalAlignment = 'middle';
|
this.owner.verticalAlignment = 'middle';
|
||||||
@@ -347,57 +211,75 @@ function initializeDialogFragment() {
|
|||||||
this.owner.horizontalAlignment = 'stretch';
|
this.owner.horizontalAlignment = 'stretch';
|
||||||
this.owner.verticalAlignment = 'stretch';
|
this.owner.verticalAlignment = 'stretch';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set the modal window animation
|
||||||
|
// https://github.com/NativeScript/NativeScript/issues/5989
|
||||||
if (this._animated) {
|
if (this._animated) {
|
||||||
dialog.getWindow().setWindowAnimations(styleAnimationDialog);
|
dialog.getWindow().setWindowAnimations(styleAnimationDialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog.setCanceledOnTouchOutside(this._cancelable);
|
dialog.setCanceledOnTouchOutside(this._cancelable);
|
||||||
|
|
||||||
return dialog;
|
return dialog;
|
||||||
};
|
}
|
||||||
DialogFragmentImpl.prototype.onCreateView = function (inflater, container, savedInstanceState) {
|
|
||||||
var owner = this.owner;
|
public onCreateView(inflater: android.view.LayoutInflater, container: android.view.ViewGroup, savedInstanceState: android.os.Bundle): android.view.View {
|
||||||
|
const owner = this.owner;
|
||||||
owner._setupAsRootView(this.getActivity());
|
owner._setupAsRootView(this.getActivity());
|
||||||
owner._isAddedToNativeVisualTree = true;
|
owner._isAddedToNativeVisualTree = true;
|
||||||
|
|
||||||
return owner.nativeViewProtected;
|
return owner.nativeViewProtected;
|
||||||
};
|
}
|
||||||
DialogFragmentImpl.prototype.onStart = function () {
|
|
||||||
_super.prototype.onStart.call(this);
|
public onStart(): void {
|
||||||
|
super.onStart();
|
||||||
if (this._fullscreen) {
|
if (this._fullscreen) {
|
||||||
var window_1 = this.getDialog().getWindow();
|
const window = this.getDialog().getWindow();
|
||||||
var length_1 = android.view.ViewGroup.LayoutParams.MATCH_PARENT;
|
const length = android.view.ViewGroup.LayoutParams.MATCH_PARENT;
|
||||||
window_1.setLayout(length_1, length_1);
|
window.setLayout(length, length);
|
||||||
window_1.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.WHITE));
|
// This removes the default backgroundDrawable so there are no margins.
|
||||||
|
window.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.WHITE));
|
||||||
}
|
}
|
||||||
var owner = this.owner;
|
|
||||||
|
const owner = this.owner;
|
||||||
if (owner && !owner.isLoaded) {
|
if (owner && !owner.isLoaded) {
|
||||||
owner.callLoaded();
|
owner.callLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
this._shownCallback();
|
this._shownCallback();
|
||||||
};
|
}
|
||||||
DialogFragmentImpl.prototype.onDismiss = function (dialog) {
|
|
||||||
_super.prototype.onDismiss.call(this, dialog);
|
public onDismiss(dialog: android.content.DialogInterface): void {
|
||||||
var manager = this.getFragmentManager();
|
super.onDismiss(dialog);
|
||||||
|
const manager = this.getFragmentManager();
|
||||||
if (manager) {
|
if (manager) {
|
||||||
removeModal(this.owner._domId);
|
removeModal(this.owner._domId);
|
||||||
this._dismissCallback();
|
this._dismissCallback();
|
||||||
}
|
}
|
||||||
var owner = this.owner;
|
|
||||||
|
const owner = this.owner;
|
||||||
if (owner && owner.isLoaded) {
|
if (owner && owner.isLoaded) {
|
||||||
owner.callUnloaded();
|
owner.callUnloaded();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
DialogFragmentImpl.prototype.onDestroy = function () {
|
|
||||||
_super.prototype.onDestroy.call(this);
|
public onDestroy(): void {
|
||||||
var owner = this.owner;
|
super.onDestroy();
|
||||||
|
const owner = this.owner;
|
||||||
|
|
||||||
if (owner) {
|
if (owner) {
|
||||||
|
// Android calls onDestroy before onDismiss.
|
||||||
|
// Make sure we unload first and then call _tearDownUI.
|
||||||
if (owner.isLoaded) {
|
if (owner.isLoaded) {
|
||||||
owner.callUnloaded();
|
owner.callUnloaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
owner._isAddedToNativeVisualTree = false;
|
owner._isAddedToNativeVisualTree = false;
|
||||||
owner._tearDownUI(true);
|
owner._tearDownUI(true);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
return DialogFragmentImpl;
|
}
|
||||||
})(androidx.fragment.app.DialogFragment);
|
|
||||||
DialogFragment = DialogFragmentImpl;
|
DialogFragment = DialogFragmentImpl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ function initializeDateChangedListener(): void {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NativeClass
|
||||||
@Interfaces([android.widget.DatePicker.OnDateChangedListener])
|
@Interfaces([android.widget.DatePicker.OnDateChangedListener])
|
||||||
class DateChangedListenerImpl extends java.lang.Object implements android.widget.DatePicker.OnDateChangedListener {
|
class DateChangedListenerImpl extends java.lang.Object implements android.widget.DatePicker.OnDateChangedListener {
|
||||||
constructor(public owner: DatePicker) {
|
constructor(public owner: DatePicker) {
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ function initializeEditTextListeners(): void {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NativeClass
|
||||||
@Interfaces([android.text.TextWatcher, android.view.View.OnFocusChangeListener, android.widget.TextView.OnEditorActionListener])
|
@Interfaces([android.text.TextWatcher, android.view.View.OnFocusChangeListener, android.widget.TextView.OnEditorActionListener])
|
||||||
class EditTextListenersImpl extends java.lang.Object implements android.text.TextWatcher, android.view.View.OnFocusChangeListener, android.widget.TextView.OnEditorActionListener {
|
class EditTextListenersImpl extends java.lang.Object implements android.text.TextWatcher, android.view.View.OnFocusChangeListener, android.widget.TextView.OnEditorActionListener {
|
||||||
constructor(private owner: EditableTextBase) {
|
constructor(private owner: EditableTextBase) {
|
||||||
|
|||||||
@@ -9,111 +9,111 @@ if (global.__snapshot) {
|
|||||||
/**
|
/**
|
||||||
* Option 1: the exact es5 compiled version of what this normally looks like
|
* Option 1: the exact es5 compiled version of what this normally looks like
|
||||||
*/
|
*/
|
||||||
var NativeScriptActivity = (function (_super) {
|
// var NativeScriptActivity = (function (_super) {
|
||||||
__extends(NativeScriptActivity, _super);
|
// __extends(NativeScriptActivity, _super);
|
||||||
function NativeScriptActivity() {
|
// function NativeScriptActivity() {
|
||||||
console.log('construct NativeScriptActivity');
|
// console.log('construct NativeScriptActivity');
|
||||||
var _this = _super.call(this) || this;
|
// var _this = _super.call(this) || this;
|
||||||
return global.__native(_this);
|
// return global.__native(_this);
|
||||||
}
|
// }
|
||||||
NativeScriptActivity.prototype.init = function () {
|
// NativeScriptActivity.prototype.init = function () {
|
||||||
// return new NativeScriptActivity();
|
// // return new NativeScriptActivity();
|
||||||
};
|
// };
|
||||||
NativeScriptActivity.prototype.onCreate = function (savedInstanceState) {
|
// NativeScriptActivity.prototype.onCreate = function (savedInstanceState) {
|
||||||
appModule.android.init(this.getApplication());
|
// appModule.android.init(this.getApplication());
|
||||||
this.isNativeScriptActivity = true;
|
|
||||||
if (!this._callbacks) {
|
|
||||||
setActivityCallbacks(this);
|
|
||||||
}
|
|
||||||
this._callbacks.onCreate(this, savedInstanceState, this.getIntent(), _super.prototype.onCreate);
|
|
||||||
};
|
|
||||||
NativeScriptActivity.prototype.onNewIntent = function (intent) {
|
|
||||||
this._callbacks.onNewIntent(this, intent, _super.prototype.setIntent, _super.prototype.onNewIntent);
|
|
||||||
};
|
|
||||||
NativeScriptActivity.prototype.onSaveInstanceState = function (outState) {
|
|
||||||
this._callbacks.onSaveInstanceState(this, outState, _super.prototype.onSaveInstanceState);
|
|
||||||
};
|
|
||||||
NativeScriptActivity.prototype.onStart = function () {
|
|
||||||
this._callbacks.onStart(this, _super.prototype.onStart);
|
|
||||||
};
|
|
||||||
NativeScriptActivity.prototype.onStop = function () {
|
|
||||||
this._callbacks.onStop(this, _super.prototype.onStop);
|
|
||||||
};
|
|
||||||
NativeScriptActivity.prototype.onDestroy = function () {
|
|
||||||
this._callbacks.onDestroy(this, _super.prototype.onDestroy);
|
|
||||||
};
|
|
||||||
NativeScriptActivity.prototype.onPostResume = function () {
|
|
||||||
this._callbacks.onPostResume(this, _super.prototype.onPostResume);
|
|
||||||
};
|
|
||||||
NativeScriptActivity.prototype.onBackPressed = function () {
|
|
||||||
this._callbacks.onBackPressed(this, _super.prototype.onBackPressed);
|
|
||||||
};
|
|
||||||
NativeScriptActivity.prototype.onRequestPermissionsResult = function (requestCode, permissions, grantResults) {
|
|
||||||
this._callbacks.onRequestPermissionsResult(this, requestCode, permissions, grantResults, undefined);
|
|
||||||
};
|
|
||||||
NativeScriptActivity.prototype.onActivityResult = function (requestCode, resultCode, data) {
|
|
||||||
this._callbacks.onActivityResult(this, requestCode, resultCode, data, _super.prototype.onActivityResult);
|
|
||||||
};
|
|
||||||
NativeScriptActivity = __decorate([JavaProxy('com.tns.NativeScriptActivity')], NativeScriptActivity);
|
|
||||||
return NativeScriptActivity;
|
|
||||||
})(androidx.appcompat.app.AppCompatActivity);
|
|
||||||
|
|
||||||
// Option 2: the manual es5 way - results in same as above
|
|
||||||
// const superProto = androidx.appcompat.app.AppCompatActivity.prototype;
|
|
||||||
// const NativeScriptActivity = (<any>androidx.appcompat.app.AppCompatActivity).extend('com.tns.NativeScriptActivity', {
|
|
||||||
// init() {
|
|
||||||
// // superProto();
|
|
||||||
// // return global.__native(this);
|
|
||||||
// },
|
|
||||||
// onCreate(savedInstanceState: android.os.Bundle): void {
|
|
||||||
// appModule.android.init(this.getApplication());
|
|
||||||
|
|
||||||
// // Set isNativeScriptActivity in onCreate.
|
|
||||||
// // The JS constructor might not be called because the activity is created from Android.
|
|
||||||
// this.isNativeScriptActivity = true;
|
// this.isNativeScriptActivity = true;
|
||||||
// if (!this._callbacks) {
|
// if (!this._callbacks) {
|
||||||
// setActivityCallbacks(this);
|
// setActivityCallbacks(this);
|
||||||
// }
|
// }
|
||||||
|
// this._callbacks.onCreate(this, savedInstanceState, this.getIntent(), _super.prototype.onCreate);
|
||||||
|
// };
|
||||||
|
// NativeScriptActivity.prototype.onNewIntent = function (intent) {
|
||||||
|
// this._callbacks.onNewIntent(this, intent, _super.prototype.setIntent, _super.prototype.onNewIntent);
|
||||||
|
// };
|
||||||
|
// NativeScriptActivity.prototype.onSaveInstanceState = function (outState) {
|
||||||
|
// this._callbacks.onSaveInstanceState(this, outState, _super.prototype.onSaveInstanceState);
|
||||||
|
// };
|
||||||
|
// NativeScriptActivity.prototype.onStart = function () {
|
||||||
|
// this._callbacks.onStart(this, _super.prototype.onStart);
|
||||||
|
// };
|
||||||
|
// NativeScriptActivity.prototype.onStop = function () {
|
||||||
|
// this._callbacks.onStop(this, _super.prototype.onStop);
|
||||||
|
// };
|
||||||
|
// NativeScriptActivity.prototype.onDestroy = function () {
|
||||||
|
// this._callbacks.onDestroy(this, _super.prototype.onDestroy);
|
||||||
|
// };
|
||||||
|
// NativeScriptActivity.prototype.onPostResume = function () {
|
||||||
|
// this._callbacks.onPostResume(this, _super.prototype.onPostResume);
|
||||||
|
// };
|
||||||
|
// NativeScriptActivity.prototype.onBackPressed = function () {
|
||||||
|
// this._callbacks.onBackPressed(this, _super.prototype.onBackPressed);
|
||||||
|
// };
|
||||||
|
// NativeScriptActivity.prototype.onRequestPermissionsResult = function (requestCode, permissions, grantResults) {
|
||||||
|
// this._callbacks.onRequestPermissionsResult(this, requestCode, permissions, grantResults, undefined);
|
||||||
|
// };
|
||||||
|
// NativeScriptActivity.prototype.onActivityResult = function (requestCode, resultCode, data) {
|
||||||
|
// this._callbacks.onActivityResult(this, requestCode, resultCode, data, _super.prototype.onActivityResult);
|
||||||
|
// };
|
||||||
|
// NativeScriptActivity = __decorate([JavaProxy('com.tns.NativeScriptActivity')], NativeScriptActivity);
|
||||||
|
// return NativeScriptActivity;
|
||||||
|
// })(androidx.appcompat.app.AppCompatActivity);
|
||||||
|
|
||||||
// this._callbacks.onCreate(this, savedInstanceState, this.getIntent(), superProto.onCreate);
|
// Option 2: the manual es5 way - results in same as above
|
||||||
// },
|
const superProto = androidx.appcompat.app.AppCompatActivity.prototype;
|
||||||
|
const NativeScriptActivity = (<any>androidx.appcompat.app.AppCompatActivity).extend('com.tns.NativeScriptActivity', {
|
||||||
|
init() {
|
||||||
|
// superProto();
|
||||||
|
// return global.__native(this);
|
||||||
|
},
|
||||||
|
onCreate(savedInstanceState: android.os.Bundle): void {
|
||||||
|
appModule.android.init(this.getApplication());
|
||||||
|
|
||||||
// onNewIntent(intent: android.content.Intent): void {
|
// Set isNativeScriptActivity in onCreate.
|
||||||
// this._callbacks.onNewIntent(this, intent, superProto.setIntent, superProto.onNewIntent);
|
// The JS constructor might not be called because the activity is created from Android.
|
||||||
// },
|
this.isNativeScriptActivity = true;
|
||||||
|
if (!this._callbacks) {
|
||||||
|
setActivityCallbacks(this);
|
||||||
|
}
|
||||||
|
|
||||||
// onSaveInstanceState(outState: android.os.Bundle): void {
|
this._callbacks.onCreate(this, savedInstanceState, this.getIntent(), superProto.onCreate);
|
||||||
// this._callbacks.onSaveInstanceState(this, outState, superProto.onSaveInstanceState);
|
},
|
||||||
// },
|
|
||||||
|
|
||||||
// onStart(): void {
|
onNewIntent(intent: android.content.Intent): void {
|
||||||
// this._callbacks.onStart(this, superProto.onStart);
|
this._callbacks.onNewIntent(this, intent, superProto.setIntent, superProto.onNewIntent);
|
||||||
// },
|
},
|
||||||
|
|
||||||
// onStop(): void {
|
onSaveInstanceState(outState: android.os.Bundle): void {
|
||||||
// this._callbacks.onStop(this, superProto.onStop);
|
this._callbacks.onSaveInstanceState(this, outState, superProto.onSaveInstanceState);
|
||||||
// },
|
},
|
||||||
|
|
||||||
// onDestroy(): void {
|
onStart(): void {
|
||||||
// this._callbacks.onDestroy(this, superProto.onDestroy);
|
this._callbacks.onStart(this, superProto.onStart);
|
||||||
// },
|
},
|
||||||
|
|
||||||
// onPostResume(): void {
|
onStop(): void {
|
||||||
// this._callbacks.onPostResume(this, superProto.onPostResume);
|
this._callbacks.onStop(this, superProto.onStop);
|
||||||
// },
|
},
|
||||||
|
|
||||||
// onBackPressed(): void {
|
onDestroy(): void {
|
||||||
// this._callbacks.onBackPressed(this, superProto.onBackPressed);
|
this._callbacks.onDestroy(this, superProto.onDestroy);
|
||||||
// },
|
},
|
||||||
|
|
||||||
// onRequestPermissionsResult(requestCode: number, permissions: Array<string>, grantResults: Array<number>): void {
|
onPostResume(): void {
|
||||||
// this._callbacks.onRequestPermissionsResult(this, requestCode, permissions, grantResults, undefined /*TODO: Enable if needed*/);
|
this._callbacks.onPostResume(this, superProto.onPostResume);
|
||||||
// },
|
},
|
||||||
|
|
||||||
// onActivityResult(requestCode: number, resultCode: number, data: android.content.Intent): void {
|
onBackPressed(): void {
|
||||||
// this._callbacks.onActivityResult(this, requestCode, resultCode, data, superProto.onActivityResult);
|
this._callbacks.onBackPressed(this, superProto.onBackPressed);
|
||||||
// },
|
},
|
||||||
// });
|
|
||||||
|
onRequestPermissionsResult(requestCode: number, permissions: Array<string>, grantResults: Array<number>): void {
|
||||||
|
this._callbacks.onRequestPermissionsResult(this, requestCode, permissions, grantResults, undefined /*TODO: Enable if needed*/);
|
||||||
|
},
|
||||||
|
|
||||||
|
onActivityResult(requestCode: number, resultCode: number, data: android.content.Intent): void {
|
||||||
|
this._callbacks.onActivityResult(this, requestCode, resultCode, data, superProto.onActivityResult);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Option 3: The way which worked when using es5 compile target however when targeting es2017, this source code won't work due to the extends from native class so trying options 1 and 2 to achieve same
|
* Option 3: The way which worked when using es5 compile target however when targeting es2017, this source code won't work due to the extends from native class so trying options 1 and 2 to achieve same
|
||||||
|
|||||||
@@ -1,68 +1,124 @@
|
|||||||
import { AndroidFragmentCallbacks, setFragmentCallbacks, setFragmentClass } from '.';
|
import { AndroidFragmentCallbacks, setFragmentCallbacks, setFragmentClass } from '.';
|
||||||
|
|
||||||
@JavaProxy('com.tns.FragmentClass')
|
const superProto = org.nativescript.widgets.FragmentBase.prototype;
|
||||||
@NativeClass
|
const FragmentClass = (<any>org.nativescript.widgets.FragmentBase).extend('com.tns.FragmentClass', {
|
||||||
class FragmentClass extends org.nativescript.widgets.FragmentBase {
|
init() {},
|
||||||
// This field is updated in the frame module upon `new` (although hacky this eases the Fragment->callbacks association a lot)
|
onHiddenChanged(hidden: boolean): void {
|
||||||
private _callbacks: AndroidFragmentCallbacks;
|
this._callbacks.onHiddenChanged(this, hidden, superProto.onHiddenChanged);
|
||||||
|
},
|
||||||
|
|
||||||
constructor() {
|
onCreateAnimator(transit: number, enter: boolean, nextAnim: number): android.animation.Animator {
|
||||||
super();
|
return this._callbacks.onCreateAnimator(this, transit, enter, nextAnim, superProto.onCreateAnimator);
|
||||||
|
},
|
||||||
|
|
||||||
return global.__native(this);
|
onStop(): void {
|
||||||
}
|
this._callbacks.onStop(this, superProto.onStop);
|
||||||
|
},
|
||||||
|
|
||||||
public onHiddenChanged(hidden: boolean): void {
|
onPause(): void {
|
||||||
this._callbacks.onHiddenChanged(this, hidden, super.onHiddenChanged);
|
this._callbacks.onPause(this, superProto.onStop);
|
||||||
}
|
},
|
||||||
|
|
||||||
public onCreateAnimator(transit: number, enter: boolean, nextAnim: number): android.animation.Animator {
|
onCreate(savedInstanceState: android.os.Bundle) {
|
||||||
return this._callbacks.onCreateAnimator(this, transit, enter, nextAnim, super.onCreateAnimator);
|
|
||||||
}
|
|
||||||
|
|
||||||
public onStop(): void {
|
|
||||||
this._callbacks.onStop(this, super.onStop);
|
|
||||||
}
|
|
||||||
|
|
||||||
public onPause(): void {
|
|
||||||
this._callbacks.onPause(this, super.onStop);
|
|
||||||
}
|
|
||||||
|
|
||||||
public onCreate(savedInstanceState: android.os.Bundle) {
|
|
||||||
if (!this._callbacks) {
|
if (!this._callbacks) {
|
||||||
setFragmentCallbacks(this);
|
setFragmentCallbacks(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setHasOptionsMenu(true);
|
this.setHasOptionsMenu(true);
|
||||||
this._callbacks.onCreate(this, savedInstanceState, super.onCreate);
|
this._callbacks.onCreate(this, savedInstanceState, superProto.onCreate);
|
||||||
}
|
},
|
||||||
|
|
||||||
public onCreateView(inflater: android.view.LayoutInflater, container: android.view.ViewGroup, savedInstanceState: android.os.Bundle) {
|
onCreateView(inflater: android.view.LayoutInflater, container: android.view.ViewGroup, savedInstanceState: android.os.Bundle) {
|
||||||
let result = this._callbacks.onCreateView(this, inflater, container, savedInstanceState, super.onCreateView);
|
let result = this._callbacks.onCreateView(this, inflater, container, savedInstanceState, superProto.onCreateView);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
},
|
||||||
|
|
||||||
public onSaveInstanceState(outState: android.os.Bundle) {
|
onSaveInstanceState(outState: android.os.Bundle) {
|
||||||
this._callbacks.onSaveInstanceState(this, outState, super.onSaveInstanceState);
|
this._callbacks.onSaveInstanceState(this, outState, superProto.onSaveInstanceState);
|
||||||
}
|
},
|
||||||
|
|
||||||
public onDestroyView() {
|
onDestroyView() {
|
||||||
this._callbacks.onDestroyView(this, super.onDestroyView);
|
this._callbacks.onDestroyView(this, superProto.onDestroyView);
|
||||||
}
|
},
|
||||||
|
|
||||||
public onDestroy() {
|
onDestroy() {
|
||||||
this._callbacks.onDestroy(this, super.onDestroy);
|
this._callbacks.onDestroy(this, superProto.onDestroy);
|
||||||
}
|
},
|
||||||
|
|
||||||
public toString(): string {
|
toString(): string {
|
||||||
const callbacks = this._callbacks;
|
const callbacks = this._callbacks;
|
||||||
if (callbacks) {
|
if (callbacks) {
|
||||||
return callbacks.toStringOverride(this, super.toString);
|
return callbacks.toStringOverride(this, superProto.toString);
|
||||||
} else {
|
} else {
|
||||||
super.toString();
|
superProto.toString();
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
});
|
||||||
|
|
||||||
|
// @NativeClass
|
||||||
|
// @JavaProxy('com.tns.FragmentClass')
|
||||||
|
// class FragmentClass extends org.nativescript.widgets.FragmentBase {
|
||||||
|
// // This field is updated in the frame module upon `new` (although hacky this eases the Fragment->callbacks association a lot)
|
||||||
|
// private _callbacks: AndroidFragmentCallbacks;
|
||||||
|
|
||||||
|
// constructor() {
|
||||||
|
// super();
|
||||||
|
|
||||||
|
// return global.__native(this);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public onHiddenChanged(hidden: boolean): void {
|
||||||
|
// this._callbacks.onHiddenChanged(this, hidden, super.onHiddenChanged);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public onCreateAnimator(transit: number, enter: boolean, nextAnim: number): android.animation.Animator {
|
||||||
|
// return this._callbacks.onCreateAnimator(this, transit, enter, nextAnim, super.onCreateAnimator);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public onStop(): void {
|
||||||
|
// this._callbacks.onStop(this, super.onStop);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public onPause(): void {
|
||||||
|
// this._callbacks.onPause(this, super.onStop);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public onCreate(savedInstanceState: android.os.Bundle) {
|
||||||
|
// if (!this._callbacks) {
|
||||||
|
// setFragmentCallbacks(this);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// this.setHasOptionsMenu(true);
|
||||||
|
// this._callbacks.onCreate(this, savedInstanceState, super.onCreate);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public onCreateView(inflater: android.view.LayoutInflater, container: android.view.ViewGroup, savedInstanceState: android.os.Bundle) {
|
||||||
|
// let result = this._callbacks.onCreateView(this, inflater, container, savedInstanceState, super.onCreateView);
|
||||||
|
|
||||||
|
// return result;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public onSaveInstanceState(outState: android.os.Bundle) {
|
||||||
|
// this._callbacks.onSaveInstanceState(this, outState, super.onSaveInstanceState);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public onDestroyView() {
|
||||||
|
// this._callbacks.onDestroyView(this, super.onDestroyView);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public onDestroy() {
|
||||||
|
// this._callbacks.onDestroy(this, super.onDestroy);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public toString(): string {
|
||||||
|
// const callbacks = this._callbacks;
|
||||||
|
// if (callbacks) {
|
||||||
|
// return callbacks.toStringOverride(this, super.toString);
|
||||||
|
// } else {
|
||||||
|
// super.toString();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
setFragmentClass(FragmentClass);
|
setFragmentClass(FragmentClass);
|
||||||
|
|||||||
@@ -211,6 +211,7 @@ function setupExitAndPopEnterAnimation(entry: ExpandedEntry, transition: Transit
|
|||||||
|
|
||||||
function getAnimationListener(): android.animation.Animator.AnimatorListener {
|
function getAnimationListener(): android.animation.Animator.AnimatorListener {
|
||||||
if (!AnimationListener) {
|
if (!AnimationListener) {
|
||||||
|
@NativeClass
|
||||||
@Interfaces([android.animation.Animator.AnimatorListener])
|
@Interfaces([android.animation.Animator.AnimatorListener])
|
||||||
class AnimationListenerImpl extends java.lang.Object implements android.animation.Animator.AnimatorListener {
|
class AnimationListenerImpl extends java.lang.Object implements android.animation.Animator.AnimatorListener {
|
||||||
constructor() {
|
constructor() {
|
||||||
@@ -323,6 +324,7 @@ export function _reverseTransitions(previousEntry: ExpandedEntry, currentEntry:
|
|||||||
// android is cloning transitions and we can't expand them :(
|
// android is cloning transitions and we can't expand them :(
|
||||||
function getTransitionListener(entry: ExpandedEntry, transition: androidx.transition.Transition): ExpandedTransitionListener {
|
function getTransitionListener(entry: ExpandedEntry, transition: androidx.transition.Transition): ExpandedTransitionListener {
|
||||||
if (!TransitionListener) {
|
if (!TransitionListener) {
|
||||||
|
@NativeClass
|
||||||
@Interfaces([(<any>androidx).transition.Transition.TransitionListener])
|
@Interfaces([(<any>androidx).transition.Transition.TransitionListener])
|
||||||
class TransitionListenerImpl extends java.lang.Object implements androidx.transition.Transition.TransitionListener {
|
class TransitionListenerImpl extends java.lang.Object implements androidx.transition.Transition.TransitionListener {
|
||||||
constructor(public entry: ExpandedEntry, public transition: androidx.transition.Transition) {
|
constructor(public entry: ExpandedEntry, public transition: androidx.transition.Transition) {
|
||||||
|
|||||||
@@ -48,49 +48,50 @@ export let attachStateChangeListener: android.view.View.OnAttachStateChangeListe
|
|||||||
|
|
||||||
function getAttachListener(): android.view.View.OnAttachStateChangeListener {
|
function getAttachListener(): android.view.View.OnAttachStateChangeListener {
|
||||||
if (!attachStateChangeListener) {
|
if (!attachStateChangeListener) {
|
||||||
var AttachListener = (function (_super) {
|
// var AttachListener = (function (_super) {
|
||||||
__extends(AttachListener, _super);
|
// __extends(AttachListener, _super);
|
||||||
function AttachListener() {
|
// function AttachListener() {
|
||||||
var _this = _super.call(this) || this;
|
// var _this = _super.call(this) || this;
|
||||||
return global.__native(_this);
|
// return global.__native(_this);
|
||||||
}
|
// }
|
||||||
AttachListener.prototype.onViewAttachedToWindow = function (view) {
|
// AttachListener.prototype.onViewAttachedToWindow = function (view) {
|
||||||
var owner = view[ownerSymbol];
|
// var owner = view[ownerSymbol];
|
||||||
if (owner) {
|
|
||||||
owner._onAttachedToWindow();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
AttachListener.prototype.onViewDetachedFromWindow = function (view) {
|
|
||||||
var owner = view[ownerSymbol];
|
|
||||||
if (owner) {
|
|
||||||
owner._onDetachedFromWindow();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
AttachListener = __decorate([Interfaces([android.view.View.OnAttachStateChangeListener])], AttachListener);
|
|
||||||
return AttachListener;
|
|
||||||
})(java.lang.Object);
|
|
||||||
// const AttachListener = (<any>java.lang.Object).extend({
|
|
||||||
// interfaces: [android.view.View.OnAttachStateChangeListener],
|
|
||||||
// init() {
|
|
||||||
// // this.super(this);
|
|
||||||
// // return global.__native(this);
|
|
||||||
// },
|
|
||||||
// onViewAttachedToWindow(view: android.view.View): void {
|
|
||||||
// console.log('onViewAttachedToWindow')
|
|
||||||
// const owner: View = view[ownerSymbol];
|
|
||||||
// console.log('owner:', owner)
|
|
||||||
// if (owner) {
|
// if (owner) {
|
||||||
// // console.log('owner._onAttachedToWindow:', owner._onAttachedToWindow)
|
|
||||||
// owner._onAttachedToWindow();
|
// owner._onAttachedToWindow();
|
||||||
// }
|
// }
|
||||||
// },
|
// };
|
||||||
// onViewDetachedFromWindow(view: android.view.View): void {
|
// AttachListener.prototype.onViewDetachedFromWindow = function (view) {
|
||||||
// const owner: View = view[ownerSymbol];
|
// var owner = view[ownerSymbol];
|
||||||
// if (owner) {
|
// if (owner) {
|
||||||
// owner._onDetachedFromWindow();
|
// owner._onDetachedFromWindow();
|
||||||
// }
|
// }
|
||||||
// },
|
// };
|
||||||
// });
|
// AttachListener = __decorate([Interfaces([android.view.View.OnAttachStateChangeListener])], AttachListener);
|
||||||
|
// return AttachListener;
|
||||||
|
// })(java.lang.Object);
|
||||||
|
|
||||||
|
const AttachListener = (<any>java.lang.Object).extend({
|
||||||
|
interfaces: [android.view.View.OnAttachStateChangeListener],
|
||||||
|
init() {
|
||||||
|
// this.super(this);
|
||||||
|
// return global.__native(this);
|
||||||
|
},
|
||||||
|
onViewAttachedToWindow(view: android.view.View): void {
|
||||||
|
console.log('onViewAttachedToWindow');
|
||||||
|
const owner: View = view[ownerSymbol];
|
||||||
|
console.log('owner:', owner);
|
||||||
|
if (owner) {
|
||||||
|
// console.log('owner._onAttachedToWindow:', owner._onAttachedToWindow)
|
||||||
|
owner._onAttachedToWindow();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onViewDetachedFromWindow(view: android.view.View): void {
|
||||||
|
const owner: View = view[ownerSymbol];
|
||||||
|
if (owner) {
|
||||||
|
owner._onDetachedFromWindow();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
// class AttachListener extends java.lang.Object implements android.view.View.OnAttachStateChangeListener {
|
// class AttachListener extends java.lang.Object implements android.view.View.OnAttachStateChangeListener {
|
||||||
// constructor() {
|
// constructor() {
|
||||||
// super();
|
// super();
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ function initializeImageLoadedListener() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NativeClass
|
||||||
@Interfaces([org.nativescript.widgets.image.Worker.OnImageLoadedListener])
|
@Interfaces([org.nativescript.widgets.image.Worker.OnImageLoadedListener])
|
||||||
class ImageLoadedListenerImpl extends java.lang.Object implements org.nativescript.widgets.image.Worker.OnImageLoadedListener {
|
class ImageLoadedListenerImpl extends java.lang.Object implements org.nativescript.widgets.image.Worker.OnImageLoadedListener {
|
||||||
constructor(public owner: Image) {
|
constructor(public owner: Image) {
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ function initializeNativeClasses(): void {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NativeClass
|
||||||
@Interfaces([android.widget.NumberPicker.Formatter])
|
@Interfaces([android.widget.NumberPicker.Formatter])
|
||||||
class FormatterImpl extends java.lang.Object implements android.widget.NumberPicker.Formatter {
|
class FormatterImpl extends java.lang.Object implements android.widget.NumberPicker.Formatter {
|
||||||
constructor(private owner: ListPicker) {
|
constructor(private owner: ListPicker) {
|
||||||
@@ -37,6 +38,7 @@ function initializeNativeClasses(): void {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NativeClass
|
||||||
@Interfaces([android.widget.NumberPicker.OnValueChangeListener])
|
@Interfaces([android.widget.NumberPicker.OnValueChangeListener])
|
||||||
class ValueChangeListenerImpl extends java.lang.Object implements android.widget.NumberPicker.OnValueChangeListener {
|
class ValueChangeListenerImpl extends java.lang.Object implements android.widget.NumberPicker.OnValueChangeListener {
|
||||||
constructor(private owner: ListPicker) {
|
constructor(private owner: ListPicker) {
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ function initializeItemClickListener(): void {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NativeClass
|
||||||
@Interfaces([android.widget.AdapterView.OnItemClickListener])
|
@Interfaces([android.widget.AdapterView.OnItemClickListener])
|
||||||
class ItemClickListenerImpl extends java.lang.Object implements android.widget.AdapterView.OnItemClickListener {
|
class ItemClickListenerImpl extends java.lang.Object implements android.widget.AdapterView.OnItemClickListener {
|
||||||
constructor(public owner: ListView) {
|
constructor(public owner: ListView) {
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ function initializeNativeClasses(): void {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NativeClass
|
||||||
@Interfaces([androidx.appcompat.widget.SearchView.OnQueryTextListener])
|
@Interfaces([androidx.appcompat.widget.SearchView.OnQueryTextListener])
|
||||||
class CompatQueryTextListenerImpl extends java.lang.Object implements androidx.appcompat.widget.SearchView.OnQueryTextListener {
|
class CompatQueryTextListenerImpl extends java.lang.Object implements androidx.appcompat.widget.SearchView.OnQueryTextListener {
|
||||||
constructor(private owner: SearchBar) {
|
constructor(private owner: SearchBar) {
|
||||||
@@ -62,6 +63,7 @@ function initializeNativeClasses(): void {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NativeClass
|
||||||
@Interfaces([androidx.appcompat.widget.SearchView.OnCloseListener])
|
@Interfaces([androidx.appcompat.widget.SearchView.OnCloseListener])
|
||||||
class CompatCloseListenerImpl extends java.lang.Object implements androidx.appcompat.widget.SearchView.OnCloseListener {
|
class CompatCloseListenerImpl extends java.lang.Object implements androidx.appcompat.widget.SearchView.OnCloseListener {
|
||||||
constructor(private owner: SearchBar) {
|
constructor(private owner: SearchBar) {
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ function initializeNativeClasses(): void {
|
|||||||
// Indicator thickness for material - 2dip. For pre-material - 5dip.
|
// Indicator thickness for material - 2dip. For pre-material - 5dip.
|
||||||
selectedIndicatorThickness = layout.toDevicePixels(apiLevel >= 21 ? 2 : 5);
|
selectedIndicatorThickness = layout.toDevicePixels(apiLevel >= 21 ? 2 : 5);
|
||||||
|
|
||||||
|
@NativeClass
|
||||||
@Interfaces([android.widget.TabHost.OnTabChangeListener])
|
@Interfaces([android.widget.TabHost.OnTabChangeListener])
|
||||||
class TabChangeListenerImpl extends java.lang.Object implements android.widget.TabHost.OnTabChangeListener {
|
class TabChangeListenerImpl extends java.lang.Object implements android.widget.TabHost.OnTabChangeListener {
|
||||||
constructor(public owner: SegmentedBar) {
|
constructor(public owner: SegmentedBar) {
|
||||||
@@ -55,6 +56,7 @@ function initializeNativeClasses(): void {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NativeClass
|
||||||
@Interfaces([android.widget.TabHost.TabContentFactory])
|
@Interfaces([android.widget.TabHost.TabContentFactory])
|
||||||
class TabContentFactoryImpl extends java.lang.Object implements android.widget.TabHost.TabContentFactory {
|
class TabContentFactoryImpl extends java.lang.Object implements android.widget.TabHost.TabContentFactory {
|
||||||
constructor(public owner: SegmentedBar) {
|
constructor(public owner: SegmentedBar) {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ let SeekBarChangeListener: android.widget.SeekBar.OnSeekBarChangeListener;
|
|||||||
|
|
||||||
function initializeListenerClass(): void {
|
function initializeListenerClass(): void {
|
||||||
if (!SeekBarChangeListener) {
|
if (!SeekBarChangeListener) {
|
||||||
|
@NativeClass
|
||||||
@Interfaces([android.widget.SeekBar.OnSeekBarChangeListener])
|
@Interfaces([android.widget.SeekBar.OnSeekBarChangeListener])
|
||||||
class SeekBarChangeListenerImpl extends java.lang.Object implements android.widget.SeekBar.OnSeekBarChangeListener {
|
class SeekBarChangeListenerImpl extends java.lang.Object implements android.widget.SeekBar.OnSeekBarChangeListener {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|||||||
@@ -247,24 +247,23 @@ function onLivesync(args): void {
|
|||||||
imageFetcher.clearCache();
|
imageFetcher.clearCache();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
application.on('livesync', onLivesync);
|
|
||||||
|
|
||||||
application.android.on(
|
(<any>global).NativeScriptGlobals.events.on('livesync', onLivesync);
|
||||||
'activityStarted',
|
|
||||||
<any>profile('initImageCache', (args) => {
|
(<any>global).NativeScriptGlobals.addEventWiring(() => {
|
||||||
|
application.android.on('activityStarted', (args) => {
|
||||||
if (!imageFetcher) {
|
if (!imageFetcher) {
|
||||||
initImageCache(args.activity);
|
initImageCache(args.activity);
|
||||||
} else {
|
} else {
|
||||||
imageFetcher.initCache();
|
imageFetcher.initCache();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
);
|
});
|
||||||
|
|
||||||
application.android.on(
|
(<any>global).NativeScriptGlobals.addEventWiring(() => {
|
||||||
'activityStopped',
|
application.android.on('activityStopped', (args) => {
|
||||||
<any>profile('closeImageCache', (args) => {
|
|
||||||
if (imageFetcher) {
|
if (imageFetcher) {
|
||||||
imageFetcher.closeCache();
|
imageFetcher.closeCache();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
);
|
});
|
||||||
|
|||||||
@@ -355,8 +355,8 @@ const loadCss = profile(`"style-scope".loadCss`, (cssModule: string) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
application.on('cssChanged', <any>onCssChanged);
|
(<any>global).NativeScriptGlobals.events.on('cssChanged', <any>onCssChanged);
|
||||||
application.on('livesync', onLiveSync);
|
(<any>global).NativeScriptGlobals.events.on('livesync', onLiveSync);
|
||||||
|
|
||||||
// Call to this method is injected in the application in:
|
// Call to this method is injected in the application in:
|
||||||
// - no-snapshot - code injected in app.ts by [bundle-config-loader](https://github.com/NativeScript/nativescript-dev-webpack/blob/9b1e34d8ef838006c9b575285c42d2304f5f02b5/bundle-config-loader.ts#L85-L92)
|
// - no-snapshot - code injected in app.ts by [bundle-config-loader](https://github.com/NativeScript/nativescript-dev-webpack/blob/9b1e34d8ef838006c9b575285c42d2304f5f02b5/bundle-config-loader.ts#L85-L92)
|
||||||
@@ -365,7 +365,7 @@ application.on('livesync', onLiveSync);
|
|||||||
// when the snapshot is created - there is no way to use file qualifiers or change the name of on app.css
|
// when the snapshot is created - there is no way to use file qualifiers or change the name of on app.css
|
||||||
export const loadAppCSS = profile('"style-scope".loadAppCSS', (args: application.LoadAppCSSEventData) => {
|
export const loadAppCSS = profile('"style-scope".loadAppCSS', (args: application.LoadAppCSSEventData) => {
|
||||||
loadCss(args.cssFile, null, null);
|
loadCss(args.cssFile, null, null);
|
||||||
application.off('loadAppCss', loadAppCSS);
|
(<any>global).NativeScriptGlobals.events.off('loadAppCss', loadAppCSS);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (application.hasLaunched()) {
|
if (application.hasLaunched()) {
|
||||||
@@ -379,7 +379,7 @@ if (application.hasLaunched()) {
|
|||||||
null
|
null
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
application.on('loadAppCss', <any>loadAppCSS);
|
(<any>global).NativeScriptGlobals.events.on('loadAppCss', <any>loadAppCSS);
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CssState {
|
export class CssState {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ function initializeCheckedChangeListener(): void {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NativeClass
|
||||||
@Interfaces([android.widget.CompoundButton.OnCheckedChangeListener])
|
@Interfaces([android.widget.CompoundButton.OnCheckedChangeListener])
|
||||||
class CheckedChangeListenerImpl extends java.lang.Object implements android.widget.CompoundButton.OnCheckedChangeListener {
|
class CheckedChangeListenerImpl extends java.lang.Object implements android.widget.CompoundButton.OnCheckedChangeListener {
|
||||||
constructor(private owner: Switch) {
|
constructor(private owner: Switch) {
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ function initializeTextTransformation(): void {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NativeClass
|
||||||
@Interfaces([android.text.method.TransformationMethod])
|
@Interfaces([android.text.method.TransformationMethod])
|
||||||
class TextTransformationImpl extends java.lang.Object implements android.text.method.TransformationMethod {
|
class TextTransformationImpl extends java.lang.Object implements android.text.method.TransformationMethod {
|
||||||
constructor(public textBase: TextBase) {
|
constructor(public textBase: TextBase) {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ function initializeTimeChangedListener(): void {
|
|||||||
|
|
||||||
apiLevel = android.os.Build.VERSION.SDK_INT;
|
apiLevel = android.os.Build.VERSION.SDK_INT;
|
||||||
|
|
||||||
|
@NativeClass
|
||||||
@Interfaces([android.widget.TimePicker.OnTimeChangedListener])
|
@Interfaces([android.widget.TimePicker.OnTimeChangedListener])
|
||||||
class TimeChangedListenerImpl extends java.lang.Object implements android.widget.TimePicker.OnTimeChangedListener {
|
class TimeChangedListenerImpl extends java.lang.Object implements android.widget.TimePicker.OnTimeChangedListener {
|
||||||
constructor(public owner: TimePicker) {
|
constructor(public owner: TimePicker) {
|
||||||
|
|||||||
@@ -24,6 +24,5 @@
|
|||||||
"@nativescript/types-android": ["packages/types-android/src/index.ts"]
|
"@nativescript/types-android": ["packages/types-android/src/index.ts"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"exclude": ["node_modules", "tmp", "platforms", "__tests__"],
|
"exclude": ["node_modules", "tmp", "platforms", "__tests__"]
|
||||||
"includes": ["packages/**/*.{ios,android}.ts"]
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user