Beispiel #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            FindViewById <Button>(Resource.Id.ButtonErrorToast).Click += delegate
            {
                Toasty.Error(this, "This is an error toast").Show();
            };

            FindViewById <Button>(Resource.Id.ButtonSuccessToast).Click += delegate
            {
                Toasty.Success(this, "Success").Show();
            };

            FindViewById <Button>(Resource.Id.ButtonInfoToast).Click += delegate
            {
                Toasty.Info(this, "Here is some info for you").Show();
            };
            FindViewById <Button>(Resource.Id.ButtonWarningToast).Click += delegate
            {
                Toasty.Warning(this, "Beware of the dog").Show();
            };
            FindViewById <Button>(Resource.Id.ButtonNormalToastWithoutIcon).Click += delegate
            {
                Toasty.Normal(this, "Normal toast without icon").Show();
            };
            FindViewById <Button>(Resource.Id.ButtonNormalToastWithIcon).Click += delegate
            {
                var icon = ToastyUtils.GetDrawable(this, Resource.Drawable.ic_pets_white_48dp);
                Toasty.Normal(this, "Normal toast with icon", icon).Show();
            };
        }
Beispiel #2
0
 private void BuildallEdittexts(int t)
 {
     try
     {
         DaysSV.RemoveAllViews();
         EdittextsLayout.RemoveAllViews();
         OverAllTimerLayout.RemoveView(DaysSV);
     }
     catch
     {
         Toasty.Normal(this, "First Inital", 5).Show();
         EdittextsLayout = new LinearLayout(this);
         EdittextsLayout.LayoutParameters = WrapContParams;
         EdittextsLayout.Orientation      = Orientation.Vertical;
         EdittextsLayout.SetGravity(GravityFlags.Center);
         DaysSV = new ScrollView(this);
         DaysSV.LayoutParameters = LLLP;
     }
     Edittexts = new TextInputEditText[50];
     EdittextL = new TextInputLayout[50];
     ////////////////////////////////
     for (int i = 0; i < t; i++)
     {
         EdittextL[i] = new TextInputLayout(this)
         {
             LayoutParameters = WrapContParams,
             Orientation      = Orientation.Horizontal,
         };
         Edittexts[i] = new TextInputEditText(this);
         Edittexts[i].SetBackgroundResource(Resource.Drawable.MyBackground);
         BLP.SetMargins(5, 5, 5, 5);
         Edittexts[i].LayoutParameters = BLP;
         Edittexts[i].Selected         = false;
         Edittexts[i].Hint             = "Seconds";
         Edittexts[i].InputType        = InputTypes.DatetimeVariationTime;
         EdittextL[i].AddView(Edittexts[i]);
         EdittextsLayout.AddView(EdittextL[i]);
     }
     DaysSV.AddView(EdittextsLayout);
     OverAllTimerLayout.AddView(DaysSV);
     Start = new Button(this);
     Start.LayoutParameters = BLP;
     Start.Text             = "START!";
     Start.Click           += this.Start_Click;
     OverAllTimerLayout.AddView(Start);
 }
Beispiel #3
0
        //Retrives the Groups from database
        public void GetDates()
        {
            dates = new List <string>();
            Query query = database.Collection("Users").Document(admin1.email).Collection("Meetings");

            query.Get().AddOnCompleteListener(new QueryListener((task) =>
            {
                if (task.IsSuccessful)
                {
                    var snapshot = (QuerySnapshot)task.Result;
                    if (!snapshot.IsEmpty)
                    {
                        var document = snapshot.Documents;
                        foreach (DocumentSnapshot item in document)
                        {
                            try
                            {
                                string day   = (item.GetString("Date").ToString())[0] + "" + (item.GetString("Date").ToString())[1];
                                string month = (item.GetString("Date").ToString())[3] + "" + (item.GetString("Date").ToString())[4];
                                string year  = (item.GetString("Date").ToString())[6] + "" + (item.GetString("Date").ToString())[7] + "" + (item.GetString("Date").ToString())[8] + "" + (item.GetString("Date").ToString())[9];
                                int inday    = int.Parse(day);
                                int inmonth  = int.Parse(month);
                                int inyear   = int.Parse(year);
                                dates.Add(MyStuff.MakeDateString(inyear, inmonth, inday));
                            }
                            catch
                            {
                                Toasty.Normal(this, "Empty", 5).Show();
                            }
                        }
                    }
                }
                BuildMainPage();
            }
                                                                ));
        }