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
e4371fac
Commit
e4371fac
authored
11 years ago
by
Maxime Graulich
Browse files
Options
Downloads
Patches
Plain Diff
Android: replace calls to the support.v4 library
parent
439c095d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
contrib/mobile/Android/src/org/geuz/onelab/ModelFragment.java
+3
-3
3 additions, 3 deletions
...rib/mobile/Android/src/org/geuz/onelab/ModelFragment.java
contrib/mobile/Android/src/org/geuz/onelab/mGLSurfaceView.java
+3
-4
3 additions, 4 deletions
...ib/mobile/Android/src/org/geuz/onelab/mGLSurfaceView.java
with
6 additions
and
7 deletions
contrib/mobile/Android/src/org/geuz/onelab/ModelFragment.java
+
3
−
3
View file @
e4371fac
...
@@ -70,7 +70,6 @@ public class ModelFragment extends Fragment{
...
@@ -70,7 +70,6 @@ public class ModelFragment extends Fragment{
_glView
.
setRenderMode
(
GLSurfaceView
.
RENDERMODE_WHEN_DIRTY
);
_glView
.
setRenderMode
(
GLSurfaceView
.
RENDERMODE_WHEN_DIRTY
);
_glView
.
requestRender
();
_glView
.
requestRender
();
_hideDelay
=
new
Handler
();
_hideDelay
=
new
Handler
();
this
.
postDelay
();
_gestureDetector
=
new
GestureDetector
(
getActivity
(),
new
OnGestureListener
()
{
_gestureDetector
=
new
GestureDetector
(
getActivity
(),
new
OnGestureListener
()
{
public
boolean
onSingleTapUp
(
MotionEvent
e
)
{
return
false
;
}
// UNUSED Auto-generated method stub
public
boolean
onSingleTapUp
(
MotionEvent
e
)
{
return
false
;
}
// UNUSED Auto-generated method stub
public
void
onShowPress
(
MotionEvent
e
)
{}
// UNUSED Auto-generated method stub
public
void
onShowPress
(
MotionEvent
e
)
{}
// UNUSED Auto-generated method stub
...
@@ -138,7 +137,7 @@ public class ModelFragment extends Fragment{
...
@@ -138,7 +137,7 @@ public class ModelFragment extends Fragment{
if
(((
ImageButton
)
v
).
getContentDescription
().
equals
(
"play"
))
{
if
(((
ImageButton
)
v
).
getContentDescription
().
equals
(
"play"
))
{
((
ImageButton
)
v
).
setContentDescription
(
"pause"
);
((
ImageButton
)
v
).
setContentDescription
(
"pause"
);
((
ImageButton
)
v
).
setImageResource
(
android
.
R
.
drawable
.
ic_media_pause
);
((
ImageButton
)
v
).
setImageResource
(
android
.
R
.
drawable
.
ic_media_pause
);
_animationStepper
.
setMax
(
_gmsh
.
numberOfAnimation
());
_animationStepper
.
setMax
(
_gmsh
.
numberOfAnimation
()
-
1
);
_animation
=
new
Timer
();
_animation
=
new
Timer
();
_animation
.
schedule
(
new
TimerTask
()
{
_animation
.
schedule
(
new
TimerTask
()
{
public
void
run
()
{
public
void
run
()
{
...
@@ -176,6 +175,7 @@ public class ModelFragment extends Fragment{
...
@@ -176,6 +175,7 @@ public class ModelFragment extends Fragment{
RelativeLayout
.
LayoutParams
.
WRAP_CONTENT
);
RelativeLayout
.
LayoutParams
.
WRAP_CONTENT
);
layoutParams
.
addRule
(
RelativeLayout
.
ALIGN_PARENT_BOTTOM
);
layoutParams
.
addRule
(
RelativeLayout
.
ALIGN_PARENT_BOTTOM
);
glViewLayout
.
addView
(
_controlBarLayout
,
layoutParams
);
glViewLayout
.
addView
(
_controlBarLayout
,
layoutParams
);
this
.
_controlBarLayout
.
setVisibility
(
View
.
INVISIBLE
);
return
rootView
;
return
rootView
;
}
}
public
void
postDelay
(
int
delay
)
{
public
void
postDelay
(
int
delay
)
{
...
@@ -195,7 +195,7 @@ public class ModelFragment extends Fragment{
...
@@ -195,7 +195,7 @@ public class ModelFragment extends Fragment{
_controlBarLayout
.
startAnimation
(
bottomUp
);
_controlBarLayout
.
startAnimation
(
bottomUp
);
}
}
public
void
hideControlBar
()
{
public
void
hideControlBar
()
{
if
(
getActivity
()
==
null
)
return
;
if
(
getActivity
()
==
null
||
View
.
INVISIBLE
==
_controlBarLayout
.
getVisibility
()
)
return
;
_hideDelay
.
removeCallbacks
(
hideControlsRunnable
);
_hideDelay
.
removeCallbacks
(
hideControlsRunnable
);
Animation
bottomDown
=
AnimationUtils
.
loadAnimation
(
getActivity
(),
android
.
R
.
anim
.
fade_out
);
Animation
bottomDown
=
AnimationUtils
.
loadAnimation
(
getActivity
(),
android
.
R
.
anim
.
fade_out
);
_controlBarLayout
.
startAnimation
(
bottomDown
);
_controlBarLayout
.
startAnimation
(
bottomDown
);
...
...
This diff is collapsed.
Click to expand it.
contrib/mobile/Android/src/org/geuz/onelab/mGLSurfaceView.java
+
3
−
4
View file @
e4371fac
...
@@ -3,7 +3,6 @@ package org.geuz.onelab;
...
@@ -3,7 +3,6 @@ package org.geuz.onelab;
import
android.content.Context
;
import
android.content.Context
;
import
android.graphics.Bitmap
;
import
android.graphics.Bitmap
;
import
android.opengl.GLSurfaceView
;
import
android.opengl.GLSurfaceView
;
import
android.support.v4.view.MotionEventCompat
;
import
android.view.GestureDetector
;
import
android.view.GestureDetector
;
import
android.view.MotionEvent
;
import
android.view.MotionEvent
;
import
android.view.ScaleGestureDetector
;
import
android.view.ScaleGestureDetector
;
...
@@ -47,10 +46,10 @@ class mGLSurfaceView extends GLSurfaceView {
...
@@ -47,10 +46,10 @@ class mGLSurfaceView extends GLSurfaceView {
if
(
event
.
getPointerCount
()
>=
3
){
if
(
event
.
getPointerCount
()
>=
3
){
scaleGesture
.
onTouchEvent
(
MotionEvent
.
obtain
(
0
,
0
,
MotionEvent
.
ACTION_CANCEL
,
0
,
0
,
0
));
scaleGesture
.
onTouchEvent
(
MotionEvent
.
obtain
(
0
,
0
,
MotionEvent
.
ACTION_CANCEL
,
0
,
0
,
0
));
final
float
x
=
MotionEventCompat
.
getX
(
event
,
1
);
final
float
x
=
event
.
getX
(
1
);
final
float
y
=
MotionEventCompat
.
getY
(
event
,
1
);
final
float
y
=
event
.
getY
(
1
);
int
action
=
MotionEventCompa
t
.
getActionMasked
(
event
);
int
action
=
even
t
.
getActionMasked
();
if
(
action
==
MotionEvent
.
ACTION_DOWN
||
action
==
MotionEvent
.
ACTION_POINTER_1_DOWN
){
if
(
action
==
MotionEvent
.
ACTION_DOWN
||
action
==
MotionEvent
.
ACTION_POINTER_1_DOWN
){
_renderer
.
startInteraction
(
x
,
y
);
_renderer
.
startInteraction
(
x
,
y
);
...
...
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