Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Stavor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Orekit
Stavor
Commits
f6f35f4c
Commit
f6f35f4c
authored
10 years ago
by
Xavier Gibert
Browse files
Options
Downloads
Patches
Plain Diff
two progress bars one per browser
parent
f214e0df
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cs/si/stavor/MainActivity.java
+40
-5
40 additions, 5 deletions
src/cs/si/stavor/MainActivity.java
src/cs/si/stavor/fragments/OrbitFragment.java
+2
-2
2 additions, 2 deletions
src/cs/si/stavor/fragments/OrbitFragment.java
with
42 additions
and
7 deletions
src/cs/si/stavor/MainActivity.java
+
40
−
5
View file @
f6f35f4c
...
...
@@ -190,6 +190,39 @@ public class MainActivity extends ActionBarActivity implements
}
}
private
ProgressBar
browserProgressBarOrbit
=
null
;
private
FrameLayout
browserProgressLayoutOrbit
=
null
;
public
void
setBrowserProgressBarOrbit
(
ProgressBar
bar
,
FrameLayout
fr
){
browserProgressLayoutOrbit
=
fr
;
browserProgressBarOrbit
=
bar
;
}
public
void
resetBrowserProgressBarOrbit
(){
browserProgressLayoutOrbit
=
null
;
browserProgressBarOrbit
=
null
;
}
public
void
setBrowserProgressValueOrbit
(
int
progr
){
if
(
browserProgressLayoutOrbit
!=
null
&&
browserProgressBarOrbit
!=
null
){
browserProgressBarOrbit
.
setProgress
(
progr
);
if
(
progr
<
10000
){
browserProgressLayoutOrbit
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
Animation
fadeOut
=
new
AlphaAnimation
(
1.00f
,
0.00f
);
fadeOut
.
setDuration
(
1500
);
fadeOut
.
setAnimationListener
(
new
AnimationListener
()
{
public
void
onAnimationStart
(
Animation
animation
)
{}
public
void
onAnimationRepeat
(
Animation
animation
)
{}
public
void
onAnimationEnd
(
Animation
animation
)
{
browserProgressLayoutOrbit
.
setVisibility
(
View
.
GONE
);
}
});
browserProgressLayoutOrbit
.
startAnimation
(
fadeOut
);
}
}
}
//private WebServer server;
@Override
...
...
@@ -371,6 +404,12 @@ public class MainActivity extends ActionBarActivity implements
((
StavorApplication
)
getApplication
()).
db
=
dataFragment
.
getDb
();
hud_panel_open
=
dataFragment
.
getHudPanelOpen
();
if
(
flagActivityFirstExec
){
mXwalkView
.
load
(
Parameters
.
Web
.
STARTING_PAGE
,
null
);
mXwalkViewOrbit
.
load
(
Parameters
.
Web
.
STARTING_PAGE_ORBIT
,
null
);
flagActivityFirstExec
=
false
;
}
// NAVIGATION
mNavigationDrawerFragment
=
(
NavigationDrawerFragment
)
getSupportFragmentManager
()
...
...
@@ -714,11 +753,7 @@ public class MainActivity extends ActionBarActivity implements
@Override
protected
void
onResume
()
{
//Resume browser
super
.
onResume
();
if
(
flagActivityFirstExec
){
mXwalkView
.
load
(
Parameters
.
Web
.
STARTING_PAGE
,
null
);
mXwalkViewOrbit
.
load
(
Parameters
.
Web
.
STARTING_PAGE_ORBIT
,
null
);
flagActivityFirstExec
=
false
;
}
}
@Override
...
...
This diff is collapsed.
Click to expand it.
src/cs/si/stavor/fragments/OrbitFragment.java
+
2
−
2
View file @
f6f35f4c
...
...
@@ -96,7 +96,7 @@ public final class OrbitFragment extends Fragment {
ProgressBar
progressBar
=
(
ProgressBar
)
rootView
.
findViewById
(
R
.
id
.
progressBarBrowser
);
FrameLayout
progressBarLayout
=
(
FrameLayout
)
rootView
.
findViewById
(
R
.
id
.
frameLayoutProgress
);
progressBar
.
setProgress
(
0
);
((
MainActivity
)
getActivity
()).
setBrowserProgressBar
(
progressBar
,
progressBarLayout
);
((
MainActivity
)
getActivity
()).
setBrowserProgressBar
Orbit
(
progressBar
,
progressBarLayout
);
//needs to have browser defined but not loaded yet
rootView
.
post
(
new
Runnable
()
...
...
@@ -173,7 +173,7 @@ public final class OrbitFragment extends Fragment {
@Override
public
void
onDetach
()
{
((
MainActivity
)
getActivity
()).
resetBrowserProgressBar
();
((
MainActivity
)
getActivity
()).
resetBrowserProgressBar
Orbit
();
//XWalk
if
(
mXwalkView
!=
null
)
{
//mXwalkView.onDestroy();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment