Ejemplo n.º 1
0
 @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());
   }
 }
Ejemplo n.º 2
0
 @Override
 protected void onStop() {
   super.onStop();
   LOG.d("ON FoobnixActivity STOP");
   unregisterReceiver(foobnixUIUpdater);
   unregisterReceiver(songLineUpdater);
   FServiceHelper.getInstance().activateShortTimer(FoobnixActivity.this, false);
   finish();
 }
Ejemplo n.º 3
0
  @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());
  }
Ejemplo n.º 4
0
 @Override
 public void onStopTrackingTouch(SeekBar seekBar) {
   FServiceHelper.getInstance().seekTo(FoobnixActivity.this, progress);
 }
Ejemplo n.º 5
0
 @Override
 public void onItemClick(AdapterView<?> adapterView, View v, int pos, long id) {
   FServiceHelper.getInstance().playAtPos(getApplicationContext(), pos);
 }
Ejemplo n.º 6
0
 @Override
 public void onClick(View v) {
   FServiceHelper.getInstance().next(getApplicationContext());
 }
Ejemplo n.º 7
0
 @Override
 public void onClick(View v) {
   FServiceHelper.getInstance().prev(FoobnixActivity.this);
 }