예제 #1
0
		void HandleLabelClick (object sender, EventArgs e)
		{
			if (sender == ActiveLabel) {
				return;
			}

			HorizontalMenuLabel label = sender as HorizontalMenuLabel;
			if (label != null) {
				ActiveLabel = label;
			}

			if (OnLabelClick != null) {
				OnLabelClick (new object (), null);
			}
		}
예제 #2
0
		public HorizontalMenu (Activity activity) : base (activity)
		{
			BackgroundColor = CustomColors.LightColorDim;
			mapLabel = new HorizontalMenuLabel (activity);
			mapLabel.Text = "Map";
			mapLabel.Click += HandleLabelClick;

			myListLabel = new HorizontalMenuLabel (activity);
			myListLabel.Text = "My Places";
			myListLabel.Click += HandleLabelClick;

			AddViews (
				mapLabel,
				myListLabel
			);
			ActiveLabel = mapLabel;
		}
예제 #3
0
		public void RestoreInitalState ()
		{
			if (ActiveLabel == mapLabel) {
				return;
			}

			ActiveLabel = mapLabel;
			if (OnLabelClick != null) {
				OnLabelClick (new object (), null);
			}
		}