Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Well, this is quirky. :)

$
0
0

So in a StackLayoutI had an embedded StackLayout:

        <StackLayout x:Name="slActivity" Orientation ="Horizontal" IsVisible="false" >
            <ActivityIndicator x:Name="actSpinner" />
            <Label x:Name="lblLoading" Text="Loading..." Font="Bold" />
        </StackLayout>

Now, in my code, obviously when I need that to show I would set the slActivity.IsVisible to true, and set the actSpinner.IsRunning to true. When the activity finishes, I set both back to false.

Only, when I tested my app on the Android simulator, I was only seeing my ActivityIndicator, and not the Label. I couldn't understand why...as it turns out, I didn't set the StackLayoutto visible, I set the ActivityIndicatorto visible. A simple mistake, simple to fix...

...but why did the ActivityIndicator show up if the StackLayout that contains it was still set to not be visible??


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>