protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.main_activity);

            WatchViewStub stub = (WatchViewStub)FindViewById(Resource.Id.stub);

            stub.SetOnLayoutInflatedListener(this);

            dismissOverlayView = (DismissOverlayView)FindViewById(Resource.Id.dismiss_overlay);
            gestureDetector    = new GestureDetectorCompat(this, new LongPressListener(this));
        }
Пример #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 ();
                }
            };
        }
Пример #3
0
		public void OnLayoutInflated (WatchViewStub stub)
		{
			rectBackground = (RelativeLayout)FindViewById (Resource.Id.rect_layout);
			roundBackground = (RelativeLayout)FindViewById (Resource.Id.round_layout);
		}
 public void OnLayoutInflated(WatchViewStub stub)
 {
     rectBackground  = (RelativeLayout)FindViewById(Resource.Id.rect_layout);
     roundBackground = (RelativeLayout)FindViewById(Resource.Id.round_layout);
 }