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