Exemplo n.º 1
0
        protected override void OnCreate (Bundle savedInstanceState)
        {
            base.OnCreate (savedInstanceState);

            SetContentView (Resource.Layout.AudioListView);
            _album = ExtraUtils.GetAlbum (DrunkAudibleApplication.Self.Database, Intent);
            Title = _album.Title;
            ListAdapter = new AudioListAdapter (this, _album);
            ListView.ItemClick += OnAlbumItemClicked;

            if (_album == DrunkAudibleApplication.Self.CurrentAlbum)
            {
                var currentEpisode = DrunkAudibleApplication.Self.CurrentEpisode;
                if (!AudioEpisode.IsNullOrEmpty (currentEpisode))
                {
                    ListView.SetSelection (_album.Episodes.IndexOf(currentEpisode));
                }
            }
        }
Exemplo n.º 2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.AudioListView);
            _album              = ExtraUtils.GetAlbum(DrunkAudibleApplication.Self.Database, Intent);
            Title               = _album.Title;
            ListAdapter         = new AudioListAdapter(this, _album);
            ListView.ItemClick += OnAlbumItemClicked;

            if (_album == DrunkAudibleApplication.Self.CurrentAlbum)
            {
                var currentEpisode = DrunkAudibleApplication.Self.CurrentEpisode;
                if (!AudioEpisode.IsNullOrEmpty(currentEpisode))
                {
                    ListView.SetSelection(_album.Episodes.IndexOf(currentEpisode));
                }
            }
        }