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