private int MaximumButtonWidth() { var size = AndroidUtils.MeasureLayout(this, LayoutInflater, Resource.Layout.ChooseChapterButton, setupView: view => { var button = view.FindViewById <Button>(Resource.Id.chooseChapterButton); button.Text = (Structure.Books.Max(x => x.Chapters.Length) + 1).ToString(); }); return(size.Width); }
private int ChapterHeadingHeight() { var size = AndroidUtils.MeasureLayout(this, LayoutInflater, Resource.Layout.VerseLayout, setupView: view => { var chapterHeaderView = view.FindViewById <TextView>(Resource.Id.verseChapterHeaderText); var verseView = view.FindViewById <TextView>(Resource.Id.verseText); verseView.Visibility = ViewStates.Gone; chapterHeaderView.Text = "Chapter 150"; }); return(size.Height); }