mirror of
https://github.com/bitwarden/android.git
synced 2024-11-01 15:45:42 +03:00
28 lines
884 B
C#
28 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()));
|
||
|
}
|
||
|
}
|
||
|
}
|