PM-3349 ToolbarHandler created for setting text on Android go back buttons.
This commit is contained in:
parent
3cdf1c2f0e
commit
8c623a2067
|
@ -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
|
||||
|
|
|
@ -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 New Issue