fabionuno / FloatingActionButton-Xamarin.Android

Android Floating Action Button based on Material Design for Xamarin.Android
Other
63 stars 16 forks source link

Can't set LabelText on FloatingActionButton #11

Closed gregoryscode closed 7 years ago

gregoryscode commented 7 years ago
        var fabViolation1 = new Clans.Fab.FloatingActionButton(this);
        fabViolation1.ColorNormal = Color.ParseColor("#272B35");
        fabViolation1.ColorPressed = Resource.Color.accent;
        fabViolation1.ButtonSize = FloatingActionButton.SizeMini;
        fabViolation1.LabelVisibility = 1;     
        fabViolation1.LabelText = ExamManager.Instance.LightViolationList.Find(a => a.ID == 1).Description;
        fabViolation1.SetImageResource(Resource.Drawable.icon_fab_end_exam);

fabViolation1.LabelText gives a NullPointerException.

capture

gregoryscode commented 7 years ago

My mistake, sorry!