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/flag/FlagActivity.java
99 99
    @Override
100 100
    protected void onPause() 
101 101
      {
102
      GLSurfaceView mView = findViewById(R.id.flagSurfaceView);
103
      mView.onPause();
104

  
105
      DistortedLibrary.onPause();
106 102
      super.onPause();
103
      GLSurfaceView view = findViewById(R.id.flagSurfaceView);
104
      view.onPause();
105
      DistortedLibrary.onPause();
107 106
      }
108 107

  
109 108
///////////////////////////////////////////////////////////////////////////////////////////////////
......
112 111
    protected void onResume() 
113 112
      {
114 113
      super.onResume();
115

  
116
      GLSurfaceView mView = findViewById(R.id.flagSurfaceView);
117
      mView.onResume();
114
      GLSurfaceView view = findViewById(R.id.flagSurfaceView);
115
      view.onResume();
118 116
      }
119 117
    
120 118
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff