Revision 82f42eeb
Added by Leszek Koltunski over 5 years ago
| src/main/java/org/distorted/main/RubikActivity.java | ||
|---|---|---|
| 94 | 94 |
@Override |
| 95 | 95 |
protected void onPause() |
| 96 | 96 |
{
|
| 97 |
super.onPause(); |
|
| 97 | 98 |
RubikSurfaceView view = findViewById(R.id.rubikSurfaceView); |
| 98 | 99 |
view.onPause(); |
| 99 | 100 |
DistortedLibrary.onPause(); |
| 100 | 101 |
RubikScoresDownloader.onPause(); |
| 101 | 102 |
savePreferences(); |
| 102 |
super.onPause(); |
|
| 103 | 103 |
} |
| 104 | 104 |
|
| 105 | 105 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| ... | ... | |
| 138 | 138 |
success = true; |
| 139 | 139 |
view.getPreRender().changeObject(obj,size); |
| 140 | 140 |
} |
| 141 |
|
|
| 142 | 141 |
} |
| 143 | 142 |
|
| 144 | 143 |
if( !success ) |
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!