Commit 50e917e8 authored by Adrien Maglo's avatar Adrien Maglo

Audio player: hide the progress bar when the player is entirely shown

parent bdc62750
......@@ -771,7 +771,7 @@ public class MainActivity extends SherlockFragmentActivity {
@Override
public void onPanelOpened() {
mAudioPlayer.setHeaderVisibilities(false, false, true);
mAudioPlayer.setHeaderVisibilities(false, false, true, true);
}
@Override
......@@ -779,7 +779,7 @@ public class MainActivity extends SherlockFragmentActivity {
@Override
public void onPanelClosed() {
mAudioPlayer.setHeaderVisibilities(true, true, false);
mAudioPlayer.setHeaderVisibilities(true, true, false, false);
}
};
......
......@@ -86,6 +86,7 @@ public class AudioMiniPlayer extends Fragment implements IAudioPlayer {
private boolean mAdvFuncVisible;
private boolean mPlaylistSwitchVisible;
private boolean mHeaderPlayPauseVisible;
private boolean mProgressBarVisible;
@Override
public void onCreate(Bundle savedInstanceState) {
......@@ -129,6 +130,7 @@ public class AudioMiniPlayer extends Fragment implements IAudioPlayer {
mAdvFuncVisible = false;
mPlaylistSwitchVisible = false;
mHeaderPlayPauseVisible = true;
mProgressBarVisible = true;
restoreHedaderButtonVisibilities();
mTime.setOnClickListener(new View.OnClickListener() {
......@@ -422,10 +424,11 @@ public class AudioMiniPlayer extends Fragment implements IAudioPlayer {
* @param headerPlayPauseVisible
*/
public void setHeaderVisibilities(boolean advFuncVisible, boolean playlistSwitchVisible,
boolean headerPlayPauseVisible) {
boolean headerPlayPauseVisible, boolean progressBarVisible) {
mAdvFuncVisible = advFuncVisible;
mPlaylistSwitchVisible = playlistSwitchVisible;
mHeaderPlayPauseVisible = headerPlayPauseVisible;
mProgressBarVisible = progressBarVisible;
restoreHedaderButtonVisibilities();
}
......@@ -433,6 +436,7 @@ public class AudioMiniPlayer extends Fragment implements IAudioPlayer {
mAdvFunc.setVisibility(mAdvFuncVisible ? ImageButton.VISIBLE : ImageButton.GONE);
mPlaylistSwitch.setVisibility(mPlaylistSwitchVisible ? ImageButton.VISIBLE : ImageButton.GONE);
mHeaderPlayPause.setVisibility(mHeaderPlayPauseVisible ? ImageButton.VISIBLE : ImageButton.GONE);
mProgressBar.setVisibility(mProgressBarVisible ? ProgressBar.VISIBLE : ProgressBar.GONE);
}
private void hideHedaderButtons() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment