1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-15 15:53:44 +00:00

update tabbar

This commit is contained in:
Kyle Spearrin
2019-05-30 21:24:03 -04:00
parent b1eabdfe86
commit 6d9b860c8b
20 changed files with 70 additions and 10 deletions

View File

@@ -1,4 +1,5 @@
using Bit.App.Resources;
using Bit.App.Effect;
using Bit.App.Resources;
using Xamarin.Forms;
namespace Bit.App.Pages
@@ -24,18 +25,23 @@ namespace Bit.App.Pages
var settingsPage = new NavigationPage(new SettingsPage())
{
Title = AppResources.Settings,
Icon = "cogs.png"
Icon = "cog.png"
};
Children.Add(settingsPage);
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.TabbedPage.SetToolbarPlacement(this,
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(Device.RuntimePlatform == Device.Android)
{
Effects.Add(new TabBarEffect());
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.TabbedPage.SetToolbarPlacement(this,
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"]);
}
}
protected async override void OnCurrentPageChanged()