Пример #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_MediaLists_Sort:
                MediaListSortDialog.Create(this, _currentSort, _currentSortDirection,
                                           (sort, direction) =>
                {
                    Presenter.SetMediaListSortSettings(_mediaType, sort, direction);
                    SetCollection(_collection);
                });
                break;

            case Resource.Id.Menu_MediaLists_Refresh:
                Recreate();
                break;

            case Resource.Id.Menu_MediaLists_Filter:
                MediaListFilterDialog.Create(this, this, _mediaType, Presenter.GetGenres(), Presenter.GetMediaTags());
                return(true);
            }

            return(true);
        }
Пример #2
0
        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Resource.Id.Menu_MediaLists_Refresh:
                _collection = null;
                RecreateFragment();
                return(true);

            case Resource.Id.Menu_MediaLists_Sort:
                MediaListSortDialog.Create(Activity, _currentSort, _currentSortDirection, SetMediaListSort);
                return(true);

            case Resource.Id.Menu_MediaLists_Filter:
                MediaListFilterDialog.Create(Activity, this, _type, Presenter.GetGenres(), Presenter.GetMediaTags());
                return(true);
            }

            return(base.OnOptionsItemSelected(item));
        }