HorusSoftwareUY / Xamarin.Forms.Skeleton

The new loading approach for cool apps in Xamarin Forms
MIT License
456 stars 52 forks source link

CornerRadius and color settings not working on android #37

Open GeoSaffer opened 4 days ago

GeoSaffer commented 4 days ago

Seems like the Corner radius and color setting not working for Android

Here is a pic of Windows image

and here is one of Android image

<StackLayout 
 sk:Skeleton.IsParent="True" 
 sk:Skeleton.IsBusy="{Binding IsLoading}"
 sk:Skeleton.Hide="False"
 sk:Skeleton.Animation="{sk:DefaultAnimation Source=Fade, Interval='900',Parameter='0.3'}">
                    <StackLayout Orientation="Horizontal"  Spacing="5" Padding="0"  >
                      <BoxView Color="#22FFFFFF" WidthRequest="200" HeightRequest="40" CornerRadius="2"/>
                      <BoxView Color="#22FFFFFF" WidthRequest="40" HeightRequest="40" CornerRadius="5" HorizontalOptions="EndAndExpand"/>
                    </StackLayout>
                    <BoxView Color="#22FFFFFF" WidthRequest="300" HeightRequest="10" CornerRadius="5" HorizontalOptions="Start"/>
                    <BoxView Color="#22FFFFFF" WidthRequest="600" HeightRequest="10" CornerRadius="5" HorizontalOptions="Start"/>
                    <BoxView HeightRequest="1" HorizontalOptions="Fill" Color="{StaticResource Gray500}" Margin="0,0"/>
                  </StackLayout>
GeoSaffer commented 4 days ago

Found that the following code will make it work on Android

 <StackLayout IsVisible="{Binding IsLoading}"  
            Spacing="10" 
            sk:Skeleton.IsParent="True" 
            sk:Skeleton.IsBusy="{Binding IsLoading}"
            sk:Skeleton.Hide="False"
            sk:Skeleton.Animation="{sk:DefaultAnimation Source=Fade, Interval='900',Parameter='0.3'}">
   <StackLayout Orientation="Horizontal"  Spacing="5" Padding="0"  >
     <BoxView WidthRequest="200" HeightRequest="40" CornerRadius="2"  sk:Skeleton.IsBusy="{Binding IsLoading}"  sk:Skeleton.BackgroundColor="#22FFFFFF" />
     <BoxView WidthRequest="40" HeightRequest="40" CornerRadius="5" HorizontalOptions="EndAndExpand"  sk:Skeleton.IsBusy="{Binding IsLoading}" sk:Skeleton.BackgroundColor="#22FFFFFF"/>
   </StackLayout>
   <BoxView WidthRequest="300" HeightRequest="10" CornerRadius="5" HorizontalOptions="Start" sk:Skeleton.IsBusy="{Binding IsLoading}" sk:Skeleton.BackgroundColor="#22FFFFFF"/>
   <BoxView WidthRequest="600" HeightRequest="10" CornerRadius="5" HorizontalOptions="Start"  sk:Skeleton.IsBusy="{Binding IsLoading}" sk:Skeleton.BackgroundColor="#22FFFFFF"/>
   <BoxView HeightRequest="1" HorizontalOptions="Fill" Margin="0,0"  sk:Skeleton.IsBusy="{Binding IsLoading}" sk:Skeleton.BackgroundColor="#22FFFFFF"/>
 </StackLayout>

image