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))
|
_groupingsPage = new NavigationPage(new GroupingsPage(true, previousPage: previousPage))
|
||||||
{
|
{
|
||||||
Title = AppResources.MyVault,
|
Title = AppResources.MyVault,
|
||||||
Icon = "lock.png"
|
IconImageSource = "lock.png"
|
||||||
};
|
};
|
||||||
Children.Add(_groupingsPage);
|
Children.Add(_groupingsPage);
|
||||||
|
|
||||||
_generatorPage = new NavigationPage(new GeneratorPage(true, null, this))
|
_generatorPage = new NavigationPage(new GeneratorPage(true, null, this))
|
||||||
{
|
{
|
||||||
Title = AppResources.Generator,
|
Title = AppResources.Generator,
|
||||||
Icon = "refresh.png"
|
IconImageSource = "refresh.png"
|
||||||
};
|
};
|
||||||
Children.Add(_generatorPage);
|
Children.Add(_generatorPage);
|
||||||
|
|
||||||
var settingsPage = new NavigationPage(new SettingsPage(this))
|
var settingsPage = new NavigationPage(new SettingsPage(this))
|
||||||
{
|
{
|
||||||
Title = AppResources.Settings,
|
Title = AppResources.Settings,
|
||||||
Icon = "cog.png"
|
IconImageSource = "cog.png"
|
||||||
};
|
};
|
||||||
Children.Add(settingsPage);
|
Children.Add(settingsPage);
|
||||||
|
|
||||||
|
@ -41,10 +41,6 @@ namespace Bit.App.Pages
|
||||||
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.ToolbarPlacement.Bottom);
|
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.ToolbarPlacement.Bottom);
|
||||||
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.TabbedPage.SetIsSwipePagingEnabled(this, false);
|
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.TabbedPage.SetIsSwipePagingEnabled(this, false);
|
||||||
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.TabbedPage.SetIsSmoothScrollEnabled(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)
|
if(appOptions?.GeneratorTile ?? false)
|
||||||
|
|
|
@ -65,6 +65,10 @@
|
||||||
ApplyToDerivedTypes="True">
|
ApplyToDerivedTypes="True">
|
||||||
<Setter Property="BarBackgroundColor"
|
<Setter Property="BarBackgroundColor"
|
||||||
Value="{StaticResource TabBarBackgroundColor}" />
|
Value="{StaticResource TabBarBackgroundColor}" />
|
||||||
|
<Setter Property="SelectedTabColor"
|
||||||
|
Value="{StaticResource TabBarSelectedItemColor}" />
|
||||||
|
<Setter Property="UnselectedTabColor"
|
||||||
|
Value="{StaticResource TabBarItemColor}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style TargetType="NavigationPage"
|
<Style TargetType="NavigationPage"
|
||||||
ApplyToDerivedTypes="True">
|
ApplyToDerivedTypes="True">
|
||||||
|
|
|
@ -12,10 +12,6 @@ namespace Bit.iOS.Renderers
|
||||||
base.OnElementChanged(e);
|
base.OnElementChanged(e);
|
||||||
TabBar.Translucent = false;
|
TabBar.Translucent = false;
|
||||||
TabBar.Opaque = true;
|
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