1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-25 12:05:59 +01:00

Move tab bar colors to styles (#764)

This commit is contained in:
Kyle Spearrin 2020-03-11 09:46:48 -04:00 committed by GitHub
parent f10114ee17
commit 120e179fb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 11 deletions

View File

@ -15,21 +15,21 @@ namespace Bit.App.Pages
_groupingsPage = new NavigationPage(new GroupingsPage(true, previousPage: previousPage))
{
Title = AppResources.MyVault,
Icon = "lock.png"
IconImageSource = "lock.png"
};
Children.Add(_groupingsPage);
_generatorPage = new NavigationPage(new GeneratorPage(true, null, this))
{
Title = AppResources.Generator,
Icon = "refresh.png"
IconImageSource = "refresh.png"
};
Children.Add(_generatorPage);
var settingsPage = new NavigationPage(new SettingsPage(this))
{
Title = AppResources.Settings,
Icon = "cog.png"
IconImageSource = "cog.png"
};
Children.Add(settingsPage);
@ -41,10 +41,6 @@ namespace Bit.App.Pages
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.ToolbarPlacement.Bottom);
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.TabbedPage.SetIsSwipePagingEnabled(this, false);
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.TabbedPage.SetIsSmoothScrollEnabled(this, false);
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.TabbedPage.SetBarSelectedItemColor(this,
(Color)Application.Current.Resources["TabBarSelectedItemColor"]);
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.TabbedPage.SetBarItemColor(this,
(Color)Application.Current.Resources["TabBarItemColor"]);
}
if(appOptions?.GeneratorTile ?? false)

View File

@ -65,6 +65,10 @@
ApplyToDerivedTypes="True">
<Setter Property="BarBackgroundColor"
Value="{StaticResource TabBarBackgroundColor}" />
<Setter Property="SelectedTabColor"
Value="{StaticResource TabBarSelectedItemColor}" />
<Setter Property="UnselectedTabColor"
Value="{StaticResource TabBarItemColor}" />
</Style>
<Style TargetType="NavigationPage"
ApplyToDerivedTypes="True">

View File

@ -12,10 +12,6 @@ namespace Bit.iOS.Renderers
base.OnElementChanged(e);
TabBar.Translucent = false;
TabBar.Opaque = true;
TabBar.SelectedImageTintColor =
((Color)Xamarin.Forms.Application.Current.Resources["TabBarSelectedItemColor"]).ToUIColor();
TabBar.UnselectedItemTintColor =
((Color)Xamarin.Forms.Application.Current.Resources["TabBarItemColor"]).ToUIColor();
}
}
}