shell styling

SoniaDevRootSoniaDevRoot Member ✭✭

Im using the bottom tabulation for shell and I don't want to use the titles , ust the icons, but I got an issue in this one:

I want to make the icon in the center, it always leave the place for the title

this is an image when I give the titles values

Answers

  • jezhjezh Member, Xamarin Team Xamurai

    Could you please post a basic demo so that we can test with it ?

  • SoniaDevRootSoniaDevRoot Member ✭✭
    edited July 9
    Shell xmlns="http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
           xmlns:local="clr-namespace:ShelltestApp"
            FlyoutBehavior="Disabled"
           Route="home"
           RouteScheme="app"
           x:Class="ShelltestApp.ShellContainer">
        <Shell.Resources>
            <ResourceDictionary>
                <Style x:Key="BaseStyle" TargetType="Element">
                    <Setter Property="Shell.ShellTitleColor" Value="White" />
                    <Setter Property="Shell.ShellBackgroundColor" Value="#443E43" />
                    <Setter Property="Shell.ShellTabBarBackgroundColor" Value="White" />
                    <Setter Property="Shell.ShellTabBarForegroundColor" Value="#FF3C3934" />
                    <Setter Property="Shell.ShellTabBarTitleColor" Value="#FF3C3934" />
                    <Setter Property="Shell.ShellTabBarUnselectedColor" Value="LightGray" />
                </Style>
            </ResourceDictionary>
        </Shell.Resources>
        <ShellItem Route="tabs"
                   Style="{StaticResource BaseStyle}"
                   Title="Bottom Tab Sample">
            <ShellSection Route="homeTab" Icon="Home.png" >
                <ShellContent Route="homeContent" x:Name="home" >
                    <local:Home/>
                </ShellContent>
            </ShellSection>
            <ShellSection Route="details" Icon="category.png" >
                <ShellContent Route="detailTicket" x:Name="details">
                    <local:Category/>
                </ShellContent>
            </ShellSection>
            <ShellSection Route="Cart" Icon="ticket.png" >
                <ShellContent Route="TicketsList" x:Name="tickets">
                    <local:CartWithTickets/>
                </ShellContent>
            </ShellSection>
            <ShellSection Route="Profile" Icon="account.png" >
                <ShellContent Route="ContentProfile" x:Name="profile">
                    <local:AccountPage/>
                </ShellContent>
            </ShellSection>
        </ShellItem>
    </Shell>
    

    @jezh this is the code for my shell page

    if you want to see the whole code I have it in my github account it's just simply test for the shell
    https://github.com/SoniaCH/ShelltestApp

    thnx

  • jezhjezh Member, Xamarin Team Xamurai

    I will test this question, and will be back as soon as possible.

  • SoniaDevRootSoniaDevRoot Member ✭✭

    thank you @jezh I really appreciate it.

  • TBoccaleriTBoccaleri Member

    Any updates?

  • SoniaDevRootSoniaDevRoot Member ✭✭

    @TBoccaleri no still waiting for an update in this issue

  • LuiCLuiC USMember ✭✭

    can you not make an effect to specify how tabs are drawn on android?
    https://montemagno.com/xamarin-forms-fully-customize-bottom-tabs-on-android-turn-off-shifting/

    there's a mode for only using the icon.
    now, I've not tried this within the shell but I assume it should still work.

  • LuiCLuiC USMember ✭✭

    @SoniaDevRoot did that work for you?

  • SoniaDevRootSoniaDevRoot Member ✭✭

    @LuiC no actually it's is not related to my question, the shell is different from the tabulation

Sign In or Register to comment.