How do you change a tab icon on Tap (android custom bottom bar navigation)

Hello guys!,

i implemented this in my project https://github.com/pocheshire/BottomNavigationBar , a bottom navigation bar for android and iOS.
The application is a Radio Player, and when pressing PLAY i want the button to change to a PAUSE icon.

This is the function i use to know when a tab is tapped.

public void OnTabReSelected(int position)
{

        if (position == PlayPageIndex)
        {

            // playPage.ChangeIcon(IsPlaying);
            if (IsPlaying)
            {
                playPage.Icon = "ic_pause_black";
                playPage.Title = "Pause";
            }
            else {
                playPage.Icon = "ic_play_arrow_black";
                playPage.Title = "Play";
            }

            IsPlaying = !IsPlaying;
            Console.WriteLine("You touch me set " + IsPlaying);
            return;
        }

    }
Sign In or Register to comment.