mirror of
https://github.com/bitwarden/mobile
synced 2025-12-20 02:03:49 +00:00
Remove android icon from nav bar. Persist selection for lock options.
This commit is contained in:
@@ -205,6 +205,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Controls\ExtendedEditorRenderer.cs" />
|
||||
<Compile Include="Controls\ExtendedNavigationPage.cs" />
|
||||
<Compile Include="Controls\ExtendedSwitchCellRenderer.cs" />
|
||||
<Compile Include="Controls\ExtendedViewCellRenderer.cs" />
|
||||
<Compile Include="Controls\ExtendedTextCellRenderer.cs" />
|
||||
|
||||
27
src/Android/Controls/ExtendedNavigationPage.cs
Normal file
27
src/Android/Controls/ExtendedNavigationPage.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user