Revision c0f27889
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/examples/singlemesh/SingleMeshActivity.java | ||
---|---|---|
44 | 44 |
@Override |
45 | 45 |
protected void onPause() |
46 | 46 |
{ |
47 |
GLSurfaceView view = this.findViewById(R.id.singlemeshSurfaceView); |
|
47 |
super.onPause(); |
|
48 |
GLSurfaceView view = findViewById(R.id.singlemeshSurfaceView); |
|
48 | 49 |
view.onPause(); |
49 | 50 |
DistortedLibrary.onPause(); |
50 |
super.onPause(); |
|
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
56 | 56 |
protected void onResume() |
57 | 57 |
{ |
58 | 58 |
super.onResume(); |
59 |
GLSurfaceView view = this.findViewById(R.id.singlemeshSurfaceView);
|
|
59 |
GLSurfaceView view = findViewById(R.id.singlemeshSurfaceView); |
|
60 | 60 |
view.onResume(); |
61 | 61 |
} |
62 | 62 |
|
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!