Project

General

Profile

« Previous | Next » 

Revision c0f27889

Added by Leszek Koltunski almost 4 years ago

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!

View differences:

src/main/java/org/distorted/examples/stencil/StencilActivity.java
51 51
    @Override
52 52
    protected void onPause() 
53 53
      {
54
      super.onPause();
54 55
      StencilSurfaceView view = findViewById(R.id.stencilSurfaceView);
55

  
56 56
      view.onPause();
57 57
      DistortedLibrary.onPause();
58
      super.onPause();
59 58
      }
60 59

  
61 60
///////////////////////////////////////////////////////////////////////////////////////////////////
......
63 62
    @Override
64 63
    protected void onResume() 
65 64
      {
66
      StencilSurfaceView view = findViewById(R.id.stencilSurfaceView);
67

  
68 65
      super.onResume();
66
      StencilSurfaceView view = findViewById(R.id.stencilSurfaceView);
69 67
      view.onResume();
70 68
      }
71 69
    

Also available in: Unified diff