You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 19, 2021. It is now read-only.
Please, tell us how to recreate the issue in as much detail as possible.
Describe the steps to reproduce it.
Create a regular page and open a modal from it.
In the modal, trigger the loader to display. It will not show. When you click back to close the modal, the loader will be over your regular originating page.
Can you provide your code to show the loader? There is an option to specify where you wanna open it from. This seems like something you should be able to leverage for now with the modal.
this might not work exactly and require some changes but the modal dialog in NS on android is a DialogFragment so it might. If not, I would put a view inside the modal like a text label or something and get it via its loaded event and then pass that into the show() for the android.view option as view: yourlabel.android;.
Activity
bradmartin commentedon Feb 24, 2020
Can you provide your code to show the loader? There is an option to specify where you wanna open it from. This seems like something you should be able to leverage for now with the modal.
Whip commentedon Feb 25, 2020
I used pretty basic standard codes so didn't even mention that.
Originating page
Modal page
bradmartin commentedon Feb 25, 2020
You could possibly try grabbing the
args.object
in theonShownModally
and using that for theview
in the android options to pass toshow()
https://github.com/nstudio/nativescript-loading-indicator#android-specific
this might not work exactly and require some changes but the modal dialog in NS on android is a
DialogFragment
so it might. If not, I would put a view inside themodal
like a text label or something and get it via itsloaded
event and then pass that into theshow()
for theandroid.view
option asview: yourlabel.android;
.Whip commentedon Feb 26, 2020
Ok. I'll give that a try.
tonyhogben commentedon Mar 13, 2020
Did you get this working @VeeK727? I'm having the same issue.
Whip commentedon Mar 14, 2020
No, I used an ActivityIndicator because it worked better in my particular situation but the method @bradmartin suggested is likely to work.
tonyhogben commentedon Mar 16, 2020
Thanks @VeeK727. Unfortunately @bradmartin's suggestion does not appear to work. I tried this...
XML:
TS:
I also tried using the
args.object
fromonShownModally
as @bradmartin suggested, but no dice either.Both of these work on iOS though.
@bradmartin, any other suggestions?
sittaman commentedon Jun 4, 2020
Hi folks, I ran into the same issue and here's how I sorted it out:
I got the modal reference
@ViewChild('modal', { static: false}) modal: ElementRef<View>;
then I passed the nativeView into the android.view option:
this.modal.nativeElement.nativeView
and it showed correctly!
hope it helps!
btw I'm using Nativescript Angular.
kriefsacha commentedon Sep 9, 2020
@sittaman to be able to get the modal by ViewChild where did you put the id "modal" ? And you saied android.view but what about IOS ?
sittaman commentedon Sep 9, 2020
The id is the view (or modal) you want the loading to appear on top of. Or the one that is appearing over the loading.
<FlexboxLayout #modal class="nt-form" alignItems="center" height="100%" flexDirection="column">
As for iOS unfortunately I can't help, the app I was working on was android only and I have no means to test it on iOS, sorry.