[Android] Enable the indeterminate progress for pre-ICS devices too
Ludovic Fauvet
git at videolan.org
Tue Oct 2 15:36:19 CEST 2012
vlc-ports/android | branch: master | Ludovic Fauvet <etix at videolan.org> | Tue Oct 2 15:25:27 2012 +0200| [6b1815c4fe4c31791de51db524cab0fe1f2f1aa8] | committer: Ludovic Fauvet
Enable the indeterminate progress for pre-ICS devices too
Using the proper method makes it work. Oops...
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=6b1815c4fe4c31791de51db524cab0fe1f2f1aa8
---
vlc-android/src/org/videolan/vlc/gui/MainActivity.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 7bcf2c8..58e9e40 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -118,8 +118,8 @@ public class MainActivity extends SherlockFragmentActivity {
return;
}
- if (Util.isICSOrLater()) /* Bug on pre-ICS, the progress bar is always present */
- requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
+ /* Enable the indeterminate progress feature */
+ requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
// Set up the sliding menu
setContentView(R.layout.sliding_menu);
@@ -515,9 +515,9 @@ public class MainActivity extends SherlockFragmentActivity {
String action = intent.getAction();
if (action.equalsIgnoreCase(ACTION_SHOW_PROGRESSBAR)) {
- setProgressBarIndeterminateVisibility(Boolean.TRUE);
+ setSupportProgressBarIndeterminateVisibility(true);
} else if (action.equalsIgnoreCase(ACTION_HIDE_PROGRESSBAR)) {
- setProgressBarIndeterminateVisibility(Boolean.FALSE);
+ setSupportProgressBarIndeterminateVisibility(false);
} else if (action.equalsIgnoreCase(ACTION_SHOW_TEXTINFO)) {
String info = intent.getStringExtra("info");
int max = intent.getIntExtra("max", 0);
More information about the Android
mailing list