Пример #1
0
        private void SwitchToTabFragment(int resourceID)
        {
            _isInSettings = false;

            if (_currentTabID != resourceID)
            {
                _currentTabID = resourceID;
                FragmentHelper.PopAll(this);
                FragmentHelper.Push(this, GetTabFragment(_currentTabID));
            }
            else
            {
                FragmentHelper.PopAllButOne(this);
            }
        }
Пример #2
0
        private void SetUpPlaylistRecycler(RecyclerView recyclerView, View view)
        {
            ((SimpleItemAnimator)recyclerView.GetItemAnimator()).SupportsChangeAnimations = false;
            recyclerView.SetLayoutManager(new LinearLayoutManager(Context));
            recyclerView.AddItemDecoration(new VerticalSpaceItemDecoration(20)
            {
                ShouldShowBeforeFirst = true
            });

            _playlistAdapter = new PlaylistAdapter(Activity, GetPlaylists());
            //_playlistAdapter.SetMultiChoiceModeListener(this);
            _playlistAdapter.ItemClick += (s, args) => FragmentHelper.Push(Activity, PlaylistFragment.Instantiate(args.Item));

            recyclerView.SetAdapter(_playlistAdapter);
        }
Пример #3
0
        private void OpenContent(IContent content)
        {
            _currentPath = content.Path;
            _isAtRoot    = false;

            if (content is IContentSet <ILocalContent> contentSet)
            {
                _contentAdapter.ReplaceItems(contentSet.Contents.Cast <IContent>().ToList());
            }
            else
            {
                switch (content.Kind)
                {
                case Kinds.Image:
                    FragmentHelper.Push(Activity, ImageFragment.Instantiate(content.Path));
                    break;
                }
                //_contentController.OpenContent(Content);
            }
        }