Exemple #1
0
 //intents back to main page
 private void AddStudentExplenationETLayout_Click(object sender, EventArgs e)
 {
     AddStudentExplenationET.RequestFocus();
     MyStuff.showSoftKeyboard(this, AddStudentExplenationET);
     //@Tomer
     //https://gist.github.com/icalderond/742f98f2f8cda1fae1b0bc877df76bbc @Javier Pardo
 }
Exemple #2
0
        //Drag Events
        public void BuildDialog()
        {
            //Dialog
            DurationDialog = new Dialog(this);
            DurationDialog.SetCancelable(false);
            DurationDialog.SetContentView(Resource.Layout.MyDialog);
            LinearLayout DurationDialogLayout = DurationDialog.FindViewById <LinearLayout>(Resource.Id.AbcDEF);

            DurationDialogLayout.Orientation = Orientation.Vertical;
            DurationDialogLayout.SetGravity(GravityFlags.Center);
            //Text view
            TextView DurationDialogTV = new TextView(this);

            DurationDialogTV.LayoutParameters = vlp;
            DurationDialogTV.Text             = "Duration: ";
            DurationDialogTV.Typeface         = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            DurationDialogTV.TextSize         = 30;
            //Edit text
            DurationDialogET = new TextInputEditText(this);
            DurationDialogET.SetBackgroundResource(Resource.Drawable.MyBackground);
            DurationDialogET.Hint             = "Duration";
            DurationDialogET.LayoutParameters = vlp;
            DurationDialogET.TextSize         = 30;
            DurationDialogET.InputType        = InputTypes.ClassPhone;
            //Input Layout
            LinearLayout DialogInputLayout = new LinearLayout(this);

            DialogInputLayout.LayoutParameters = vOneTwentyParams;
            DialogInputLayout.Orientation      = Orientation.Horizontal;
            //addind to layout
            DialogInputLayout.AddView(DurationDialogTV);
            DialogInputLayout.AddView(DurationDialogET);
            //Linear Layout
            DurationDialogLayout.AddView(DialogInputLayout);
            //button
            MyButton DialogMyButton = new MyButton(this);

            DialogMyButton.LayoutParameters = vlp;
            DialogMyButton.Text             = "Add";
            DialogMyButton.TextSize         = 30;
            DialogMyButton.Typeface         = Typeface.CreateFromAsset(Assets, "Katanf.ttf");
            DialogMyButton.Click           += this.DialogMyButton_Click;
            DurationDialogLayout.AddView(DialogMyButton);
            DurationDialog.Show();
            MyStuff.showSoftKeyboard(this, DurationDialogET);
        }