Revision c0f27889
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/examples/check/CheckActivity.java | ||
---|---|---|
76 | 76 |
@Override |
77 | 77 |
protected void onPause() |
78 | 78 |
{ |
79 |
GLSurfaceView mView = findViewById(R.id.checkSurfaceView); |
|
80 |
if( mView!=null ) mView.onPause(); |
|
81 |
|
|
82 |
DistortedLibrary.onPause(); |
|
83 | 79 |
super.onPause(); |
80 |
GLSurfaceView view = findViewById(R.id.checkSurfaceView); |
|
81 |
if( view!=null ) view.onPause(); |
|
82 |
DistortedLibrary.onPause(); |
|
84 | 83 |
} |
85 | 84 |
|
86 | 85 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
89 | 88 |
protected void onResume() |
90 | 89 |
{ |
91 | 90 |
super.onResume(); |
92 |
|
|
93 |
GLSurfaceView mView = findViewById(R.id.checkSurfaceView); |
|
94 |
if( mView!=null ) mView.onResume(); |
|
91 |
GLSurfaceView view = findViewById(R.id.checkSurfaceView); |
|
92 |
if( view!=null ) view.onResume(); |
|
95 | 93 |
} |
96 | 94 |
|
97 | 95 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
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!