mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(RootLayout): added topmost method to retrieve view at top (#9826)
This commit is contained in:
committed by
GitHub
parent
61ba4819e9
commit
3bb8fc28e9
BIN
packages/core/platforms/android/core.aar
Normal file
BIN
packages/core/platforms/android/core.aar
Normal file
Binary file not shown.
@@ -4,6 +4,7 @@ import { View } from '../../core/view';
|
|||||||
export class RootLayout extends GridLayout {
|
export class RootLayout extends GridLayout {
|
||||||
open(view: View, options?: RootLayoutOptions): Promise<void>;
|
open(view: View, options?: RootLayoutOptions): Promise<void>;
|
||||||
close(view: View, exitTo?: TransitionAnimation): Promise<void>;
|
close(view: View, exitTo?: TransitionAnimation): Promise<void>;
|
||||||
|
topmost(): View;
|
||||||
bringToFront(view: View, animated?: boolean): Promise<void>;
|
bringToFront(view: View, animated?: boolean): Promise<void>;
|
||||||
closeAll(): Promise<void>;
|
closeAll(): Promise<void>;
|
||||||
getShadeCover(): View;
|
getShadeCover(): View;
|
||||||
|
|||||||
@@ -184,6 +184,10 @@ export class RootLayoutBase extends GridLayout {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
topmost(): View {
|
||||||
|
return this.popupViews.length ? this.popupViews[this.popupViews.length - 1].view : null;
|
||||||
|
}
|
||||||
|
|
||||||
// bring any view instance open on the rootlayout to front of all the children visually
|
// bring any view instance open on the rootlayout to front of all the children visually
|
||||||
bringToFront(view: View, animated: boolean = false): Promise<void> {
|
bringToFront(view: View, animated: boolean = false): Promise<void> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user