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/meshfile/MeshFileActivity.java
69 69
    @Override
70 70
    protected void onPause() 
71 71
      {
72
      GLSurfaceView view = this.findViewById(R.id.meshfileSurfaceView);
72
      super.onPause();
73
      GLSurfaceView view = findViewById(R.id.meshfileSurfaceView);
73 74
      view.onPause();
74 75
      DistortedLibrary.onPause();
75
      super.onPause();
76 76
      }
77 77

  
78 78
///////////////////////////////////////////////////////////////////////////////////////////////////
......
81 81
    protected void onResume() 
82 82
      {
83 83
      super.onResume();
84
      GLSurfaceView view = this.findViewById(R.id.meshfileSurfaceView);
84
      GLSurfaceView view = findViewById(R.id.meshfileSurfaceView);
85 85
      view.onResume();
86 86

  
87 87
      if( mResource!=0 ) Open(null);

Also available in: Unified diff