pocheshire / BottomNavigationBar

Bottom Navigation Bar for Xamarin
214 stars 70 forks source link

OnMenuTabReSelected method does not call #14

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hi Pochehire OnMenuTabReSelected method not call.

 public class MainActivity : AppCompatActivity, IOnMenuTabClickListener
    {
        private BottomBar bottomBar;

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.Main);

            bottomBar = BottomBar.Attach(this, bundle);

            bottomBar.UseFixedMode();

            bottomBar.SetItems(Resource.Menu.bottombar_menu);
            bottomBar.SetOnMenuTabClickListener(this);
        }
        public void OnMenuTabSelected(int menuItemId)
        {
            //ok
        }
        public void OnMenuTabReSelected(int menuItemId)
        {
            //not call
        }
        protected override void OnSaveInstanceState(Bundle outState)
        {
            base.OnSaveInstanceState(outState);
            bottomBar.OnSaveInstanceState(outState);
        }
    }
pocheshire commented 8 years ago

Hi @i-1213 unfortunately I can't repeat this in demo sample. I copied-pasted your code in demo sample (but with SetContentView(Resource.Layout.Shifting);) and it working.

Are you sure that OnMenuTabReSelected not invoked?

ghost commented 8 years ago

@pocheshire this's my demo https://github.com/i-1213/Demo

pocheshire commented 8 years ago

@i-1213 I download your demo and it work.

On which device you run demo? Fot me it Wylefox Swyft on Cyanogen Mode based on Android 6.0