scriptBoris / NavigationSam

Can intercept action navigation back by user
17 stars 1 forks source link

Accessibility on android back arrow announce "null" item #11

Closed nani0979 closed 2 years ago

nani0979 commented 2 years ago

Hi,

I have a issue with Accessibility on Android. I creat a ContentPageRenderer in Android to make the back arrow could announce anything what I expected. Following is my renderer code for back arrow accessibility:

    protected override void OnElementChanged(ElementChangedEventArgs<Page> e)
    {
        base.OnElementChanged(e);

        Activity context = (Activity)this.Context;
       // to find out the back arrow
        var toolbar = context.FindViewById<Toolbar>(Resource.Id.toolbar);

        if(toolbar!=null)
            //to set which string to announce.
            toolbar.NavigationContentDescription = "Go to previous page";
    }

but If my page inherit from "ContentPage" and "INavigationPopInterceptor" at the same time, the accessibility will announce "null", just like built-in ContentPage. Sorry, I'm not a native English speaker, hope you can understand what I say. If you have any question, I will reply you ASAP, thank you in advance for your effort.

scriptBoris commented 2 years ago

@nani0979 hello, thanks for you issue. Im trying reproduction you problem

scriptBoris commented 2 years ago

@nani0979 i created branch https://github.com/scriptBoris/NavigationSam/tree/issue11%23test but i can't see null exception

nani0979 commented 2 years ago

oh...sorry, my words are misleading you. I will take a video when I'm available today. Thank you.

scriptBoris commented 2 years ago

@nani0979 hello, is this issue still actual?