Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
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
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
fe8c2bcb
Commit
fe8c2bcb
authored
11 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
fix english
parent
44a8525e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
contrib/mobile/Android/src/org/geuz/onelab/MainActivity.java
+30
-30
30 additions, 30 deletions
contrib/mobile/Android/src/org/geuz/onelab/MainActivity.java
with
30 additions
and
30 deletions
contrib/mobile/Android/src/org/geuz/onelab/MainActivity.java
+
30
−
30
View file @
fe8c2bcb
...
@@ -129,8 +129,8 @@ public class MainActivity extends Activity{
...
@@ -129,8 +129,8 @@ public class MainActivity extends Activity{
else
if
(
item
.
getTitle
().
equals
(
getString
(
R
.
string
.
menu_share
)))
{
else
if
(
item
.
getTitle
().
equals
(
getString
(
R
.
string
.
menu_share
)))
{
if
(
this
.
_compute
)
{
if
(
this
.
_compute
)
{
AlertDialog
.
Builder
dialogBuilder
=
new
AlertDialog
.
Builder
(
this
);
AlertDialog
.
Builder
dialogBuilder
=
new
AlertDialog
.
Builder
(
this
);
_errorDialog
=
dialogBuilder
.
setTitle
(
"Can't show the model
s
list"
)
_errorDialog
=
dialogBuilder
.
setTitle
(
"Can't show the model list"
)
.
setMessage
(
"The comput
ing
ha
ve
to
be finished
before you can take a screenshot
.
"
)
.
setMessage
(
"The comput
ation
ha
s
to
complete
before you can take a screenshot"
)
.
setPositiveButton
(
"OK"
,
new
DialogInterface
.
OnClickListener
()
{
.
setPositiveButton
(
"OK"
,
new
DialogInterface
.
OnClickListener
()
{
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
...
@@ -154,8 +154,8 @@ public class MainActivity extends Activity{
...
@@ -154,8 +154,8 @@ public class MainActivity extends Activity{
else
if
(
item
.
getItemId
()
==
android
.
R
.
id
.
home
)
{
else
if
(
item
.
getItemId
()
==
android
.
R
.
id
.
home
)
{
if
(
this
.
_compute
)
{
if
(
this
.
_compute
)
{
AlertDialog
.
Builder
dialogBuilder
=
new
AlertDialog
.
Builder
(
this
);
AlertDialog
.
Builder
dialogBuilder
=
new
AlertDialog
.
Builder
(
this
);
_errorDialog
=
dialogBuilder
.
setTitle
(
"Can't show the model
s
list"
)
_errorDialog
=
dialogBuilder
.
setTitle
(
"Can't show the model list"
)
.
setMessage
(
"The comput
ing
ha
ve
to
be finished
before you can select an
other model
.
"
)
.
setMessage
(
"The comput
ation
ha
s
to
complete
before you can select another model"
)
.
setPositiveButton
(
"OK"
,
new
DialogInterface
.
OnClickListener
()
{
.
setPositiveButton
(
"OK"
,
new
DialogInterface
.
OnClickListener
()
{
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
...
@@ -265,7 +265,7 @@ public class MainActivity extends Activity{
...
@@ -265,7 +265,7 @@ public class MainActivity extends Activity{
public
void
onLowMemory
()
{
public
void
onLowMemory
()
{
if
(!
_compute
)
return
;
if
(!
_compute
)
return
;
_gmsh
.
onelabCB
(
"stop"
);
_gmsh
.
onelabCB
(
"stop"
);
Toast
.
makeText
(
this
,
"Low memory
!!
!
c
omput
ing
is going to stop"
,
Toast
.
LENGTH_LONG
).
show
();
Toast
.
makeText
(
this
,
"Low memory!
C
omput
ation
is going to stop"
,
Toast
.
LENGTH_LONG
).
show
();
super
.
onLowMemory
();
super
.
onLowMemory
();
}
}
...
@@ -274,11 +274,11 @@ public class MainActivity extends Activity{
...
@@ -274,11 +274,11 @@ public class MainActivity extends Activity{
if
(!
_compute
)
return
;
if
(!
_compute
)
return
;
if
(
level
==
Activity
.
TRIM_MEMORY_COMPLETE
){
if
(
level
==
Activity
.
TRIM_MEMORY_COMPLETE
){
_gmsh
.
onelabCB
(
"stop"
);
_gmsh
.
onelabCB
(
"stop"
);
notifyEndComputing
(
"The comput
ing
had to stop because your device ran out of memory"
);
notifyEndComputing
(
"The comput
ation
had to stop because your device ran out of memory"
);
_notify
=
false
;
_notify
=
false
;
}
}
else
if
(
level
==
Activity
.
TRIM_MEMORY_MODERATE
)
{
else
if
(
level
==
Activity
.
TRIM_MEMORY_MODERATE
)
{
notifyComputing
(
"Comput
ing
in progress - low memory"
,
true
);
notifyComputing
(
"Comput
ation
in progress - low memory"
,
true
);
}
}
super
.
onTrimMemory
(
level
);
super
.
onTrimMemory
(
level
);
}
}
...
@@ -299,11 +299,11 @@ public class MainActivity extends Activity{
...
@@ -299,11 +299,11 @@ public class MainActivity extends Activity{
}
}
private
void
notifyComputing
()
{
private
void
notifyComputing
()
{
notifyComputing
(
"Comput
ing
in progress"
,
false
);
notifyComputing
(
"Comput
ation
in progress"
,
false
);
}
}
private
void
notifyEndComputing
()
{
private
void
notifyEndComputing
()
{
notifyEndComputing
(
"
The computing is finished
"
);
notifyEndComputing
(
"
Computation done!
"
);
}
}
private
void
notifyEndComputing
(
String
msg
)
{
private
void
notifyEndComputing
(
String
msg
)
{
...
...
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