コード例 #1
0
ファイル: ChannelDetails.cs プロジェクト: pictos/Opus
 public static Fragment NewInstance(Channel item)
 {
     instance = new ChannelDetails {
         Arguments = new Bundle()
     };
     instance.item = item;
     return(instance);
 }
コード例 #2
0
ファイル: ChannelDetails.cs プロジェクト: pictos/Opus
        public override void OnDestroyView()
        {
            if (!MainActivity.instance.Paused)
            {
                Activity.FindViewById(Resource.Id.playlistButtons).Visibility = ViewStates.Visible;
                Activity.FindViewById <RelativeLayout>(Resource.Id.playlistHeader).Visibility = ViewStates.Gone;

                MainActivity.instance.HideFilter();
                MainActivity.instance.SupportActionBar.SetHomeButtonEnabled(false);
                MainActivity.instance.SupportActionBar.SetDisplayHomeAsUpEnabled(false);
                MainActivity.instance.SupportActionBar.SetDisplayShowTitleEnabled(false);
                if (MainActivity.instance.FindViewById(Resource.Id.toolbarLogo) != null)
                {
                    MainActivity.instance.FindViewById(Resource.Id.toolbarLogo).Visibility = ViewStates.Visible;
                }

                MainActivity.instance.contentRefresh.Refresh -= OnRefresh;
                Activity.FindViewById <AppBarLayout>(Resource.Id.appbar).RemoveOnOffsetChangedListener(this);
            }
            instance = null;
            base.OnDestroyView();
        }
コード例 #3
0
ファイル: ChannelDetails.cs プロジェクト: pictos/Opus
 public override void OnResume()
 {
     base.OnResume();
     instance = this;
 }
コード例 #4
0
        private void ListView_ItemClick(object sender, int position)
        {
            switch (result[position].Kind)
            {
            case YtKind.Video:
                YoutubeManager.Play(result[position].song);
                break;

            case YtKind.Playlist:
                MainActivity.instance.menu.FindItem(Resource.Id.search).ActionView.Focusable = false;
                MainActivity.instance.menu.FindItem(Resource.Id.search).CollapseActionView();
                MainActivity.instance.menu.FindItem(Resource.Id.search).ActionView.Focusable = true;
                MainActivity.instance.FindViewById <TabLayout>(Resource.Id.tabs).Visibility  = ViewStates.Gone;
                MainActivity.instance.SupportFragmentManager.BeginTransaction().Replace(Resource.Id.contentView, PlaylistTracks.NewInstance(result[position].playlist)).AddToBackStack("Playlist Track").Commit();
                break;

            case YtKind.Channel:
                MainActivity.instance.menu.FindItem(Resource.Id.search).ActionView.Focusable = false;
                MainActivity.instance.menu.FindItem(Resource.Id.search).CollapseActionView();
                MainActivity.instance.menu.FindItem(Resource.Id.search).ActionView.Focusable = true;
                MainActivity.instance.FindViewById <TabLayout>(Resource.Id.tabs).Visibility  = ViewStates.Gone;
                MainActivity.instance.SupportFragmentManager.BeginTransaction().Replace(Resource.Id.contentView, ChannelDetails.NewInstance(result[position].channel)).AddToBackStack("Channel Details").Commit();
                break;

            default:
                break;
            }
        }