Beispiel #1
0
        public override bool MenuItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Android.Resource.Id.Home:
                SetResult(Result.Ok);
                Finish();
                break;

            case Resource.Id.Menu_Browse_Filter:
                BrowseFilterDialog.Create(this, Presenter);
                break;

            case Resource.Id.Menu_Browse_Sort:
                BrowseSortDialog.Create(this, Presenter.GetBrowseDto().Sort.FirstOrDefault(), sort =>
                {
                    var browseDto  = Presenter.GetBrowseDto();
                    browseDto.Sort = new List <MediaSort> {
                        sort
                    };
                    Presenter.BrowseAniListMedia(browseDto);
                });
                break;
            }

            return(true);
        }
Beispiel #2
0
        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Resource.Id.Menu_Browse_Filter:
                BrowseFilterDialog.Create(Activity, Presenter);
                return(true);

            case Resource.Id.Menu_Browse_Sort:
                BrowseSortDialog.Create(Activity, Presenter.GetBrowseDto().Sort.FirstOrDefault(), sort =>
                {
                    var browseDto  = Presenter.GetBrowseDto();
                    browseDto.Sort = new List <MediaSort> {
                        sort
                    };
                    Presenter.BrowseAniListMedia(browseDto);
                });
                return(true);
            }

            return(base.OnOptionsItemSelected(item));
        }