@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 onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.player); playlistView = (ListView) findViewById(R.id.listview_playlist); playlistView.setAdapter(playListAdapter); SeekBar seekBar = ((SeekBar) findViewById(R.id.playerSeekBar)); seekBar.setOnSeekBarChangeListener(seekLisner); playlistView.setOnItemClickListener(onItemClick); playlistView.setOnItemLongClickListener(onDialog); ImageButton playPause = (ImageButton) findViewById(R.id.button_play_pause); playPause.setOnClickListener(onPlayPause); ImageButton next = (ImageButton) findViewById(R.id.button_next); next.setOnClickListener(onNext); ImageButton prev = (ImageButton) findViewById(R.id.button_prev); prev.setOnClickListener(onPrev); foobnixUIUpdater = new FoobnixUIUpdater(this, app); songLineUpdater = new SongLineUpdater(playListAdapter, playlistView); if (app.getNowPlayingSong().equals(FModelBuilder.Empty())) { app.getNotification().displayNotifcation(getActivityTitle(), C.get().sleepMins); } View menu = (View) findViewById(R.id.imageShowMenu); menu.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { hideShowMenu(); } }); LOG.d("ON FoobnixActivity Create"); onAcitvateMenuImages(this); }