Toggle controls on click rather than only show them

This commit is contained in:
Christopher Eby 2010-02-19 18:26:53 -06:00
parent 4c3e139802
commit 5e4e036e5c

@ -274,22 +274,27 @@ public class NowPlayingActivity extends Activity implements CoverViewWatcher, Se
public void clicked()
{
mControlsTop.setVisibility(View.VISIBLE);
mControlsBottom.setVisibility(View.VISIBLE);
mPlayPauseButton.requestFocus();
if (mStartTime == 0) {
try {
mStartTime = mService.getStartTime();
mDuration = mService.getDuration();
} catch (RemoteException e) {
return;
if (mControlsBottom.getVisibility() == View.VISIBLE) {
mControlsTop.setVisibility(View.GONE);
mControlsBottom.setVisibility(View.GONE);
} else {
mControlsTop.setVisibility(View.VISIBLE);
mControlsBottom.setVisibility(View.VISIBLE);
mPlayPauseButton.requestFocus();
if (mStartTime == 0) {
try {
mStartTime = mService.getStartTime();
mDuration = mService.getDuration();
} catch (RemoteException e) {
return;
}
}
updateProgress();
sendHideMessage();
}
updateProgress();
sendHideMessage();
}
private String stringForTime(int ms)