1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-04 09:33:16 +00:00

TabBarEffect removed and it's behavior is now taken care of by CustomTabbedPageHandler

This commit is contained in:
Dinis Vieira
2023-10-01 22:32:37 +01:00
parent 8b7f9b9fb3
commit 9f6c8601d3
4 changed files with 2 additions and 37 deletions

View File

@@ -1,34 +0,0 @@
using Microsoft.Maui.Controls;
using Microsoft.Maui;
using Microsoft.Maui.Controls.Platform;
namespace Bit.App.Effects
{
public class TabBarEffect : RoutingEffect
{
}
#if ANDROID
public class TabBarPlatformEffect : PlatformEffect
{
protected override void OnAttached()
{
// TODO: [MAUI-Migration] [Critical]
// now Container is View instead of ViewGroup, let's review this
//if (!(Container.GetChildAt(0) is ViewGroup layout))
//{
// return;
//}
//if (!(layout.GetChildAt(1) is BottomNavigationView bottomNavigationView))
//{
// return;
//}
//bottomNavigationView.LabelVisibilityMode = LabelVisibilityMode.LabelVisibilityLabeled;
}
protected override void OnDetached()
{
}
}
#endif
}

View File

@@ -25,7 +25,6 @@ public static class MauiProgram
#if ANDROID
effects.Add<AppEffects.FixedSizeEffect, AppEffects.FixedSizePlatformEffect>();
effects.Add<AppEffects.NoEmojiKeyboardEffect, AppEffects.NoEmojiKeyboardPlatformEffect>();
effects.Add<AppEffects.TabBarEffect, AppEffects.TabBarPlatformEffect>();
effects.Add<AppEffects.RemoveFontPaddingEffect, AppEffects.RemoveFontPaddingPlatformEffect>();
#endif
customEffectsBuilder?.Invoke(effects);

View File

@@ -58,8 +58,6 @@ namespace Bit.App.Pages
if (DeviceInfo.Platform == DevicePlatform.Android)
{
Effects.Add(new TabBarEffect());
Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific.TabbedPage.SetToolbarPlacement(this,
Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific.ToolbarPlacement.Bottom);
Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific.TabbedPage.SetIsSwipePagingEnabled(this, false);