@Override public boolean onSingleTapUp(MotionEvent e1) { // TODO Auto-generated method stub SongInfo songInfo = new SongInfo(); if (SWITCH_VIEW != SONG_VIEW) { return false; } try { int id = lv.pointToPosition((int) e1.getX(), (int) e1.getY()); // Log.i("SONG", // "ID:"+((TextView)lv.getChildAt(id).findViewById(R.id.song_textView)).getText().toString() // ); path = songList.get(id).getData(); duration = Long.parseLong(songList.get(id).getDuration()); Log.i("SONG LIST FRAGMENT", songList.get(id).getTitle()); songInfo.setAlbum(songList.get(id).getAlbum()); songInfo.setAlbum_art(songList.get(id).getAlbum_art()); songInfo.setAlbum_id(songList.get(id).getAlbum_id()); songInfo.setArtist(songList.get(id).getArtist()); songInfo.setData(songList.get(id).getData()); songInfo.setDisplayName(songList.get(id).getDisplayName()); songInfo.setDuration(songList.get(id).getDuration()); songInfo.setId(songList.get(id).getId()); songInfo.setTitle(songList.get(id).getTitle()); StaticMusic.setSongInfo(songInfo); StaticMusic.songQueue.addLast(songInfo); } catch (NullPointerException e) { e.printStackTrace(); StaticMusic.songQueue = new LinkedList<SongInfo>(); StaticMusic.songQueue.addLast(songInfo); Log.i("SONG LIST FRAGMENT", "here ur new"); } Intent toNowPlaying = new Intent(this, Nowplaying.class); toNowPlaying.putExtra("activity", "songlist"); toNowPlaying.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(toNowPlaying); return false; }
@Test public final void testSetArtist() { testGetArtist(); siExtended.setArtist("Steven"); assertEquals("Steven", siExtended.getArtist()); }