1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-26 12:16:07 +01: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
No known key found for this signature in database
GPG Key ID: 9389160FF6C295F3
4 changed files with 2 additions and 37 deletions

View File

@ -1,4 +1,5 @@
using AndroidX.AppCompat.View.Menu;
using AndroidX.Navigation.UI;
using Bit.Core.Abstractions;
using Bit.Core.Utilities;
using Google.Android.Material.BottomNavigation;
@ -68,6 +69,7 @@ namespace Bit.App.Handlers
}
_bottomNavigationView = bottomNavigationView;
_bottomNavigationView.LabelVisibilityMode = LabelVisibilityMode.LabelVisibilityLabeled;
_bottomNavigationView.ItemReselected += BottomNavigationView_ItemReselected;
}
}

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);