Revision c0f27889
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/examples/movingeffects/MovingEffectsActivity.java | ||
---|---|---|
70 | 70 |
/////////////////////////////////////////////////////////////////// |
71 | 71 |
|
72 | 72 |
@Override |
73 |
protected void onResume()
|
|
73 |
protected void onPause()
|
|
74 | 74 |
{ |
75 |
super.onResume(); |
|
76 |
|
|
75 |
Abort(null); |
|
76 |
|
|
77 |
super.onPause(); |
|
77 | 78 |
GLSurfaceView view = findViewById(R.id.movingeffectsSurfaceView); |
78 |
view.onResume(); |
|
79 |
view.onPause(); |
|
80 |
DistortedLibrary.onPause(); |
|
79 | 81 |
} |
80 | 82 |
|
81 | 83 |
/////////////////////////////////////////////////////////////////// |
82 | 84 |
|
83 | 85 |
@Override |
84 |
protected void onPause()
|
|
86 |
protected void onResume()
|
|
85 | 87 |
{ |
86 |
Abort(null); |
|
87 |
|
|
88 |
super.onResume(); |
|
88 | 89 |
GLSurfaceView view = findViewById(R.id.movingeffectsSurfaceView); |
89 |
view.onPause(); |
|
90 |
|
|
91 |
DistortedLibrary.onPause(); |
|
92 |
super.onPause(); |
|
90 |
view.onResume(); |
|
93 | 91 |
} |
94 |
|
|
92 |
|
|
95 | 93 |
/////////////////////////////////////////////////////////////////// |
96 | 94 |
|
97 | 95 |
@Override |
Also available in: Unified diff
We need to pause an Activity in the following way:
1) Activity.onPause()
2) View.onPause()
3) Library.onPause()
otherwise sometimes there are artifacts when pausing!