Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Casanowow Life for love
VLC-Android
Commits
258c0311
Commit
258c0311
authored
Jun 20, 2012
by
Ludovic Fauvet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the progress bar provided by the action bar
parent
21f32a34
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
vlc-android/src/org/videolan/vlc/gui/MainActivity.java
vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+6
-4
No files found.
vlc-android/src/org/videolan/vlc/gui/MainActivity.java
View file @
258c0311
...
...
@@ -71,6 +71,8 @@ import android.util.Log;
import
com.actionbarsherlock.view.Menu
;
import
com.actionbarsherlock.view.MenuInflater
;
import
com.actionbarsherlock.view.MenuItem
;
import
com.actionbarsherlock.view.Window
;
import
android.view.View
;
import
android.view.View.OnClickListener
;
import
android.widget.Button
;
...
...
@@ -95,7 +97,6 @@ public class MainActivity extends SherlockFragmentActivity {
private
static
final
String
PREF_SHOW_INFO
=
"show_info"
;
private
ActionBar
mActionBar
;
private
ProgressBar
mProgressBar
;
private
TabHost
mTabHost
;
private
int
mCurrentState
=
0
;
private
ImageButton
mChangeTab
;
...
...
@@ -111,7 +112,9 @@ public class MainActivity extends SherlockFragmentActivity {
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
requestWindowFeature
(
Window
.
FEATURE_INDETERMINATE_PROGRESS
);
setContentView
(
R
.
layout
.
main
);
super
.
onCreate
(
savedInstanceState
);
/* Get settings */
...
...
@@ -119,7 +122,6 @@ public class MainActivity extends SherlockFragmentActivity {
LibVLC
.
useIOMX
(
this
);
/* Initialize variables */
mProgressBar
=
(
ProgressBar
)
findViewById
(
R
.
id
.
ml_progress_bar
);
mChangeTab
=
(
ImageButton
)
findViewById
(
R
.
id
.
change_tab
);
mInfoLayout
=
(
View
)
findViewById
(
R
.
id
.
info_layout
);
mInfoProgress
=
(
ProgressBar
)
findViewById
(
R
.
id
.
info_progress
);
...
...
@@ -424,10 +426,10 @@ public class MainActivity extends SherlockFragmentActivity {
String
action
=
intent
.
getAction
();
if
(
action
.
equalsIgnoreCase
(
ACTION_SHOW_PROGRESSBAR
))
{
m
ProgressBar
.
setVisibility
(
View
.
VISIBL
E
);
set
ProgressBar
IndeterminateVisibility
(
Boolean
.
TRU
E
);
}
else
if
(
action
.
equalsIgnoreCase
(
ACTION_HIDE_PROGRESSBAR
))
{
m
ProgressBar
.
setVisibility
(
View
.
INVISIBL
E
);
set
ProgressBar
IndeterminateVisibility
(
Boolean
.
FALS
E
);
}
else
if
(
action
.
equalsIgnoreCase
(
ACTION_SHOW_TEXTINFO
))
{
String
info
=
intent
.
getStringExtra
(
"info"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment