mirror of
https://github.com/bitwarden/android.git
synced 2024-11-01 07:35:52 +03:00
27 lines
884 B
C#
27 lines
884 B
C#
using Android.App;
|
|
using Android.Graphics.Drawables;
|
|
using Bit.Android.Controls;
|
|
using Bit.App.Controls;
|
|
using Xamarin.Forms;
|
|
using Xamarin.Forms.Platform.Android;
|
|
|
|
[assembly: ExportRenderer(typeof(ExtendedNavigationPage), typeof(ExtendedNavigationRenderer))]
|
|
namespace Bit.Android.Controls
|
|
{
|
|
public class ExtendedNavigationRenderer : NavigationRenderer
|
|
{
|
|
protected override void OnElementChanged(ElementChangedEventArgs<NavigationPage> e)
|
|
{
|
|
base.OnElementChanged(e);
|
|
|
|
RemoveAppIconFromActionBar();
|
|
}
|
|
|
|
private void RemoveAppIconFromActionBar()
|
|
{
|
|
// ref: http://stackoverflow.com/questions/14606294/remove-icon-logo-from-action-bar-on-android
|
|
var actionBar = ((Activity)Context).ActionBar;
|
|
actionBar.SetIcon(new ColorDrawable(Color.Transparent.ToAndroid()));
|
|
}
|
|
}
|
|
}
|