mirror of
https://github.com/bitwarden/android.git
synced 2024-12-28 03:48:31 +03:00
PM-3349 ToolbarHandler created for setting text on Android go back buttons.
This commit is contained in:
parent
3cdf1c2f0e
commit
8c623a2067
2 changed files with 22 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
|||
Bit.App.Handlers.StepperHandlerMappings.Setup();
|
||||
Bit.App.Handlers.TimePickerHandlerMappings.Setup();
|
||||
Bit.App.Handlers.ButtonHandlerMappings.Setup();
|
||||
Bit.App.Handlers.ToolbarHandlerMappings.Setup();
|
||||
|
||||
handlers.AddHandler(typeof(Bit.App.Pages.TabsPage), typeof(Bit.App.Handlers.CustomTabbedPageHandler));
|
||||
#else
|
||||
|
|
21
src/App/Platforms/Android/Handlers/ToolbarHandlerMappings.cs
Normal file
21
src/App/Platforms/Android/Handlers/ToolbarHandlerMappings.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
using Bit.Core.Resources.Localization;
|
||||
using Microsoft.Maui.Handlers;
|
||||
|
||||
namespace Bit.App.Handlers
|
||||
{
|
||||
public class ToolbarHandlerMappings
|
||||
{
|
||||
public static void Setup()
|
||||
{
|
||||
ToolbarHandler.Mapper.AppendToMapping(nameof(IToolbar.BackButtonVisible), (handler, view) =>
|
||||
{
|
||||
handler.PlatformView.NavigationContentDescription = AppResources.TapToGoBack;
|
||||
});
|
||||
|
||||
ToolbarHandler.Mapper.AppendToMapping(nameof(Toolbar.BackButtonTitle), (handler, view) =>
|
||||
{
|
||||
handler.PlatformView.NavigationContentDescription = AppResources.TapToGoBack;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue