Exemplo n.º 1
0
		public ScreenMap(ScreenController ctrl, UIObject obj)
		{
			this.ctrl = ctrl;
			this.activeObject = obj;
			if (this.activeObject != null) {
				this.activeObject.PropertyChanged += OnPropertyChanged;
			}
		}
Exemplo n.º 2
0
		public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			base.OnCreateView (inflater, container, savedInstanceState);

			// Save ScreenController for later use
			ctrl = ((ScreenController)this.Activity);

			var view = inflater.Inflate(Resource.Layout.ScreenMap, container, false);

			LinearLayout layoutMap = view.FindViewById<LinearLayout> (Resource.Id.layoutMap);

			var text = new TextView(this.Activity);
			text.Text = "Map";

			layoutMap.AddView(text);

			return view;
		}
Exemplo n.º 3
0
		public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			base.OnCreateView (inflater, container, savedInstanceState);

			// Save ScreenController for later use
			ctrl = ((ScreenController)this.Activity);

			if (container == null)
				return null;

			var view = inflater.Inflate(Resource.Layout.CheckLocation, container, false);

			textDescription = view.FindViewById<TextView> (Resource.Id.textDescription);
			textCoordinates = view.FindViewById<TextView> (Resource.Id.textCoords);
			textAccuracy = view.FindViewById<TextView> (Resource.Id.textAccuracy);
			button = view.FindViewById<Button> (Resource.Id.buttonStart);

			button.SetBackgroundResource(Resource.Drawable.apptheme_btn_default_holo_light_red);
			button.Click += OnButtonClicked;

			return view;
		}
		/// <summary>
		/// Initializes a new instance of the <see cref="WF.Player.Android.ScreenMainAdapter"/> class.
		/// </summary>
		/// <param name="context">Context.</param>
		/// <param name="engine">Engine.</param>
		public ScreenMainAdapter(ScreenMain owner, ScreenController ctrl) : base()
		{
			this.ctrl = ctrl;
			this.owner = owner;
		}
Exemplo n.º 5
0
		public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			base.OnCreateView (inflater, container, savedInstanceState);

			// Save ScreenController for later use
			ctrl = ((ScreenController)this.Activity);

			if (container == null)
				return null;

			var view = inflater.Inflate(Resource.Layout.ScreenDialog, container, false);

			imageView = view.FindViewById<ImageView> (Resource.Id.imageView);
			textDescription = view.FindViewById<TextView> (Resource.Id.textDescription);
			layoutDialog = view.FindViewById<LinearLayout> (Resource.Id.layoutDialog);
			layoutMultipleChoice = view.FindViewById<LinearLayout> (Resource.Id.layoutMultipleChoice);
			layoutInput = view.FindViewById<LinearLayout> (Resource.Id.layoutInput);

			if (input == null) {
				// Normal dialog
				layoutDialog.Visibility = ViewStates.Visible;
				layoutMultipleChoice.Visibility = ViewStates.Gone;
				layoutInput.Visibility = ViewStates.Gone;

				btnView1 = view.FindViewById<Button> (Resource.Id.button1);
				btnView1.SetBackgroundResource(Resource.Drawable.apptheme_btn_default_holo_light);
				btnView1.Click += OnButtonClicked;

				btnView2 = view.FindViewById<Button> (Resource.Id.button2);
				btnView2.SetBackgroundResource(Resource.Drawable.apptheme_btn_default_holo_light);
				btnView2.Click += OnButtonClicked;
			} else {
				if (input.InputType == InputType.MultipleChoice) {
					// Multiple choice dialog
					layoutDialog.Visibility = ViewStates.Gone;
					layoutMultipleChoice.Visibility = ViewStates.Visible;
					layoutInput.Visibility = ViewStates.Gone;
				} else {
					// Input dialog
					layoutDialog.Visibility = ViewStates.Gone;
					layoutMultipleChoice.Visibility = ViewStates.Gone;
					layoutInput.Visibility = ViewStates.Visible;

					editInput = view.FindViewById<EditText> (Resource.Id.editInput);

					btnInput = view.FindViewById<Button> (Resource.Id.buttonInput);
					btnInput.SetBackgroundResource(Resource.Drawable.apptheme_btn_default_holo_light);
					btnInput.Click += OnInputClicked;

					editInput.Text = "";
					editInput.EditorAction += HandleEditorAction;  

					btnInput.Text = ctrl.Resources.GetString(Resource.String.ok);
				}
			}

			return view;
		}
Exemplo n.º 6
0
		/// <summary>
		/// Raised when the fragment is destroyed, so free references to other UI elements.
		/// </summary>
		public override void OnDestroyView()
		{
			base.OnDestroyView();

			imageView = null;
			messageBox = null;
			input = null;
			editInput = null;
			btnView1 = null;
			btnView2 = null;
			btnInput = null;
			layoutDialog = null;
			layoutMultipleChoice = null;
			layoutInput = null;
			textDescription = null;
			ctrl = null;
		}
		public ScreenListAdapter(ScreenList owner, ScreenController ctrl, ScreenType screen) : base()
		{
			this.ctrl = ctrl;
			this.owner = owner;
			this.screen = screen;
		}