bitwarden-mobile/src/Android/Effects/TabBarEffect.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
840 B
C#
Raw Normal View History

using Android.Views;
2019-05-31 03:24:03 +02:00
using Bit.Droid.Effects;
using Google.Android.Material.BottomNavigation;
2019-05-31 03:24:03 +02:00
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))
2019-05-31 03:24:03 +02:00
{
return;
}
if (!(layout.GetChildAt(1) is BottomNavigationView bottomNavigationView))
2019-05-31 03:24:03 +02:00
{
return;
}
bottomNavigationView.LabelVisibilityMode = LabelVisibilityMode.LabelVisibilityLabeled;
}
protected override void OnDetached()
{
}
}
}