@Override public void onClick(View v) { if (app.isEmptyPlaylist() && app.getNowPlayingSong().equals(FModelBuilder.Empty())) { FoobnixActivity.this.finish(); startActivity(new Intent(FoobnixActivity.this, OnlineActivity.class)); } else { FServiceHelper.getInstance().playPause(getApplicationContext()); } }
@Override protected void onStop() { super.onStop(); LOG.d("ON FoobnixActivity STOP"); unregisterReceiver(foobnixUIUpdater); unregisterReceiver(songLineUpdater); FServiceHelper.getInstance().activateShortTimer(FoobnixActivity.this, false); finish(); }
@Override protected void onStart() { super.onStart(); LOG.d("On Start"); final FModel stat = app.getNowPlayingSong(); playlistView.post( new Runnable() { @Override public void run() { playListAdapter.updateCurrentView(stat.getPosition(), stat.getTime()); } }); LOG.d("UPDATE", stat.getPosition()); FServiceHelper.getInstance().activateShortTimer(FoobnixActivity.this, true); playlistView.setSelection(stat.getPosition() - 2); registerReceiver(foobnixUIUpdater, new UIBrodcastAction().getIntentFilter()); registerReceiver(songLineUpdater, new NewSongBroadcastAction().getIntentFilter()); }
@Override public void onStopTrackingTouch(SeekBar seekBar) { FServiceHelper.getInstance().seekTo(FoobnixActivity.this, progress); }
@Override public void onItemClick(AdapterView<?> adapterView, View v, int pos, long id) { FServiceHelper.getInstance().playAtPos(getApplicationContext(), pos); }
@Override public void onClick(View v) { FServiceHelper.getInstance().next(getApplicationContext()); }
@Override public void onClick(View v) { FServiceHelper.getInstance().prev(FoobnixActivity.this); }