I am developing Tabs using TabbedPage in xaml
. The default tabs Icons & Text size is big so I need to reduce the size of Icons & Text. Below is my main.xaml
code Where I am setting icons.
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:TabbedApp">
<local:DairyTabs Icon="dairy" HeightRequest="10" WidthRequest="10" ></local:DairyTabs>
<local:Mykid Icon="kid" ></local:Mykid>
<local:Event Icon="about"></local:Event>
</TabbedPage>
This is First page of tabs where I am giving Title of tab as Title="Dairy"
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
Title="Dairy">
<ContentPage.Content>
<StackLayout>
<Button x:Name="btnDemo" Text="Go for 2nd page"></Button>
</StackLayout>
</ContentPage.Content>
</ContentPage>
See the below Screenshot where you can see icons and tab text.
In your Android project's
Resources/values/style.xml
file, you can create a style:And then in your
Resources/layout/tabs.axml
file, you can use the style:As for the icon, try this: https://stackoverflow.com/a/46465233/3183946
And by the way, I think "Dairy" should be "Diary" in your app
After some effort i get it work for android using
TabbedPageRenderer
. Created custom layout withImageView
&TetxtView
below Custom_tab_layou.xamlCreated
MyTabbedPageRenderer
class