Revision c0f27889
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/examples/projection/ProjectionActivity.java | ||
---|---|---|
69 | 69 |
@Override |
70 | 70 |
protected void onPause() |
71 | 71 |
{ |
72 |
GLSurfaceView mView = findViewById(R.id.surfaceViewProjection); |
|
73 |
mView.onPause(); |
|
74 |
|
|
75 |
DistortedLibrary.onPause(); |
|
76 | 72 |
super.onPause(); |
73 |
GLSurfaceView view = findViewById(R.id.surfaceViewProjection); |
|
74 |
view.onPause(); |
|
75 |
DistortedLibrary.onPause(); |
|
77 | 76 |
} |
78 | 77 |
|
79 | 78 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
82 | 81 |
protected void onResume() |
83 | 82 |
{ |
84 | 83 |
super.onResume(); |
85 |
|
|
86 |
GLSurfaceView mView = findViewById(R.id.surfaceViewProjection); |
|
87 |
mView.onResume(); |
|
84 |
GLSurfaceView view = findViewById(R.id.surfaceViewProjection); |
|
85 |
view.onResume(); |
|
88 | 86 |
} |
89 | 87 |
|
90 | 88 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
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!