[Android] Audio player: hide the progress bar when the player is entirely shown
Adrien Maglo
git at videolan.org
Fri Jan 17 16:46:05 CET 2014
vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Fri Jan 17 16:45:41 2014 +0100| [50e917e8bac45e91bfc484bad5369fd7ef3c13b4] | committer: Adrien Maglo
Audio player: hide the progress bar when the player is entirely shown
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=50e917e8bac45e91bfc484bad5369fd7ef3c13b4
---
vlc-android/src/org/videolan/vlc/gui/MainActivity.java | 4 ++--
vlc-android/src/org/videolan/vlc/widget/AudioMiniPlayer.java | 6 +++++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index e77d312..e00e2d9 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -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);
}
};
diff --git a/vlc-android/src/org/videolan/vlc/widget/AudioMiniPlayer.java b/vlc-android/src/org/videolan/vlc/widget/AudioMiniPlayer.java
index 4ca32c2..59a189a 100644
--- a/vlc-android/src/org/videolan/vlc/widget/AudioMiniPlayer.java
+++ b/vlc-android/src/org/videolan/vlc/widget/AudioMiniPlayer.java
@@ -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() {
More information about the Android
mailing list