PopupPage lag in Android

aliZAKRIAaliZAKRIA USMember ✭✭✭

Hello guys i am using PopupPage plugin it is work fine in IOS but in Android there is delay(lag) when opening and closing , any advice

it simple just StackLayout in it

Tagged:

Answers

  • daalboodaalboo Member ✭✭

    Are you using some animations?

  • aliZAKRIAaliZAKRIA USMember ✭✭✭

    @daalboo said:
    Are you using some animations?

    yes

  • LandLuLandLu Member, Xamarin Team Xamurai

    Are you using this plugin:
    https://github.com/rotorgames/Rg.Plugins.Popup
    It runs smoothly on Android on my side:

    Maybe it is related to the animations that you used. Try to share your sample here to help us reproduce this lag.

  • aliZAKRIAaliZAKRIA USMember ✭✭✭

    yes i am using this , and this my xml code

    <?xml version="1.0" encoding="utf-8" ?>
    <pages:PopupPage  xmlns="http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:d="http://xamarin.com/schemas/2014/forms/design"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                        xmlns:pages="clr-namespace:Rg.Plugins.Popup.Pages;assembly=Rg.Plugins.Popup"
        xmlns:animations="clr-namespace:Rg.Plugins.Popup.Animations;assembly=Rg.Plugins.Popup"
                              xmlns:yummy="clr-namespace:Xamarin.Forms.PancakeView;assembly=Xamarin.Forms.PancakeView"
                                     xmlns:custom="clr-namespace:shobiklobik.Custom"
                      xmlns:ffimageloading="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms"
                 xmlns:fftransformations="clr-namespace:FFImageLoading.Transformations;assembly=FFImageLoading.Transformations"
                 mc:Ignorable="d"
                      FlowDirection="RightToLeft"
                 x:Class="shobiklobik.Views.SIDE_MUNE" CloseWhenBackgroundIsClicked="True" CompressedLayout.IsHeadless="True">
        <pages:PopupPage.Animation>
            <animations:ScaleAnimation
                PositionIn="Right"
                PositionOut="Right"
                ScaleIn="2"
                ScaleOut="0.8"
                DurationIn="300"
                DurationOut="300"
                EasingIn="SinOut"
                EasingOut="SinIn"
                HasBackgroundAnimation="True" />
        </pages:PopupPage.Animation>
        <StackLayout   BackgroundColor="White"  HorizontalOptions="FillAndExpand"   VerticalOptions="FillAndExpand">
            <ImageButton   BackgroundColor="Transparent" HorizontalOptions="StartAndExpand" HeightRequest="40" Margin="10,10,10,0" Source="xclose3.png" x:Name="close" Clicked="close_Clicked" />
            <ScrollView  BackgroundColor="White" VerticalOptions="StartAndExpand" HorizontalOptions="StartAndExpand">
                <Grid   BackgroundColor="White"  x:Name="MenuTableSection" HorizontalOptions="FillAndExpand">
    
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
    
                    <StackLayout Grid.Row="0" Grid.Column="0" Padding="5" HorizontalOptions="FillAndExpand" BackgroundColor="Transparent" HeightRequest="80">
                        <Image Aspect="AspectFill"
                               HorizontalOptions="Center"
                               VerticalOptions="Center"
                               HeightRequest="70"
                                Source="logo.png" />
                    </StackLayout>
    
                    <StackLayout   Grid.Row="1" Grid.Column="0"  x:Name="backhome" HorizontalOptions="FillAndExpand" HeightRequest="50">
                        <Grid HorizontalOptions="FillAndExpand">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Image Grid.Row="0" Grid.Column="0" Source="home.png" Margin="10" HorizontalOptions="End"  HeightRequest="30" />
                            <Label Grid.Row="0" Grid.Column="1" Text="الرئيسية" HorizontalOptions="FillAndExpand" HorizontalTextAlignment="End" FontSize="18"  VerticalTextAlignment="Center" TextColor="Black" />
                        </Grid>
    
                        <BoxView HorizontalOptions="FillAndExpand" BackgroundColor="LightGray" HeightRequest="0.5"/>
                        <StackLayout.GestureRecognizers>
                            <TapGestureRecognizer Tapped="backhome_Tapped" />
                        </StackLayout.GestureRecognizers>
                    </StackLayout>
    
                    <StackLayout Grid.Row="2" Grid.Column="0" x:Name="PROFILE_EDIT"  HorizontalOptions="FillAndExpand" HeightRequest="50">
                        <Grid HorizontalOptions="FillAndExpand">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Image  Grid.Row="0" Grid.Column="0" Source="userprofile.png" Margin="10" HorizontalOptions="End" HeightRequest="30" />
    
                            <Label Grid.Row="0" Grid.Column="1" HorizontalTextAlignment="End" Text="تعديل البيانات" FontSize="18" VerticalTextAlignment="Center" TextColor="Black" />
                        </Grid>
    
    
                        <BoxView HorizontalOptions="FillAndExpand" BackgroundColor="LightGray" HeightRequest="0.5"/>
                        <StackLayout.GestureRecognizers>
                            <TapGestureRecognizer Tapped="PROFILE_EDIT_Tapped" />
                        </StackLayout.GestureRecognizers>
                    </StackLayout>
    
                    <StackLayout Grid.Row="3" Grid.Column="0" x:Name="requstasserviceprovider"  HorizontalOptions="FillAndExpand" HeightRequest="50">
    
                        <Grid HorizontalOptions="FillAndExpand">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Image Grid.Row="0" Grid.Column="0" Source="applay.png" Margin="10" HorizontalOptions="End"  HeightRequest="30" />
    
                            <Label Grid.Row="0" Grid.Column="1" HorizontalTextAlignment="End"  Text="تقديم طلب كمقدم خدمة" FontSize="18" VerticalTextAlignment="Center" TextColor="Black" />
                        </Grid>
    
    
                        <BoxView HorizontalOptions="FillAndExpand" BackgroundColor="LightGray" HeightRequest="0.5"/>
                        <StackLayout.GestureRecognizers>
                            <TapGestureRecognizer Tapped="requstasserviceprovider_Tapped" />
                        </StackLayout.GestureRecognizers>
                    </StackLayout>
    
                    <StackLayout Grid.Row="4" Grid.Column="0" x:Name="MYADS"  HorizontalOptions="FillAndExpand" HeightRequest="50">
    
                        <Grid HorizontalOptions="FillAndExpand">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
    
                            <Image  Grid.Row="0" Grid.Column="0" Source="label.png" Margin="10" HorizontalOptions="End" HeightRequest="30" />
                            <Label  Grid.Row="0" Grid.Column="1" HorizontalTextAlignment="End" Text="اعلاناتي" FontSize="18" VerticalTextAlignment="Center" TextColor="Black" />
                        </Grid>
    
    
                        <BoxView HorizontalOptions="FillAndExpand" BackgroundColor="LightGray" HeightRequest="0.5"/>
                        <StackLayout.GestureRecognizers>
                            <TapGestureRecognizer Tapped="MYADS_Tapped" />
                        </StackLayout.GestureRecognizers>
                    </StackLayout>
    
                    <StackLayout Grid.Row="5" Grid.Column="0" x:Name="MYPOSTS"  HorizontalOptions="FillAndExpand" HeightRequest="50">
    
                        <Grid HorizontalOptions="FillAndExpand">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Image Grid.Row="0" Grid.Column="0" Source="label.png" Margin="10" HorizontalOptions="End"  HeightRequest="30" />
    
                            <Label  Grid.Row="0" Grid.Column="1" HorizontalTextAlignment="End" Text="اعلاناتي في حراج" FontSize="18" VerticalTextAlignment="Center" TextColor="Black" />
                        </Grid>
    
                        <BoxView HorizontalOptions="FillAndExpand" BackgroundColor="LightGray" HeightRequest="0.5"/>
                        <StackLayout.GestureRecognizers>
                            <TapGestureRecognizer Tapped="MYPOSTS_Tapped" />
                        </StackLayout.GestureRecognizers>
                    </StackLayout>
    
                    <StackLayout Grid.Row="6" Grid.Column="0" x:Name="ADS" HorizontalOptions="FillAndExpand" HeightRequest="50">
    
                        <Grid HorizontalOptions="FillAndExpand">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Image Grid.Row="0" Grid.Column="0" Source="heartfav.png" Margin="10" HorizontalOptions="End"  HeightRequest="30" />
                            <Label  Grid.Row="0" Grid.Column="1" HorizontalTextAlignment="End" Text="مفضلتي من اعلانات شبيك" FontSize="18" VerticalTextAlignment="Center" TextColor="Black" />
                        </Grid>
    
                        <BoxView HorizontalOptions="FillAndExpand" BackgroundColor="LightGray" HeightRequest="0.5"/>
                        <StackLayout.GestureRecognizers>
                            <TapGestureRecognizer Tapped="ADS_Tapped" />
                        </StackLayout.GestureRecognizers>
                    </StackLayout>
    
                    <StackLayout  Grid.Row="7" Grid.Column="0" x:Name="servicelikeed" HorizontalOptions="FillAndExpand" HeightRequest="50">
                        <Grid HorizontalOptions="FillAndExpand">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Image  Grid.Row="0" Grid.Column="0" Source="heartfav.png" Margin="10" HorizontalOptions="End" HeightRequest="30" />
                            <Label  Grid.Row="0" Grid.Column="1" HorizontalTextAlignment="End" Text="مفضلتي من خدمات شبيك" FontSize="18" VerticalTextAlignment="Center" TextColor="Black" />
                        </Grid>
    
    
                        <BoxView HorizontalOptions="FillAndExpand" BackgroundColor="LightGray" HeightRequest="0.5"/>
                        <StackLayout.GestureRecognizers>
                            <TapGestureRecognizer Tapped="servicelikeed_Tapped" />
                        </StackLayout.GestureRecognizers>
                    </StackLayout>
    
                    <StackLayout Grid.Row="8" Grid.Column="0" x:Name="MYREQUSTS"   HorizontalOptions="FillAndExpand" HeightRequest="50">
    
                        <Grid HorizontalOptions="FillAndExpand">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Image  Grid.Row="0" Grid.Column="0" Source="ui.png" Margin="10" HorizontalOptions="End" HeightRequest="30" />
                            <Label  Grid.Row="0" Grid.Column="1" HorizontalTextAlignment="End" Text="طلباتي " FontSize="18" VerticalTextAlignment="Center" TextColor="Black" />
                        </Grid>
    
    
                        <BoxView HorizontalOptions="FillAndExpand" BackgroundColor="LightGray" HeightRequest="0.5"/>
                        <StackLayout.GestureRecognizers>
                            <TapGestureRecognizer Tapped="MYREQUSTS_Tapped" />
                        </StackLayout.GestureRecognizers>
                    </StackLayout>
    
                    <StackLayout  Grid.Row="9" Grid.Column="0" x:Name="ORDERTOME"  HorizontalOptions="FillAndExpand" HeightRequest="50">
    
                        <Grid HorizontalOptions="FillAndExpand">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
    
                            <Image Grid.Row="0" Grid.Column="0" Source="ui.png" Margin="10" HorizontalOptions="End"  HeightRequest="30" />
                            <Label Grid.Row="0" Grid.Column="1"  HorizontalTextAlignment="End" Text="الطلبات المرسلة لي" FontSize="18" VerticalTextAlignment="Center" TextColor="Black" />
                        </Grid>
    
    
                        <BoxView HorizontalOptions="FillAndExpand" BackgroundColor="LightGray" HeightRequest="0.5"/>
                        <StackLayout.GestureRecognizers>
                            <TapGestureRecognizer Tapped="ORDERTOME_Tapped" />
                        </StackLayout.GestureRecognizers>
                    </StackLayout>
    
                    <StackLayout  Grid.Row="10" Grid.Column="0" HorizontalOptions="FillAndExpand" HeightRequest="50">
    
                        <Grid HorizontalOptions="FillAndExpand">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
    
                            <Image Grid.Row="0" Grid.Column="0" Source="logout.png" Margin="10" HorizontalOptions="End"  HeightRequest="30" />
                            <Label Grid.Row="0" Grid.Column="1" HorizontalTextAlignment="End" Text="الخروج" FontSize="18" VerticalTextAlignment="Center" TextColor="Red" />
                        </Grid>
                        <StackLayout.GestureRecognizers>
                            <TapGestureRecognizer Tapped="LogOut_Tapped" />
                        </StackLayout.GestureRecognizers>
                    </StackLayout>
                </Grid>
            </ScrollView>
        </StackLayout>
    </pages:PopupPage> 
    
  • batmacibatmaci DEMember ✭✭✭✭✭
    edited February 17

    Your UI is too complicated and it probably takes time to render it. Try with a simpler Xaml code to see if you have the issue

Sign In or Register to comment.