示例#1
0
        private void TrySetToolbar()
        {
            if (toolbar == null)
            {
                return;
            }

            SetSupportActionBar(toolbar);
            collapsingToolbar = FindViewById <CollapsingToolbarLayout>(Resource.Id.collapsing_toolbar_layout);
            collapsingToolbar.CollapsedTitleTypeface = Roboto.Medium(Assets);
            collapsingToolbar.ExpandedTitleTypeface  = Roboto.LightItalic(Assets);
        }
示例#2
0
        private async Task SetupRecyclerView()
        {
            var imageService = SimpleIoC.GetImageService(this, Resources.DisplayMetrics);
            var placeholder  =
                await
                Task <Bitmap> .Factory.StartNew(
                    () => BitmapFactory.DecodeResource(Resources, Resource.Drawable.ic_broken_image_white_48dp));

            adapter = new GoalItemAdapter(ContentResolver, Roboto.Medium(Assets), placeholder, Resources, imageService);
            recyclerView.SetLayoutManager(new GridLayoutManager(this, 2, LinearLayoutManager.Vertical, false));
            recyclerView.SetAdapter(adapter);
            recyclerView.HasFixedSize = true;
            adapter.ItemClick        += OnItemClick;
            adapter.ItemLongClick    += OnItemLongClick;
            adapter.ModeChanged      += OnModeChanged;
            adapter.ItemCheckChanged += OnItemCheckChanged;
        }
 private void StyleView()
 {
     dateBtn.Typeface  = Roboto.Medium(Assets);
     imageBtn.Typeface = Roboto.Medium(Assets);
 }