protected override TextInputLayout CreateNativeControl()
        {
            var textInputLayout      = new TextInputLayout(Context);
            var autoCompleteTextView = new AutoCompleteTextView(Context);

            textInputLayout.AddView(autoCompleteTextView);
            return(textInputLayout);
        }
        protected override TextInputLayout CreateNativeControl()
        {
            var textInputLayout = new TextInputLayout(Context);
            var autoComplete    = new InstantAutoCompleteTextView(Context)
            {
                SupportBackgroundTintList = ColorStateList.ValueOf(GetPlaceholderColor())
            };

            textInputLayout.AddView(autoComplete);
            return(textInputLayout);
        }
Example #3
0
        TextInputLayout CreateTextInputLayoutControl()
        {
            // TextInputLayout
            TextInputLayoutControl = new TextInputLayout(Context);
            var lpTextInputLayout = new RelativeLayout.LayoutParams(LayoutParams.MatchParent, LayoutParams.MatchParent);

            lpTextInputLayout.AddRule(LayoutRules.AlignParentLeft);
            TextInputLayoutControl.LayoutParameters = lpTextInputLayout;
            TextInputLayoutControl.SetPadding(_padding7dp, 0, _padding7dp, 0);

            // Add EditText
            TextInputLayoutControl.AddView(CreateEditText(), 0);

            // Add Divider
            TextInputLayoutControl.AddView(CreateDivider(), 1);

            // Add Error Label
            TextInputLayoutControl.AddView(CreateErrorTextLabel(), 2);

            return(TextInputLayoutControl);
        }
Example #4
0
        public override View GetView(Context context)
        {
            _input           = new EditText(context);
            _input.InputType = _inputType;
            _input.Hint      = _hint;
            _input.Text      = _value;

            //editText.LayoutParameters = new TextInputLayout.LayoutParams(0, TextInputLayout.LayoutParams.MatchParent);

            var textInputLayout = new TextInputLayout(context);

            textInputLayout.AddView(_input);

            _input.TextChanged += OnTextChanged;
            _input.Enabled      = Form.EditingEnabled;
            return(textInputLayout);
        }
		private void ListView_Click(int position)
		{
			if (adapter.Count == 0) {
				Refresh();
				if (adapter.Count == 0)
					Show("항목이 없습니다");
				return;
			}

			var jobFile = adapter.GetItem(position);
			if (jobFile.JobCount.Total == 0) {
				Show("CN 항목이 없습니다");
				return;
			}

			InputMethodManager imm = (InputMethodManager)Context.GetSystemService(Context.InputMethodService);
			View dialogView = LayoutInflater.From(Context).Inflate(Resource.Layout.weld_count_editor, null);
			AlertDialog.Builder dialog = new AlertDialog.Builder(Context);
			dialog.SetView(dialogView);

			var statusText = dialogView.FindViewById<TextView>(Resource.Id.statusText);
			statusText.Text = "계열 수정 (CN: " + jobFile.JobCount.Total.ToString() + "개)";

			var linearLayout = dialogView.FindViewById<LinearLayout>(Resource.Id.linearLayout);
			var etBeginNumber = dialogView.FindViewById<EditText>(Resource.Id.etBeginNumber);
			var sbBeginNumber = dialogView.FindViewById<SeekBar>(Resource.Id.sampleSeekBar);

			var etList = new List<EditText>();
			for (int i = 0; i < jobFile.Count; i++) {
				if (jobFile[i].RowType == Job.RowTypes.Spot) {
					var textInputLayout = new TextInputLayout(Context);
					var etCN = new EditText(Context);
					etCN.SetSingleLine();
					etCN.SetTextSize(ComplexUnitType.Dip, 12);
					etCN.InputType = etBeginNumber.InputType;
					etCN.SetSelectAllOnFocus(true);
					etCN.Hint = "CN[" + jobFile[i].RowNumber + "]";
					etCN.Text = jobFile[i].CN;
					etCN.Gravity = GravityFlags.Center;
					etCN.Tag = jobFile[i];
					etCN.FocusChange += (object sender1, View.FocusChangeEventArgs e1) =>
					{
						int beginNumber;
						if (Int32.TryParse(etCN.Text, out beginNumber)) {
							if (beginNumber > 255) {
								beginNumber = 255;
								etCN.Text = beginNumber.ToString();
							}
						}
					};
					etCN.KeyPress += (object sender1, View.KeyEventArgs e1) =>
					{
						e1.Handled = false;
						if (e1.KeyCode == Keycode.Enter || e1.KeyCode == Keycode.Back || e1.KeyCode == Keycode.Escape) {
							imm.HideSoftInputFromWindow(etCN.WindowToken, 0);
							etCN.ClearFocus();
							e1.Handled = true;
						}
					};
					textInputLayout.AddView(etCN);
					linearLayout.AddView(textInputLayout);
					etList.Add(etCN);
				}
			}

			etBeginNumber.FocusChange += (object sender1, View.FocusChangeEventArgs e1) =>
			{
				int beginNumber;
				if (int.TryParse(etBeginNumber.Text, out beginNumber)) {
					if (beginNumber > 255) {
						beginNumber = 255;
						etBeginNumber.Text = beginNumber.ToString();
					}
					sbBeginNumber.Progress = beginNumber - 1;

					foreach (var et in etList) {
						et.Text = beginNumber++.ToString();
						if (beginNumber > 255)
							beginNumber = 255;
					}
				}
			};
			etBeginNumber.KeyPress += (object sender1, View.KeyEventArgs e1) =>
			{
				e1.Handled = false;
				if (e1.KeyCode == Keycode.Enter || e1.KeyCode == Keycode.Back || e1.KeyCode == Keycode.Escape) {
					imm.HideSoftInputFromWindow(etBeginNumber.WindowToken, 0);
					etBeginNumber.ClearFocus();
					e1.Handled = true;
				}
			};

			sbBeginNumber.Max = 254;
			sbBeginNumber.Progress = 0;
			sbBeginNumber.ProgressChanged += (object sender1, SeekBar.ProgressChangedEventArgs e1) =>
			{
				int beginNumber = sbBeginNumber.Progress + 1;
				etBeginNumber.Text = beginNumber.ToString();
			};
			sbBeginNumber.StopTrackingTouch += (object sender1, SeekBar.StopTrackingTouchEventArgs e1) =>
			{
				int beginNumber = sbBeginNumber.Progress + 1;
				etBeginNumber.Text = beginNumber.ToString();
				foreach (var et in etList) {
					et.Text = beginNumber++.ToString();
					if (beginNumber > 255)
						beginNumber = 255;
				}
			};

			dialog.SetNegativeButton("취소", delegate
			{ });

			dialog.SetPositiveButton("저장", delegate
			{
				foreach (var et in etList) {
					var job = (Job)et.Tag;
					job.CN = et.Text;
				}
				if (jobFile.JobCount.Total > 0) {
					jobFile.SaveFile();
					adapter.NotifyDataSetChanged();
					listView.RefreshDrawableState();
					this.Show((string)("저장 완료: " + jobFile.JobCount.fi.Name));
				}
			});

			dialog.Show();
		}
Example #6
0
        private void ListView_Click(int position)
        {
            if (adapter.Count == 0)
            {
                Refresh();
                if (adapter.Count == 0)
                {
                    Show("항목이 없습니다");
                }
                return;
            }

            var jobFile = adapter.GetItem(position);

            if (jobFile.JobCount.Total == 0)
            {
                Show("CN 항목이 없습니다");
                return;
            }

            InputMethodManager imm = (InputMethodManager)Context.GetSystemService(Context.InputMethodService);
            View dialogView        = LayoutInflater.From(Context).Inflate(Resource.Layout.weld_count_editor, null);

            AlertDialog.Builder dialog = new AlertDialog.Builder(Context);
            dialog.SetView(dialogView);

            var statusText = dialogView.FindViewById <TextView>(Resource.Id.statusText);

            statusText.Text = "계열 수정 (CN: " + jobFile.JobCount.Total.ToString() + "개)";

            var linearLayout  = dialogView.FindViewById <LinearLayout>(Resource.Id.linearLayout);
            var etBeginNumber = dialogView.FindViewById <EditText>(Resource.Id.etBeginNumber);
            var sbBeginNumber = dialogView.FindViewById <SeekBar>(Resource.Id.sampleSeekBar);

            var etList = new List <EditText>();

            for (int i = 0; i < jobFile.Count; i++)
            {
                if (jobFile[i].RowType == Job.RowTypes.Spot)
                {
                    var textInputLayout = new TextInputLayout(Context);
                    var etCN            = new EditText(Context);
                    etCN.SetSingleLine();
                    etCN.SetTextSize(ComplexUnitType.Dip, 12);
                    etCN.InputType = etBeginNumber.InputType;
                    etCN.SetSelectAllOnFocus(true);
                    etCN.Hint         = "CN[" + jobFile[i].RowNumber + "]";
                    etCN.Text         = jobFile[i].CN;
                    etCN.Gravity      = GravityFlags.Center;
                    etCN.Tag          = jobFile[i];
                    etCN.FocusChange += (object sender1, View.FocusChangeEventArgs e1) =>
                    {
                        int beginNumber;
                        if (Int32.TryParse(etCN.Text, out beginNumber))
                        {
                            if (beginNumber > 255)
                            {
                                beginNumber = 255;
                                etCN.Text   = beginNumber.ToString();
                            }
                        }
                    };
                    etCN.KeyPress += (object sender1, View.KeyEventArgs e1) =>
                    {
                        e1.Handled = false;
                        if (e1.KeyCode == Keycode.Enter || e1.KeyCode == Keycode.Back || e1.KeyCode == Keycode.Escape)
                        {
                            imm.HideSoftInputFromWindow(etCN.WindowToken, 0);
                            etCN.ClearFocus();
                            e1.Handled = true;
                        }
                    };
                    textInputLayout.AddView(etCN);
                    linearLayout.AddView(textInputLayout);
                    etList.Add(etCN);
                }
            }

            etBeginNumber.FocusChange += (object sender1, View.FocusChangeEventArgs e1) =>
            {
                int beginNumber;
                if (int.TryParse(etBeginNumber.Text, out beginNumber))
                {
                    if (beginNumber > 255)
                    {
                        beginNumber        = 255;
                        etBeginNumber.Text = beginNumber.ToString();
                    }
                    sbBeginNumber.Progress = beginNumber - 1;

                    foreach (var et in etList)
                    {
                        et.Text = beginNumber++.ToString();
                        if (beginNumber > 255)
                        {
                            beginNumber = 255;
                        }
                    }
                }
            };
            etBeginNumber.KeyPress += (object sender1, View.KeyEventArgs e1) =>
            {
                e1.Handled = false;
                if (e1.KeyCode == Keycode.Enter || e1.KeyCode == Keycode.Back || e1.KeyCode == Keycode.Escape)
                {
                    imm.HideSoftInputFromWindow(etBeginNumber.WindowToken, 0);
                    etBeginNumber.ClearFocus();
                    e1.Handled = true;
                }
            };

            sbBeginNumber.Max              = 254;
            sbBeginNumber.Progress         = 0;
            sbBeginNumber.ProgressChanged += (object sender1, SeekBar.ProgressChangedEventArgs e1) =>
            {
                int beginNumber = sbBeginNumber.Progress + 1;
                etBeginNumber.Text = beginNumber.ToString();
            };
            sbBeginNumber.StopTrackingTouch += (object sender1, SeekBar.StopTrackingTouchEventArgs e1) =>
            {
                int beginNumber = sbBeginNumber.Progress + 1;
                etBeginNumber.Text = beginNumber.ToString();
                foreach (var et in etList)
                {
                    et.Text = beginNumber++.ToString();
                    if (beginNumber > 255)
                    {
                        beginNumber = 255;
                    }
                }
            };

            dialog.SetNegativeButton("취소", delegate
                                     { });

            dialog.SetPositiveButton("저장", delegate
            {
                foreach (var et in etList)
                {
                    var job = (Job)et.Tag;
                    job.CN  = et.Text;
                }
                if (jobFile.JobCount.Total > 0)
                {
                    jobFile.SaveFile();
                    adapter.NotifyDataSetChanged();
                    listView.RefreshDrawableState();
                    this.Show((string)("저장 완료: " + jobFile.JobCount.fi.Name));
                }
            });

            dialog.Show();
        }
Example #7
0
        void BuildAddStudentScreen()
        {
            //Defining the parent layout
            OverAllAddStudentLayout             = (LinearLayout)FindViewById(Resource.Id.AddStudentl);
            OverAllAddStudentLayout.Orientation = Orientation.Vertical;
            OverAllAddStudentLayout.SetGravity(GravityFlags.CenterHorizontal);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining the Label AddStudent Layout
            LabelAddStudentLayout = new LinearLayout(this);
            LabelAddStudentLayout.LayoutParameters = WrapContParams;
            LabelAddStudentLayout.Orientation      = Orientation.Vertical;
            LabelAddStudentLayout.SetGravity(Android.Views.GravityFlags.Center);
            //Defining the Label AddStudent TextView
            LabelAddStudentTV = new TextView(this);
            LabelAddStudentTV.LayoutParameters = WrapContParams;
            LabelAddStudentTV.Text             = "New Student";
            LabelAddStudentTV.TextSize         = 60;
            LabelAddStudentTV.Typeface         = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            LabelAddStudentTV.SetTextColor(Android.Graphics.Color.DarkRed);
            LabelAddStudentLayout.AddView(LabelAddStudentTV);
            OverAllAddStudentLayout.AddView(LabelAddStudentLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining the Name AddStudent layout
            NameAddStudentLayout = new LinearLayout(this);
            NameAddStudentLayout.LayoutParameters = WrapContParams;
            NameAddStudentLayout.Orientation      = Orientation.Horizontal;
            //Defining the Name AddStudent TextView
            NameAddStudentTV = new TextView(this);
            NameAddStudentTV.LayoutParameters = WrapContParams;
            NameAddStudentTV.Text             = "Name: ";
            NameAddStudentTV.TextSize         = 30;
            NameAddStudentTV.Typeface         = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            //Defining the Name AddStudent TextInputEditText
            TextInputLayout nameLayout = new TextInputLayout(this)
            {
                LayoutParameters = WrapContParams,
                Orientation      = Orientation.Horizontal,
            };

            NameAddStudentET = new TextInputEditText(this);
            NameAddStudentET.SetBackgroundResource(Resource.Drawable.MyBackground);
            NameAddStudentET.LayoutParameters         = OneTwentyParams;
            NameAddStudentET.Hint                     = "Full Name";
            NameAddStudentET.TextSize                 = 30;
            NameAddStudentET.FirstBaselineToTopHeight = 10;
            //Adding views to layout
            NameAddStudentLayout.AddView(NameAddStudentTV);
            nameLayout.AddView(NameAddStudentET);
            NameAddStudentLayout.AddView(nameLayout);
            OverAllAddStudentLayout.AddView(NameAddStudentLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining PhoneNum AddStudent Layout
            PhoneNumAddStudentLayout = new LinearLayout(this);
            PhoneNumAddStudentLayout.LayoutParameters = WrapContParams;
            PhoneNumAddStudentLayout.Orientation      = Orientation.Horizontal;
            //Defining the PhoneNum AddStudent TextView
            PhoneNumAddStudentTV = new TextView(this);
            PhoneNumAddStudentTV.LayoutParameters = WrapContParams;
            PhoneNumAddStudentTV.Text             = "Phone # ";
            PhoneNumAddStudentTV.TextSize         = 30;
            PhoneNumAddStudentTV.SetForegroundGravity(Android.Views.GravityFlags.Center);
            PhoneNumAddStudentTV.Typeface = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            //Defining the PhoneNum AddStudent TextInputEditText
            TextInputLayout phone = new TextInputLayout(this)
            {
                LayoutParameters = WrapContParams,
                Orientation      = Orientation.Horizontal,
            };

            PhoneNumAddStudentET = new TextInputEditText(this);
            PhoneNumAddStudentET.SetBackgroundResource(Resource.Drawable.MyBackground);
            PhoneNumAddStudentET.LayoutParameters = OneTwentyParams;
            PhoneNumAddStudentET.Text             = "05";
            PhoneNumAddStudentET.TextSize         = 30;
            PhoneNumAddStudentET.SetSingleLine();
            PhoneNumAddStudentET.InputType = InputTypes.ClassPhone;
            //Adding views to layout
            PhoneNumAddStudentLayout.AddView(PhoneNumAddStudentTV);
            phone.AddView(PhoneNumAddStudentET);
            PhoneNumAddStudentLayout.AddView(phone);
            OverAllAddStudentLayout.AddView(PhoneNumAddStudentLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            // Defining Email AddStudentLayout
            EmailAddStudentLayout = new LinearLayout(this);
            EmailAddStudentLayout.LayoutParameters = WrapContParams;
            EmailAddStudentLayout.Orientation      = Orientation.Horizontal;
            //Defining the Email AddStudent TextView
            EmailAddStudentTV = new TextView(this);
            EmailAddStudentTV.LayoutParameters = WrapContParams;
            EmailAddStudentTV.Text             = "Enter Email: ";
            EmailAddStudentTV.TextSize         = 30;
            EmailAddStudentTV.SetForegroundGravity(Android.Views.GravityFlags.Center);
            EmailAddStudentTV.Typeface = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            //Defining the Email AddStudent TextInputEditText
            TextInputLayout Email = new TextInputLayout(this)
            {
                LayoutParameters = WrapContParams,
                Orientation      = Orientation.Horizontal,
            };

            EmailAddStudentET = new TextInputEditText(this);
            EmailAddStudentET.SetBackgroundResource(Resource.Drawable.MyBackground);
            EmailAddStudentET.LayoutParameters = OneTwentyParams;
            EmailAddStudentET.Hint             = "Email";
            EmailAddStudentET.InputType        = InputTypes.TextVariationEmailAddress;
            EmailAddStudentET.TextSize         = 30;
            EmailAddStudentET.SetSingleLine();
            //Adding views to layout
            EmailAddStudentLayout.AddView(EmailAddStudentTV);
            Email.AddView(EmailAddStudentET);
            EmailAddStudentLayout.AddView(Email);
            OverAllAddStudentLayout.AddView(EmailAddStudentLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining Parent1NameAddStudentLayout
            Parent1NameAddStudentLayout = new LinearLayout(this);
            Parent1NameAddStudentLayout.LayoutParameters = WrapContParams;
            Parent1NameAddStudentLayout.Orientation      = Orientation.Horizontal;
            //Defining the Parent1Name AddStudent TextView
            Parent1NameAddStudentTV = new TextView(this);
            Parent1NameAddStudentTV.LayoutParameters = WrapContParams;
            Parent1NameAddStudentTV.Text             = "Parent1 Name: ";
            Parent1NameAddStudentTV.TextSize         = 30;
            Parent1NameAddStudentTV.SetForegroundGravity(Android.Views.GravityFlags.Center);
            Parent1NameAddStudentTV.Typeface = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            //Defining the Parent1Name AddStudent TextInputEditText
            TextInputLayout p1 = new TextInputLayout(this)
            {
                LayoutParameters = WrapContParams,
                Orientation      = Orientation.Horizontal,
            };

            Parent1NameAddStudentET = new TextInputEditText(this);
            Parent1NameAddStudentET.SetBackgroundResource(Resource.Drawable.MyBackground);
            Parent1NameAddStudentET.LayoutParameters = OneTwentyParams;
            Parent1NameAddStudentET.Hint             = "Parent1";
            Parent1NameAddStudentET.TextSize         = 30;
            //Adding views to layout
            Parent1NameAddStudentLayout.AddView(Parent1NameAddStudentTV);
            p1.AddView(Parent1NameAddStudentET);
            Parent1NameAddStudentLayout.AddView(p1);
            OverAllAddStudentLayout.AddView(Parent1NameAddStudentLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining Parent2NameAddStudentLayout
            Parent2NameAddStudentLayout = new LinearLayout(this);
            Parent2NameAddStudentLayout.LayoutParameters = WrapContParams;
            Parent2NameAddStudentLayout.Orientation      = Orientation.Horizontal;
            //Defining the Parent2Name AddStudent TextView
            Parent2NameAddStudentTV = new TextView(this);
            Parent2NameAddStudentTV.LayoutParameters = WrapContParams;
            Parent2NameAddStudentTV.Text             = "Parent2 Name: ";
            Parent2NameAddStudentTV.TextSize         = 30;
            Parent2NameAddStudentTV.SetForegroundGravity(Android.Views.GravityFlags.Center);
            Parent2NameAddStudentTV.Typeface = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            //Defining the Parent2Name AddStudent TextInputEditText
            TextInputLayout p2 = new TextInputLayout(this)
            {
                LayoutParameters = WrapContParams,
                Orientation      = Orientation.Horizontal,
            };

            Parent2NameAddStudentET = new TextInputEditText(this);
            Parent2NameAddStudentET.LayoutParameters = OneTwentyParams;
            Parent2NameAddStudentET.SetBackgroundResource(Resource.Drawable.MyBackground);
            Parent2NameAddStudentET.Hint     = "Parent2";
            Parent2NameAddStudentET.TextSize = 30;
            //Adding views to layout
            Parent2NameAddStudentLayout.AddView(Parent2NameAddStudentTV);
            p2.AddView(Parent2NameAddStudentET);
            Parent2NameAddStudentLayout.AddView(p2);
            OverAllAddStudentLayout.AddView(Parent2NameAddStudentLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining the AddStudent Explenation layout
            AddStudentExplenationLayout = new LinearLayout(this);
            AddStudentExplenationLayout.LayoutParameters = WrapContParams;
            AddStudentExplenationLayout.Orientation      = Orientation.Vertical;
            //Defining the Explenation AddStudent TextView
            AddStudentExplenationTV = new TextView(this);
            AddStudentExplenationTV.LayoutParameters = WrapContParams;
            AddStudentExplenationTV.Text             = "Student Notes: ";
            AddStudentExplenationTV.TextSize         = 30;
            AddStudentExplenationTV.Typeface         = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            //Adding views to layout
            AddStudentExplenationLayout.AddView(AddStudentExplenationTV);
            OverAllAddStudentLayout.AddView(AddStudentExplenationLayout);
            //Defining The AddStudent notes ET layout
            AddStudentExplenationETLayout = new LinearLayout(this);
            AddStudentExplenationETLayout.LayoutParameters = new LinearLayout.LayoutParams(1100, 400);
            AddStudentExplenationETLayout.Orientation      = Orientation.Vertical;
            AddStudentExplenationETLayout.SetBackgroundResource(Resource.Drawable.BlackOutLine);
            AddStudentExplenationETLayout.Click += this.AddStudentExplenationETLayout_Click;
            //Defining the Explenation AddStudent TextInputEditText
            AddStudentExplenationET = new TextInputEditText(this);
            AddStudentExplenationET.SetWidth(LinearLayout.LayoutParams.MatchParent);
            AddStudentExplenationET.Hint     = "Notes";
            AddStudentExplenationET.TextSize = 25;
            AddStudentExplenationET.SetTextIsSelectable(true);
            AddStudentExplenationET.InputType = InputTypes.TextFlagMultiLine;
            AddStudentExplenationET.Gravity   = GravityFlags.Top;
            AddStudentExplenationET.SetSingleLine(false);
            AddStudentExplenationET.SetBackgroundColor(Color.Transparent);
            //Adding viwes to overall layout
            AddStudentExplenationETLayout.AddView(AddStudentExplenationET);
            OverAllAddStudentLayout.AddView(AddStudentExplenationETLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Declare Spinner
            spin = new Spinner(this);
            spin.LayoutParameters = OneTwentyParams;
            spin.ItemSelected    += new EventHandler <AdapterView.ItemSelectedEventArgs>(spinner_ItemSelected);
            var adapter = new ArrayAdapter <String>(this, Android.Resource.Layout.SimpleSpinnerItem, groups);

            adapter.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);
            spin.Adapter = adapter;
            //Defining Spinner Layout
            SpinnerLayout = new LinearLayout(this);
            SpinnerLayout.LayoutParameters = WrapContParams;
            SpinnerLayout.Orientation      = Orientation.Horizontal;
            //Adding Views
            SpinnerLayout.AddView(spin);
            OverAllAddStudentLayout.AddView(SpinnerLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining AddStudent Button Layout
            ButtonAddStudentLayout = new LinearLayout(this);
            ButtonAddStudentLayout.LayoutParameters = WrapContParams;
            ButtonAddStudentLayout.Orientation      = Orientation.Horizontal;
            //Defining AddStudent Button
            AddStudentButton = new Button(this);
            AddStudentButton.LayoutParameters = WrapContParams;
            AddStudentButton.Text             = "Add Student";
            AddStudentButton.TextSize         = 40;
            AddStudentButton.Typeface         = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            AddStudentButton.Click           += this.AddStudentButton_Click;
            //Adding views
            ButtonAddStudentLayout.AddView(AddStudentButton);
            OverAllAddStudentLayout.AddView(ButtonAddStudentLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining AddStudent Button Layout
            ButtonSendToMainPageLayout = new LinearLayout(this);
            ButtonSendToMainPageLayout.LayoutParameters = WrapContParams;
            ButtonSendToMainPageLayout.Orientation      = Orientation.Horizontal;
            //Defining AddStudent Button
            SendBackToMainButton = new Button(this);
            SendBackToMainButton.LayoutParameters = WrapContParams;
            SendBackToMainButton.Text             = "Send Back To\nMain Page";
            SendBackToMainButton.TextSize         = 40;
            SendBackToMainButton.Typeface         = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            SendBackToMainButton.SetTextColor(Color.DarkRed);
            SendBackToMainButton.Click += this.SendBackToMainButton_Click;
            //Adding views
            ButtonSendToMainPageLayout.AddView(SendBackToMainButton);
            OverAllAddStudentLayout.AddView(ButtonSendToMainPageLayout);
        }
Example #8
0
        public void BuildAddTrainingScreen()
        {
            //OverAll Layout
            AddTrainingOverAllLayout             = (LinearLayout)FindViewById(Resource.Id.AddTrainingL);
            AddTrainingOverAllLayout.Orientation = Orientation.Vertical;
            //-------------------------------------
            //Defining Label Layout
            AddTrainingLabelLayout = new LinearLayout(this);
            AddTrainingLabelLayout.LayoutParameters = WrapContParams;
            AddTrainingLabelLayout.Orientation      = Orientation.Vertical;
            AddTrainingLabelLayout.SetGravity(Android.Views.GravityFlags.Center);
            //Defining the Label AddTraining TextView
            AddTrainingLabelTV = new TextView(this);
            AddTrainingLabelTV.LayoutParameters = WrapContParams;
            AddTrainingLabelTV.Text             = "New Exercise";
            AddTrainingLabelTV.Typeface         = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            AddTrainingLabelTV.SetTextColor(Android.Graphics.Color.DarkRed);
            AddTrainingLabelTV.TextSize = 60;
            AddTrainingLabelLayout.AddView(AddTrainingLabelTV);
            AddTrainingOverAllLayout.AddView(AddTrainingLabelLayout);
            //Defining the AddTraining Name layout
            AddTrainingNameLayout = new LinearLayout(this);
            AddTrainingNameLayout.LayoutParameters = WrapContParams;
            AddTrainingNameLayout.Orientation      = Orientation.Horizontal;
            //Defining the Name AddTraining TextView
            AddTrainingNameTV = new TextView(this);
            AddTrainingNameTV.LayoutParameters = WrapContParams;
            AddTrainingNameTV.Text             = "Exercise Name: ";
            AddTrainingNameTV.TextSize         = 30;
            AddTrainingNameTV.Typeface         = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            //Defining the Name AddTraining TextInputEditText
            TextInputLayout nameLayout = new TextInputLayout(this)
            {
                LayoutParameters = WrapContParams,
                Orientation      = Orientation.Horizontal,
            };

            AddTrainingNameET = new TextInputEditText(this);
            AddTrainingNameET.SetBackgroundResource(Resource.Drawable.MyBackground);
            AddTrainingNameET.LayoutParameters = OneTwentyParams;
            AddTrainingNameET.Hint             = "name";
            AddTrainingNameET.TextSize         = 30;
            //Adding views to layout
            AddTrainingNameLayout.AddView(AddTrainingNameTV);
            nameLayout.AddView(AddTrainingNameET);
            AddTrainingNameLayout.AddView(nameLayout);
            AddTrainingOverAllLayout.AddView(AddTrainingNameLayout);
            //----------------------------------------------------------------------------------
            //----------------------------------------------------------------------------------------
            //Defining the AddTraining Explenation layout
            AddTrainingExplenationLayout = new LinearLayout(this);
            AddTrainingExplenationLayout.LayoutParameters = WrapContParams;
            AddTrainingExplenationLayout.Orientation      = Orientation.Vertical;
            //Defining the Explenation AddTraining TextView
            AddTrainingExplenationTV = new TextView(this);
            AddTrainingExplenationTV.LayoutParameters = WrapContParams;
            AddTrainingExplenationTV.Text             = "Exercise Explenation: ";
            AddTrainingExplenationTV.TextSize         = 30;
            AddTrainingExplenationTV.Typeface         = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            //Adding views to layout
            AddTrainingExplenationLayout.AddView(AddTrainingExplenationTV);
            AddTrainingOverAllLayout.AddView(AddTrainingExplenationLayout);
            //Defining The AddTraining Explenation ET layout
            AddTrainingExplenationETLayout = new LinearLayout(this);
            AddTrainingExplenationETLayout.LayoutParameters = new LinearLayout.LayoutParams(1100, 800);
            AddTrainingExplenationETLayout.Orientation      = Orientation.Vertical;
            AddTrainingExplenationETLayout.SetBackgroundResource(Resource.Drawable.BlackOutLine);
            AddTrainingExplenationETLayout.Click += this.AddTrainingExplenationETLayout_Click;
            //Defining the Explenation AddTraining TextInputEditText
            AddTrainingExplenationET = new TextInputEditText(this);
            AddTrainingExplenationET.SetBackgroundResource(Resource.Drawable.MyBackground);
            AddTrainingExplenationET.SetWidth(LinearLayout.LayoutParams.MatchParent);
            AddTrainingExplenationET.Hint     = "Explenation";
            AddTrainingExplenationET.TextSize = 25;
            AddTrainingExplenationET.SetTextIsSelectable(true);
            AddTrainingExplenationET.InputType = InputTypes.TextFlagMultiLine;
            AddTrainingExplenationET.Gravity   = GravityFlags.Top;
            AddTrainingExplenationET.SetSingleLine(false);
            AddTrainingExplenationET.SetBackgroundColor(Color.Transparent);

            //Adding viwes to overall layout
            AddTrainingExplenationETLayout.AddView(AddTrainingExplenationET);
            AddTrainingOverAllLayout.AddView(AddTrainingExplenationETLayout);
            //---------------------------------------------------------------------------------------------------------
            //Defining AddTraining Button Layout
            ButtonAddTrainingLayout = new LinearLayout(this);
            ButtonAddTrainingLayout.LayoutParameters = WrapContParams;
            ButtonAddTrainingLayout.Orientation      = Orientation.Horizontal;
            //Defining AddTraining Button
            AddTrainingButton = new Button(this);
            AddTrainingButton.LayoutParameters = WrapContParams;
            AddTrainingButton.Text             = "Register";
            AddTrainingButton.TextSize         = 40;
            AddTrainingButton.Typeface         = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            AddTrainingButton.Click           += this.AddTrainingButton_Click;
            //Adding views
            ButtonAddTrainingLayout.AddView(AddTrainingButton);
            AddTrainingOverAllLayout.AddView(ButtonAddTrainingLayout);
            //Insert Image:

            /*
             *
             *
             *
             *
             *
             *
             *
             */
        }
Example #9
0
        void BuildAddGroupScreen()
        {
            //Defining the parent layout
            OverAllAddGroupLayout             = (LinearLayout)FindViewById(Resource.Id.AddGroupL);
            OverAllAddGroupLayout.Orientation = Orientation.Vertical;
            OverAllAddGroupLayout.SetGravity(Android.Views.GravityFlags.CenterHorizontal);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining the Label AddGroup Layout
            LabelAddGroupLayout = new LinearLayout(this);
            LabelAddGroupLayout.LayoutParameters = WrapContParams;
            LabelAddGroupLayout.Orientation      = Orientation.Vertical;
            LabelAddGroupLayout.SetGravity(Android.Views.GravityFlags.Center);
            //Defining the Label AddGroup TextView
            LabelAddGroupTV = new TextView(this);
            LabelAddGroupTV.LayoutParameters = WrapContParams;
            LabelAddGroupTV.Text             = "Add Group:";
            LabelAddGroupTV.TextSize         = 80;
            LabelAddGroupTV.Typeface         = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            LabelAddGroupTV.SetTextColor(Android.Graphics.Color.DarkRed);
            LabelAddGroupLayout.AddView(LabelAddGroupTV);
            OverAllAddGroupLayout.AddView(LabelAddGroupLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining the Location AddGroup layout
            LocationAddGroupLayout = new LinearLayout(this);
            LocationAddGroupLayout.LayoutParameters = WrapContParams;
            LocationAddGroupLayout.Orientation      = Orientation.Horizontal;
            //Defining the Location AddGroup TextView
            LocationAddGroupTV = new TextView(this);
            LocationAddGroupTV.LayoutParameters = WrapContParams;
            LocationAddGroupTV.Text             = "Location: ";
            LocationAddGroupTV.TextSize         = 30;
            LocationAddGroupTV.Typeface         = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            //Defining the Location AddGroup TextInputEditText
            TextInputLayout Location = new TextInputLayout(this)
            {
                LayoutParameters = WrapContParams,
                Orientation      = Orientation.Horizontal,
            };

            LocationAddGroupET = new TextInputEditText(this);
            LocationAddGroupET.SetBackgroundResource(Resource.Drawable.MyBackground);
            LocationAddGroupET.LayoutParameters = OneTwentyParams;
            LocationAddGroupET.Hint             = "Enter Adress";
            LocationAddGroupET.TextSize         = 30;
            LocationAddGroupET.InputType        = InputTypes.TextVariationPersonName;
            Location.AddView(LocationAddGroupET);
            //Adding views to layout
            LocationAddGroupLayout.AddView(LocationAddGroupTV);
            LocationAddGroupLayout.AddView(Location);
            OverAllAddGroupLayout.AddView(LocationAddGroupLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining Age AddGroup Layout
            AgeAddGroupLayout = new LinearLayout(this);
            AgeAddGroupLayout.LayoutParameters = WrapContParams;
            AgeAddGroupLayout.Orientation      = Orientation.Horizontal;
            //Defining the Age AddGroup TextView
            AgeAddGroupTV = new TextView(this);
            AgeAddGroupTV.LayoutParameters = WrapContParams;
            AgeAddGroupTV.Text             = "Age Range: ";
            AgeAddGroupTV.TextSize         = 30;
            AgeAddGroupTV.SetForegroundGravity(Android.Views.GravityFlags.Center);
            AgeAddGroupTV.Typeface = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            //Defining the Age AddGroup TextInputEditText
            TextInputLayout Age = new TextInputLayout(this)
            {
                LayoutParameters = WrapContParams,
                Orientation      = Orientation.Horizontal,
            };

            AgeAddGroupET = new TextInputEditText(this);
            AgeAddGroupET.SetBackgroundResource(Resource.Drawable.MyBackground);
            AgeAddGroupET.LayoutParameters = OneTwentyParams;
            AgeAddGroupET.Hint             = "Enter Age Range";
            AgeAddGroupET.TextSize         = 30;
            AgeAddGroupET.SetSingleLine();
            //Adding views to layout
            AgeAddGroupLayout.AddView(AgeAddGroupTV);
            Age.AddView(AgeAddGroupET);
            AgeAddGroupLayout.AddView(Age);
            OverAllAddGroupLayout.AddView(AgeAddGroupLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining GroupLevelAddGroupLayout
            GroupLevelAddGroupLayout = new LinearLayout(this);
            GroupLevelAddGroupLayout.LayoutParameters = WrapContParams;
            GroupLevelAddGroupLayout.Orientation      = Orientation.Horizontal;
            //Defining the GroupLevel AddGroup TextView
            GroupLevelAddGroupTV = new TextView(this);
            GroupLevelAddGroupTV.LayoutParameters = WrapContParams;
            GroupLevelAddGroupTV.Text             = "Group Level: ";
            GroupLevelAddGroupTV.TextSize         = 30;
            GroupLevelAddGroupTV.SetForegroundGravity(Android.Views.GravityFlags.Center);
            GroupLevelAddGroupTV.Typeface = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            //Defining the GroupLevel AddGroup TextInputEditText
            TextInputLayout LVL = new TextInputLayout(this)
            {
                LayoutParameters = WrapContParams,
                Orientation      = Orientation.Horizontal,
            };

            GroupLevelAddGroupET = new TextInputEditText(this);
            GroupLevelAddGroupET.SetBackgroundResource(Resource.Drawable.MyBackground);
            GroupLevelAddGroupET.LayoutParameters = OneTwentyParams;
            GroupLevelAddGroupET.Hint             = "Enter Level";
            GroupLevelAddGroupET.TextSize         = 30;
            //Adding views to layout
            GroupLevelAddGroupLayout.AddView(GroupLevelAddGroupTV);
            LVL.AddView(GroupLevelAddGroupET);
            GroupLevelAddGroupLayout.AddView(LVL);
            OverAllAddGroupLayout.AddView(GroupLevelAddGroupLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining Radio Group Layout
            GroupLevelAddGroupLayout = new LinearLayout(this);
            GroupLevelAddGroupLayout.LayoutParameters = WrapContParams;
            GroupLevelAddGroupLayout.Orientation      = Orientation.Horizontal;
            //Defining RadioGroup
            IsGroupCompRGAddGroup             = new RadioGroup(this);
            IsGroupCompRGAddGroup.Orientation = Orientation.Horizontal;
            //Defining Competitive group Radio Button
            CompRBAddGroup          = new RadioButton(this);
            CompRBAddGroup.Text     = "Competetive";
            CompRBAddGroup.TextSize = 25;
            CompRBAddGroup.Typeface = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            CompRBAddGroup.SetTextColor(Android.Graphics.Color.DarkBlue);
            CompRBAddGroup.Click += this.RadioButtonClick;
            //Defining not Competetive group radio Button
            NotCompRBAddGroup          = new RadioButton(this);
            NotCompRBAddGroup.Text     = "Not Competetive";
            NotCompRBAddGroup.TextSize = 25;
            NotCompRBAddGroup.Typeface = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            NotCompRBAddGroup.SetTextColor(Android.Graphics.Color.DarkBlue);
            NotCompRBAddGroup.Click += this.RadioButtonClick;
            //Adding RB to RG
            IsGroupCompRGAddGroup.AddView(CompRBAddGroup);
            IsGroupCompRGAddGroup.AddView(NotCompRBAddGroup);
            //Adding view to overall layout
            OverAllAddGroupLayout.AddView(IsGroupCompRGAddGroup);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining AddGroup Button Layout
            ButtonAddGroupLayout = new LinearLayout(this);
            ButtonAddGroupLayout.LayoutParameters = WrapContParams;
            ButtonAddGroupLayout.Orientation      = Orientation.Horizontal;
            //Defining AddGroup Button
            AddGroupButton = new Button(this);
            AddGroupButton.LayoutParameters = WrapContParams;
            AddGroupButton.Text             = "Add Group";
            AddGroupButton.TextSize         = 40;
            AddGroupButton.Typeface         = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            AddGroupButton.Click           += this.AddGroupButton_Click;
            //Adding views
            ButtonAddGroupLayout.AddView(AddGroupButton);
            OverAllAddGroupLayout.AddView(ButtonAddGroupLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            BuildTimeAndDate();
        }
Example #10
0
        private void BuildLoginScreen()
        {
            d = new Dialog(this);
            d.SetContentView(Resource.Layout.MyDialog);
            d.SetCancelable(true);
            d.SetTitle("LogIn");
            //OverallLayout
            dLayout = d.FindViewById <LinearLayout>(Resource.Id.AbcDEF);
            //Dialog Title Layout
            LinearLayout DialogTitleLayout = new LinearLayout(this);

            DialogTitleLayout.LayoutParameters = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MatchParent, 100);
            DialogTitleLayout.SetFadingEdgeLength(100);
            DialogTitleLayout.SetBackgroundColor(Color.RoyalBlue);
            //Dialog TitleTV
            TextView LoginDialogTitle = new TextView(this);

            LoginDialogTitle.Typeface = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            LoginDialogTitle.SetTextColor(Color.WhiteSmoke);
            LoginDialogTitle.TextSize = 35;
            LoginDialogTitle.VerticalFadingEdgeEnabled = true;
            LoginDialogTitle.SetFadingEdgeLength(30);
            LoginDialogTitle.Text = "Welcome Back";
            DialogTitleLayout.AddView(LoginDialogTitle);
            dLayout.AddView(DialogTitleLayout);
            //Defining MailLoginLayout
            MailLoginLayout1 = new LinearLayout(this);
            MailLoginLayout1.LayoutParameters = WrapContParams;
            MailLoginLayout1.Orientation      = Orientation.Horizontal;
            //Defining the Mail Login TextView
            MailLoginTV1 = new TextView(this);
            WrapContParams.SetMargins(20, 20, 5, 10);
            MailLoginTV1.LayoutParameters = WrapContParams;
            MailLoginTV1.Text             = "EMail: ";
            MailLoginTV1.TextSize         = 30;
            MailLoginTV1.SetForegroundGravity(Android.Views.GravityFlags.Center);
            MailLoginTV1.Typeface = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            //Defining the Mail Login TextInputEditText
            TextInputLayout a = new TextInputLayout(this)
            {
                LayoutParameters = WrapContParams,
                Orientation      = Orientation.Horizontal,
            };

            MailLoginET1 = new TextInputEditText(this);
            MailLoginET.SetBackgroundResource(Resource.Drawable.MyBackground);
            OneTwentyParams.SetMargins(5, 20, 20, 10);
            MailLoginET1.LayoutParameters = OneTwentyParams;
            MailLoginET1.Hint             = "Enter EMail";
            MailLoginET1.InputType        = InputTypes.TextVariationEmailAddress;
            MailLoginET1.TextSize         = 30;
            MailLoginET1.SetSingleLine();
            MailLoginET1.SetBackgroundResource(Resource.Drawable.MyBackground);
            //Adding views to layout
            MailLoginLayout1.AddView(MailLoginTV1);
            a.AddView(MailLoginET1);
            MailLoginLayout1.AddView(a);
            dLayout.AddView(MailLoginLayout1);
            //
            //
            //Defining Login Button Layout
            ButtonLoginLayout1 = new LinearLayout(this);
            WrapContParams.SetMargins(20, 10, 20, 20);
            ButtonLoginLayout1.LayoutParameters = WrapContParams;
            ButtonLoginLayout1.Orientation      = Orientation.Horizontal;
            //Defining Login Button
            LoginButton1 = new Button(this);
            LoginButton1.LayoutParameters = WrapContParams;
            LoginButton1.Text             = "Log-In";
            LoginButton1.TextSize         = 40;
            LoginButton1.Typeface         = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            LoginButton1.Click           += this.LoginButton1_Click;
            //Adding views
            ButtonLoginLayout1.AddView(LoginButton1);
            dLayout.AddView(ButtonLoginLayout1);

            //
            d.Show();
        }
Example #11
0
        //https://github.com/egarim/XamarinAndroidSnippets/blob/master/XamarinAndroidRuntimePermissions
        //https://youtu.be/Uzpy3qdYXmE
        #endregion
        void BuildRegisterScreen()
        {
            //Defining the parent layout
            OverAllLoginLayout             = (LinearLayout)FindViewById(Resource.Id.LoginLinearLayout);
            OverAllLoginLayout.Orientation = Orientation.Vertical;
            OverAllLoginLayout.SetGravity(GravityFlags.CenterHorizontal);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining the Label login Layout
            LabelLoginLayout = new LinearLayout(this);
            LabelLoginLayout.LayoutParameters = WrapContParams;
            LabelLoginLayout.Orientation      = Orientation.Vertical;
            LabelLoginLayout.SetGravity(Android.Views.GravityFlags.Center);
            //Defining the Label Login TextView
            LabelLoginTV = new TextView(this);
            LabelLoginTV.LayoutParameters = WrapContParams;
            LabelLoginTV.Text             = "Welcome!";
            LabelLoginTV.TextSize         = 80;
            LabelLoginTV.Typeface         = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            LabelLoginTV.SetTextColor(Android.Graphics.Color.DarkRed);
            LabelLoginLayout.AddView(LabelLoginTV);
            //Defining the Second Label Login Textview
            LabelLoginTV1 = new TextView(this);
            LabelLoginTV1.LayoutParameters = WrapContParams;
            LabelLoginTV1.Text             = "Register";
            LabelLoginTV1.TextSize         = 40;
            LabelLoginTV1.Typeface         = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            LabelLoginTV1.SetTextColor(Android.Graphics.Color.DarkRed);
            LabelLoginLayout.AddView(LabelLoginTV1);
            OverAllLoginLayout.AddView(LabelLoginLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining the NameLogin layout
            NameLoginLayout = new LinearLayout(this);
            NameLoginLayout.LayoutParameters = WrapContParams;
            NameLoginLayout.Orientation      = Orientation.Horizontal;
            //Defining the Name Login TextView
            NameLoginTV = new TextView(this);
            NameLoginTV.LayoutParameters = WrapContParams;
            NameLoginTV.Text             = "Name: ";
            NameLoginTV.TextSize         = 30;
            NameLoginTV.Typeface         = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            //Defining the Name Login TextInputEditText
            TextInputLayout name = new TextInputLayout(this)
            {
                Orientation      = Orientation.Horizontal,
                LayoutParameters = WrapContParams,
            };

            NameLoginET = new TextInputEditText(this);
            NameLoginET.SetBackgroundResource(Resource.Drawable.MyBackground);
            NameLoginET.LayoutParameters = ETparams;
            NameLoginET.Hint             = "Enter Name";
            NameLoginET.TextSize         = 30;
            NameLoginET.InputType        = InputTypes.TextVariationPersonName;
            NameLoginET.SetSingleLine();
            //Adding views to layout
            NameLoginLayout.AddView(NameLoginTV);
            name.AddView(NameLoginET);
            NameLoginLayout.AddView(name);
            OverAllLoginLayout.AddView(NameLoginLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining MailLoginLayout
            MailLoginLayout = new LinearLayout(this);
            MailLoginLayout.LayoutParameters = WrapContParams;
            MailLoginLayout.Orientation      = Orientation.Horizontal;
            //Defining the Mail Login TextView
            MailLoginTV = new TextView(this);
            MailLoginTV.LayoutParameters = WrapContParams;
            MailLoginTV.Text             = "EMail: ";
            MailLoginTV.TextSize         = 30;
            MailLoginTV.SetForegroundGravity(Android.Views.GravityFlags.Center);
            MailLoginTV.Typeface = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            //Defining the Mail Login TextInputEditText
            TextInputLayout mail = new TextInputLayout(this)
            {
                Orientation      = Orientation.Horizontal,
                LayoutParameters = WrapContParams,
            };

            MailLoginET = new TextInputEditText(this);
            MailLoginET.LayoutParameters = ETparams;
            MailLoginET.SetBackgroundResource(Resource.Drawable.MyBackground);
            MailLoginET.Hint      = "Enter EMail";
            MailLoginET.InputType = InputTypes.TextVariationEmailAddress;
            MailLoginET.TextSize  = 30;
            MailLoginET.SetSingleLine();
            //Adding views to layout
            MailLoginLayout.AddView(MailLoginTV);
            mail.AddView(MailLoginET);
            MailLoginLayout.AddView(mail);
            OverAllLoginLayout.AddView(MailLoginLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining SportLoginLayout
            SportLoginLayout = new LinearLayout(this);
            SportLoginLayout.LayoutParameters = WrapContParams;
            SportLoginLayout.Orientation      = Orientation.Horizontal;
            //Defining the Sport Login TextView
            SportLoginTV = new TextView(this);
            SportLoginTV.LayoutParameters = WrapContParams;
            SportLoginTV.Text             = "Sport: ";
            SportLoginTV.TextSize         = 30;
            SportLoginTV.SetForegroundGravity(Android.Views.GravityFlags.Center);
            SportLoginTV.Typeface = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            //Defining the Sport Login TextInputEditText
            TextInputLayout sport = new TextInputLayout(this)
            {
                Orientation      = Orientation.Horizontal,
                LayoutParameters = WrapContParams,
            };

            SportLoginET = new TextInputEditText(this);
            SportLoginET.SetBackgroundResource(Resource.Drawable.MyBackground);
            SportLoginET.LayoutParameters = ETparams;
            SportLoginET.Hint             = "Sport";
            SportLoginET.TextSize         = 30;
            SportLoginET.InputType        = InputTypes.TextVariationShortMessage;
            SportLoginET.SetSingleLine();
            //Adding views to layout
            SportLoginLayout.AddView(SportLoginTV);
            sport.AddView(SportLoginET);
            SportLoginLayout.AddView(sport);
            OverAllLoginLayout.AddView(SportLoginLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining PhoneNumberLoginLayout
            PhoneNumberLoginLayout = new LinearLayout(this);
            PhoneNumberLoginLayout.LayoutParameters = WrapContParams;
            PhoneNumberLoginLayout.Orientation      = Orientation.Horizontal;
            //Defining the PhoneNumber Login TextView
            PhoneNumberLoginTV = new TextView(this);
            PhoneNumberLoginTV.LayoutParameters = WrapContParams;
            PhoneNumberLoginTV.Text             = "PhoneNum: ";
            PhoneNumberLoginTV.TextSize         = 30;
            PhoneNumberLoginTV.SetForegroundGravity(Android.Views.GravityFlags.Center);
            PhoneNumberLoginTV.Typeface = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            //Defining the PhoneNumber Login TextInputEditText
            TextInputLayout phon = new TextInputLayout(this)
            {
                Orientation      = Orientation.Horizontal,
                LayoutParameters = WrapContParams,
            };

            PhoneNumberLoginET = new TextInputEditText(this);
            PhoneNumberLoginET.SetBackgroundResource(Resource.Drawable.MyBackground);
            PhoneNumberLoginET.LayoutParameters = ETparams;
            PhoneNumberLoginET.Text             = "05";
            PhoneNumberLoginET.TextSize         = 30;
            PhoneNumberLoginET.InputType        = InputTypes.ClassPhone;
            PhoneNumberLoginET.SetSingleLine();
            //Adding views to layout
            PhoneNumberLoginLayout.AddView(PhoneNumberLoginTV);
            phon.AddView(PhoneNumberLoginET);
            PhoneNumberLoginLayout.AddView(phon);
            OverAllLoginLayout.AddView(PhoneNumberLoginLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining LoginLoginLayout
            LoginLoginLayout = new LinearLayout(this);
            LoginLoginLayout.LayoutParameters = WrapContParams;
            LoginLoginLayout.Orientation      = Orientation.Horizontal;
            LoginLoginLayout.SetGravity(GravityFlags.Left);
            //
            Login1      = new TextView(this);
            Login1.Text = "Log-In";
            Login1.SetTextColor(Color.Blue);
            Login1.Click   += this.Login1_Click;
            Login1.TextSize = 30;
            LoginLoginLayout.AddView(Login1);
            OverAllLoginLayout.AddView(LoginLoginLayout);
            //=======================================================================================================================================
            //=======================================================================================================================================
            //Defining Login Button Layout
            ButtonLoginLayout = new LinearLayout(this);
            ButtonLoginLayout.LayoutParameters = WrapContParams;
            ButtonLoginLayout.Orientation      = Orientation.Horizontal;
            //Defining Login Button
            LoginButton = new Button(this);
            LoginButton.LayoutParameters = WrapContParams;
            LoginButton.Text             = "Register";
            LoginButton.TextSize         = 40;
            LoginButton.Typeface         = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            LoginButton.Click           += this.LoginButton_Click;
            //Adding views
            CameraUsage();
            ButtonLoginLayout.AddView(LoginButton);
            OverAllLoginLayout.AddView(ButtonLoginLayout);
            OverAllLoginLayout.AddView(ImageViewProfileImage);
        }