mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 23:25:45 +03:00
Move tab bar colors to styles (#764)
This commit is contained in:
parent
f10114ee17
commit
120e179fb8
3 changed files with 7 additions and 11 deletions
|
@ -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)
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue