Replacement of MainPage shows white row

lsdenislsdenis BYMember

Hi all!
I have a problem with MainPage: it's set to NavigationPage, but then I replace it with a ContentPage and see white row at bottom. I've already tried ForceLayout() and it didn't help.
Any suggestions?

Answers

  • ThomasBurkhartThomasBurkhart DEMember ✭✭✭✭

    Could you add your Xaml/Code and eventually a ScreenShot before and After. Also on which Platform does it occur?

  • lsdenislsdenis BYMember

    @ThomasBurkhart, sorry for delay, I'm working on Android application only. This problem occurred with the scrollview, when I replaced it with Stacklayout, everything became fine.
    But when I tried my app on Android 6.0, it worked fine even with Scrollview. Strange.

    <ScrollView VerticalOptions="FillAndExpand">
        <Grid x:Name="Grid"
              BackgroundColor="{StaticResource ApplicationGreen}"
              VerticalOptions="FillAndExpand">
            <Grid.RowDefinitions>
                <RowDefinition Height="3*" />
                <RowDefinition Height="2*" />
            </Grid.RowDefinitions>
            <forms:CachedImage Grid.Row="0"
                               Grid.RowSpan="2"
                               Aspect="Fill"
                               Source="{x:Static app:Images.LoginBackgound}" />
            <forms:CachedImage Grid.Row="0"
                               Grid.RowSpan="2"
                               Aspect="Fill"
                               Source="{x:Static app:Images.WelcomeScreen}" />
    
            <StackLayout Grid.Row="0"
                         HorizontalOptions="Center"
                         Padding="50, 0"
                         VerticalOptions="EndAndExpand">
                <ContentView Padding="0, 0, 0, 20">
                    <forms:CachedImage Source="{x:Static app:Images.NotimeLog}" WidthRequest="250" />
                </ContentView>
    
                <ContentView>
                    <customControls:CustomExtendedLabel FontSize="{StaticResource ThirtySixPixels}"
                                                        HorizontalOptions="Center"
                                                        Style="{StaticResource RobotoRegular}"
                                                        Text="{i18n:Translate Text=Welcome}"
                                                        TextColor="{StaticResource DarkColor2}" />
                </ContentView>
    
                <ContentView>
                    <ActivityIndicator IsRunning="{Binding Path=IsActivityIndicatorShown}" IsVisible="{Binding Path=IsActivityIndicatorShown}" />
                </ContentView>
    
                <StackLayout Padding="15, 0" Spacing="10">
                    <customControls:NextEntry x:Name="EmailEntry"
                                              BackgroundColor="Transparent"
                                              FontFamilyCustom="RobotoCondensed-Regular"
                                              FontSizeCustom="{StaticResource ThirtyPixels}"
                                              Keyboard="Email"
                                              KeyboardLabel="{i18n:Translate Next}"
                                              KeyboardType="Next"
                                              OnEditCompleted="EmailEntry_OnCompleted"
                                              Placeholder="{i18n:Translate Text=User}"
                                              Text="{Binding Path=Login,
                                                             Mode=TwoWay}"
                                              TextColor="{StaticResource ApplicationGreen}">
                        <customControls:NextEntry.Triggers>
                            <DataTrigger Binding="{Binding Path=IsActivityIndicatorShown}"
                                         TargetType="Entry"
                                         Value="True">
                                <DataTrigger.EnterActions>
                                    <triggers:FocusTriggerActions Focused="False" />
                                </DataTrigger.EnterActions>
                            </DataTrigger>
                        </customControls:NextEntry.Triggers>
                    </customControls:NextEntry>
    
                    <customControls:DoneEntry x:Name="PasswordEntry"
                                              BackgroundColor="Transparent"
                                              Completed="PasswordEntry_OnCompleted"
                                              FontFamilyCustom="RobotoCondensed-Regular"
                                              FontSizeCustom="{StaticResource ThirtyPixels}"
                                              IsPassword="True"
                                              Placeholder="{i18n:Translate Text=Password}"
                                              Text="{Binding Path=Password,
                                                             Mode=OneWayToSource}"
                                              TextColor="{StaticResource DarkColor2}">
                        <customControls:DoneEntry.Triggers>
                            <DataTrigger Binding="{Binding Path=IsActivityIndicatorShown}"
                                         TargetType="Entry"
                                         Value="True">
                                <DataTrigger.EnterActions>
                                    <triggers:FocusTriggerActions Focused="False" />
                                </DataTrigger.EnterActions>
                            </DataTrigger>
                        </customControls:DoneEntry.Triggers>
                    </customControls:DoneEntry>
                    <customControls:Border BackgroundColor="Transparent"
                                           HorizontalOptions="End"
                                           IsClippedToBorder="True"
                                           Padding="0">
                        <StackLayout BackgroundColor="{StaticResource BlackColor}"
                                     HorizontalOptions="End"
                                     Orientation="Horizontal"
                                     Padding="35, 5">
                            <StackLayout.GestureRecognizers>
                                <TapGestureRecognizer Command="{Binding LoginButtonClickCommand}" />
                            </StackLayout.GestureRecognizers>
                            <customControls:CustomExtendedLabel FontSize="{StaticResource ThirtySixPixels}"
                                                                Style="{StaticResource RobotoCondensedLight}"
                                                                Text="{i18n:Translate Text=Login}"
                                                                TextColor="White"
                                                                VerticalOptions="Center" />
                            <customControls:CustomExtendedLabel FontSize="{StaticResource ThirtySixPixels}"
                                                                Style="{StaticResource RobotoCondensedLight}"
                                                                Text=" &gt;"
                                                                TextColor="{StaticResource ApplicationGreen}"
                                                                VerticalOptions="Center" />
                        </StackLayout>
                    </customControls:Border>
                </StackLayout>
            </StackLayout>
        </Grid>
    </ScrollView>
    

Sign In or Register to comment.