internal BookmarkToolbar(Context context, CustomToolBarPdfViewerDemo sampleView) : base(context) { this.sampleView = sampleView; bookmarkFont = sampleView.bookmarkFont; var inflater = (LayoutInflater)context.GetSystemService(Context.LayoutInflaterService); bookmarkLayout = (LinearLayout)inflater.Inflate(Resources.GetLayout(Resource.Layout.bookmarkAndroidToolbar), this, true); backToViewerButton = bookmarkLayout.FindViewById <Button>(Resource.Id.backToViewerButton); bookmarkCloseButton = bookmarkLayout.FindViewById <Button>(Resource.Id.bookmarkCloseButton); bookmarkTitle = bookmarkLayout.FindViewById <LinearLayout>(Resource.Id.bookmarkTitleBar); if (sampleView.IsDeviceTablet) { bookmarkTitle.LayoutParameters.Height = (int)(47 * Resources.DisplayMetrics.Density); backToViewerButton.Visibility = ViewStates.Invisible; bookmarkCloseButton.Click += M_bookmarkCloseButton_Click; bookmarkCloseButton.Typeface = sampleView.font; } else { bookmarkCloseButton.Visibility = ViewStates.Invisible; bookmarkTitle.LayoutParameters.Height = (int)(60 * Resources.DisplayMetrics.Density); backToViewerButton.Click += BackToViewerButton_Click; backToViewerButton.Typeface = sampleView.bookmarkFont; } bookmarkView = bookmarkLayout.FindViewById <ListView>(Resource.Id.bookmarkListView); listAdapter = new BookmarkListAdapter(context, this, Resources.DisplayMetrics.Density); bookmarkView.Adapter = listAdapter; SetBackgroundColor(Color.White); }