Revision c0f27889
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/examples/predeform/PredeformActivity2.java | ||
---|---|---|
54 | 54 |
@Override |
55 | 55 |
protected void onPause() |
56 | 56 |
{ |
57 |
GLSurfaceView mView = findViewById(R.id.predeformSurfaceView); |
|
58 |
if( mView!=null ) mView.onPause(); |
|
59 |
|
|
60 |
DistortedLibrary.onPause(); |
|
61 | 57 |
super.onPause(); |
58 |
GLSurfaceView view = findViewById(R.id.predeformSurfaceView); |
|
59 |
view.onPause(); |
|
60 |
DistortedLibrary.onPause(); |
|
62 | 61 |
} |
63 | 62 |
|
64 | 63 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
67 | 66 |
protected void onResume() |
68 | 67 |
{ |
69 | 68 |
super.onResume(); |
70 |
|
|
71 |
GLSurfaceView mView = findViewById(R.id.predeformSurfaceView); |
|
72 |
if( mView!=null ) mView.onResume(); |
|
69 |
GLSurfaceView view = findViewById(R.id.predeformSurfaceView); |
|
70 |
view.onResume(); |
|
73 | 71 |
} |
74 | 72 |
|
75 | 73 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
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!