update tabbar
|
@ -110,6 +110,7 @@
|
||||||
<Compile Include="Autofill\FilledItem.cs" />
|
<Compile Include="Autofill\FilledItem.cs" />
|
||||||
<Compile Include="Autofill\Parser.cs" />
|
<Compile Include="Autofill\Parser.cs" />
|
||||||
<Compile Include="Autofill\SavedItem.cs" />
|
<Compile Include="Autofill\SavedItem.cs" />
|
||||||
|
<Compile Include="Effects\TabBarEffect.cs" />
|
||||||
<Compile Include="Migration\AndroidKeyStoreStorageService.cs" />
|
<Compile Include="Migration\AndroidKeyStoreStorageService.cs" />
|
||||||
<Compile Include="Push\FirebaseInstanceIdService.cs" />
|
<Compile Include="Push\FirebaseInstanceIdService.cs" />
|
||||||
<Compile Include="Push\FirebaseMessagingService.cs" />
|
<Compile Include="Push\FirebaseMessagingService.cs" />
|
||||||
|
@ -568,5 +569,11 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AndroidResource Include="Resources\drawable-xxxhdpi\cog.png" />
|
<AndroidResource Include="Resources\drawable-xxxhdpi\cog.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<AndroidResource Include="Resources\values\dimens.xml">
|
||||||
|
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</AndroidResource>
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
31
src/Android/Effects/TabBarEffect.cs
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
using Android.Support.Design.BottomNavigation;
|
||||||
|
using Android.Support.Design.Widget;
|
||||||
|
using Android.Views;
|
||||||
|
using Bit.Droid.Effects;
|
||||||
|
using Xamarin.Forms;
|
||||||
|
using Xamarin.Forms.Platform.Android;
|
||||||
|
|
||||||
|
[assembly: ResolutionGroupName("Bitwarden")]
|
||||||
|
[assembly: ExportEffect(typeof(TabBarEffect), "TabBarEffect")]
|
||||||
|
namespace Bit.Droid.Effects
|
||||||
|
{
|
||||||
|
public class TabBarEffect : PlatformEffect
|
||||||
|
{
|
||||||
|
protected override void OnAttached()
|
||||||
|
{
|
||||||
|
if(!(Container.GetChildAt(0) is ViewGroup layout))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(!(layout.GetChildAt(1) is BottomNavigationView bottomNavigationView))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
bottomNavigationView.LabelVisibilityMode = LabelVisibilityMode.LabelVisibilityLabeled;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnDetached()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Before Width: | Height: | Size: 424 B After Width: | Height: | Size: 781 B |
Before Width: | Height: | Size: 569 B After Width: | Height: | Size: 580 B |
Before Width: | Height: | Size: 926 B After Width: | Height: | Size: 945 B |
Before Width: | Height: | Size: 541 B After Width: | Height: | Size: 948 B |
Before Width: | Height: | Size: 680 B After Width: | Height: | Size: 696 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 745 B After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 810 B After Width: | Height: | Size: 840 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 305 B After Width: | Height: | Size: 574 B |
Before Width: | Height: | Size: 398 B After Width: | Height: | Size: 404 B |
Before Width: | Height: | Size: 593 B After Width: | Height: | Size: 606 B |
5
src/Android/Resources/values/dimens.xml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
<dimen name="design_bottom_navigation_text_size" tools:override="true">15sp</dimen>
|
||||||
|
<dimen name="design_bottom_navigation_active_text_size" tools:override="true">15sp</dimen>
|
||||||
|
</resources>
|
11
src/App/Effect/TabBarEffect.cs
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
using Xamarin.Forms;
|
||||||
|
|
||||||
|
namespace Bit.App.Effect
|
||||||
|
{
|
||||||
|
public class TabBarEffect : RoutingEffect
|
||||||
|
{
|
||||||
|
public TabBarEffect()
|
||||||
|
: base("Bitwarden.TabBarEffect")
|
||||||
|
{ }
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,4 +1,5 @@
|
||||||
using Bit.App.Resources;
|
using Bit.App.Effect;
|
||||||
|
using Bit.App.Resources;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Bit.App.Pages
|
namespace Bit.App.Pages
|
||||||
|
@ -24,10 +25,14 @@ namespace Bit.App.Pages
|
||||||
var settingsPage = new NavigationPage(new SettingsPage())
|
var settingsPage = new NavigationPage(new SettingsPage())
|
||||||
{
|
{
|
||||||
Title = AppResources.Settings,
|
Title = AppResources.Settings,
|
||||||
Icon = "cogs.png"
|
Icon = "cog.png"
|
||||||
};
|
};
|
||||||
Children.Add(settingsPage);
|
Children.Add(settingsPage);
|
||||||
|
|
||||||
|
if(Device.RuntimePlatform == Device.Android)
|
||||||
|
{
|
||||||
|
Effects.Add(new TabBarEffect());
|
||||||
|
|
||||||
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.TabbedPage.SetToolbarPlacement(this,
|
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.TabbedPage.SetToolbarPlacement(this,
|
||||||
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);
|
||||||
|
@ -37,6 +42,7 @@ namespace Bit.App.Pages
|
||||||
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.TabbedPage.SetBarItemColor(this,
|
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.TabbedPage.SetBarItemColor(this,
|
||||||
(Color)Application.Current.Resources["TabBarItemColor"]);
|
(Color)Application.Current.Resources["TabBarItemColor"]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected async override void OnCurrentPageChanged()
|
protected async override void OnCurrentPageChanged()
|
||||||
{
|
{
|
||||||
|
|