Beispiel #1
0
        void BnveToAccentColor(int index)
        {
            //Set all to white

            var img = bnve.GetIconAt(1);
            var txt = bnve.GetLargeLabelAt(1);

            img.SetColorFilter(Color.Rgb(255, 255, 255));
            txt.SetTextColor(Color.Rgb(255, 255, 255));

            var img0 = bnve.GetIconAt(0);
            var txt0 = bnve.GetLargeLabelAt(0);

            img0.SetColorFilter(Color.Rgb(255, 255, 255));
            txt0.SetTextColor(Color.Rgb(255, 255, 255));

            var img2 = bnve.GetIconAt(2);
            var txt2 = bnve.GetLargeLabelAt(2);

            img2.SetColorFilter(Color.Rgb(255, 255, 255));
            txt2.SetTextColor(Color.Rgb(255, 255, 255));

            var img3 = bnve.GetIconAt(3);
            var txt3 = bnve.GetLargeLabelAt(3);

            img3.SetColorFilter(Color.Rgb(255, 255, 255));
            txt3.SetTextColor(Color.Rgb(255, 255, 255));

            //Sets Accent Color
            var imgindex  = bnve.GetIconAt(index);
            var textindex = bnve.GetLargeLabelAt(index);

            imgindex.SetColorFilter(Color.Rgb(24, 191, 242));
            textindex.SetTextColor(Color.Rgb(24, 191, 242));
        }
Beispiel #2
0
        void BnveToAccentColor(int index)
        {
            //Setting icon on nav bar to colour white
            var img0 = bnve.GetIconAt(0);
            var txt0 = bnve.GetLargeLabelAt(0);

            img0.SetColorFilter(Color.Rgb(255, 255, 255));
            txt0.SetTextColor(Color.Rgb(255, 255, 255));

            var img1 = bnve.GetIconAt(1);
            var txt1 = bnve.GetLargeLabelAt(1);

            img1.SetColorFilter(Color.Rgb(255, 255, 255));
            txt1.SetTextColor(Color.Rgb(255, 255, 255));

            var img3 = bnve.GetIconAt(2);
            var txt3 = bnve.GetLargeLabelAt(2);

            img3.SetColorFilter(Color.Rgb(255, 255, 255));
            txt3.SetTextColor(Color.Rgb(255, 255, 255));

            var img4 = bnve.GetIconAt(3);
            var txt4 = bnve.GetLargeLabelAt(3);

            img4.SetColorFilter(Color.Rgb(255, 255, 255));
            txt4.SetTextColor(Color.Rgb(255, 255, 255));

            //Sets different colour on selected icon on nav bar
            var imgindex  = bnve.GetIconAt(index);
            var textindex = bnve.GetLargeLabelAt(index);

            imgindex.SetColorFilter(Color.Rgb(24, 191, 242));
            textindex.SetTextColor(Color.Rgb(24, 191, 242));
        }
Beispiel #3
0
        // change color on selection
        void BnveToAccentColor(int index)
        {
            // set all to white
            var img = bnve.GetIconAt(1);
            var txt = bnve.GetLargeLabelAt(1);

            img.SetColorFilter(Android.Graphics.Color.Rgb(255, 255, 255));
            txt.SetTextColor(Android.Graphics.Color.Rgb(255, 255, 255));

            var img0 = bnve.GetIconAt(0);
            var txt0 = bnve.GetLargeLabelAt(0);

            img.SetColorFilter(Android.Graphics.Color.Rgb(255, 255, 255));
            txt.SetTextColor(Android.Graphics.Color.Rgb(255, 255, 255));

            //var img2 = bnve.GetIconAt(2);
            //var txt2 = bnve.GetLargeLabelAt(2);
            //img.SetColorFilter(Android.Graphics.Color.Rgb(255, 255, 255));
            //txt.SetTextColor(Android.Graphics.Color.Rgb(255, 255, 255));

            var img3 = bnve.GetIconAt(3);
            var txt3 = bnve.GetLargeLabelAt(3);

            img.SetColorFilter(Android.Graphics.Color.Rgb(255, 255, 255));
            txt.SetTextColor(Android.Graphics.Color.Rgb(255, 255, 255));


            // sets accent color
            var imgindex  = bnve.GetIconAt(index);
            var textindex = bnve.GetLargeLabelAt(index);
            //imgindex.SetColorFilter(Android.Graphics.Color.Rgb(24, 191, 242));
            //textindex.SetTextColor(Android.Graphics.Color.Rgb(24, 191, 242));
        }
Beispiel #4
0
        void Connectviews()
        {
            goOnlineButton = (Button)FindViewById(Resource.Id.goOnlineButton);
            bnve           = (BottomNavigationViewEx)FindViewById(Resource.Id.bnve);
#pragma warning disable CS0618 // Type or member is obsolete
            bnve.EnableItemShiftingMode(false);
#pragma warning restore CS0618 // Type or member is obsolete
#pragma warning disable CS0618 // Type or member is obsolete
            bnve.EnableShiftingMode(false);
#pragma warning restore CS0618 // Type or member is obsolete

            goOnlineButton.Click        += GoOnlineButton_Click;
            bnve.NavigationItemSelected += Bnve_NavigationItemSelected;


            var img0 = bnve.GetIconAt(0);
            var txt0 = bnve.GetLargeLabelAt(0);
            img0.SetColorFilter(Color.Rgb(24, 191, 242));
            txt0.SetTextColor(Color.Rgb(24, 191, 242));

            viewpager = (ViewPager)FindViewById(Resource.Id.viewpager);
            viewpager.OffscreenPageLimit = 3;
            viewpager.BeginFakeDrag();

            SetupViewPager();

            homeFragment.CurrentLocation     += HomeFragment_CurrentLocation;
            homeFragment.TripActionArrived   += HomeFragment_TripActionArrived;
            homeFragment.callRider           += HomeFragment_callRider;
            homeFragment.Navigate            += HomeFragment_Navigate;
            homeFragment.TripActionStartTrip += HomeFragment_TripActionStartTrip;
            homeFragment.TripActionEndTrip   += HomeFragment_TripActionEndTripAsync;
        }
Beispiel #5
0
        private void ConnectViews()
        {
            _goOnlineButton = FindViewById <Button>(Resource.Id.goOnlineButton);
            _bnve           = FindViewById <BottomNavigationViewEx>(Resource.Id.bnve);
            _bnve.EnableItemShiftingMode(false);
            _bnve.EnableShiftingMode(false);

            _goOnlineButton.Click        += GoOnlineButton_Click;
            _bnve.NavigationItemSelected += Bnve_NavigationItemSelected;


            var img0 = _bnve.GetIconAt(0);
            var txt0 = _bnve.GetLargeLabelAt(0);

            img0.SetColorFilter(Color.Rgb(24, 191, 242));
            txt0.SetTextColor(Color.Rgb(24, 191, 242));

            _viewpager = (ViewPager)FindViewById(Resource.Id.viewpager);
            _viewpager.OffscreenPageLimit = 3;
            _viewpager.BeginFakeDrag();

            SetupViewPager();

            _homeFragment.CurrentLocation     += HomeFragment_CurrentLocation;
            _homeFragment.TripActionArrived   += HomeFragment_TripActionArrived;
            _homeFragment.CallRider           += HomeFragment_CallRider;
            _homeFragment.Navigate            += HomeFragment_Navigate;
            _homeFragment.TripActionStartTrip += HomeFragment_TripActionStartTrip;
            _homeFragment.TripActionEndTrip   += HomeFragment_TripActionEndTrip;
        }