Reputation: 1469
Is it possible to preserve an existing RenderScript instance (and all bound memory) during a screen rotation? If so, how might I go about doing this? From what I understand, it is not necessary to change anything other than projection data, however, in order to ensure that the RenderScript engine is shut down when the application is quit, I need to destroy it in the onDestroy() callback. Is there any other way to do this so that I can persist this through a rotation? For example, through the saved Bundle?
Upvotes: 0
Views: 152
Reputation: 3433
Have you tried adding the configChanges->orientation tag to your AndroidManifest.xml
?
It preserves some instances on rotate
<activity android:name="YourActivity" android:configChanges="orientation"/>
Upvotes: 1