Esempio n. 1
0
        private void CalculatorLayoutInflated(object sender, WatchViewStub.LayoutInflatedEventArgs e)
        {
            pager = (GridViewPager)FindViewById (Resource.Id.pager);
            //pager.SetOnApplyWindowInsetsListener (this);

            var adapter = new CalculatorGridPagerAdapter(this, this.FragmentManager);

            pager.Adapter = adapter;
            pager.PageSelected += (object s, GridViewPager.PageSelectedEventArgs e1) => {
                Console.WriteLine ("{0}   {1}", e1.P0, e1.P1);

                if (e1.P1 == 0) {
                    // update calc fragment, but how
                    adapter.Refresh ();
                }
            };
        }
Esempio n. 2
0
        private void CalculatorLayoutInflated(object sender, WatchViewStub.LayoutInflatedEventArgs e)
        {
            pager = (GridViewPager)FindViewById(Resource.Id.pager);
            //pager.SetOnApplyWindowInsetsListener (this);

            var adapter = new CalculatorGridPagerAdapter(this, this.FragmentManager);

            pager.Adapter       = adapter;
            pager.PageSelected += (object s, GridViewPager.PageSelectedEventArgs e1) => {
                Console.WriteLine("{0}   {1}", e1.P0, e1.P1);

                if (e1.P1 == 0)
                {
                    // update calc fragment, but how
                    adapter.Refresh();
                }
            };
        }