public void onListItemClick(ListView l, View v, int position, long id) { final Album a = albums.get(position); Log.d(getPackageName(), "Selected Album: " + a); Intent i = new Intent(this, SongsActivity.class); i.putExtra("album", a.getTitle()); i.putExtra("album_id", a.getId()); i.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); startActivity(i); }
@Override protected void updateNowPlaying(Song currentSong, boolean animate) { super.updateNowPlaying(currentSong, animate); for (Album a : albums) { if (currentSong != null && a.getId() == currentSong.getAlbum_id()) { a.setPlaying(true); Log.d(getPackageName(), a.getTitle() + " found"); } else { a.setPlaying(false); } } aa.notifyDataSetChanged(); }