We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13355e7 commit 7cc0c37Copy full SHA for 7cc0c37
app/src/main/java/net/opencurlybraces/android/projects/androidpractices/MainActivity.java
@@ -1,5 +1,6 @@
1
package net.opencurlybraces.android.projects.androidpractices;
2
3
+import android.content.ComponentCallbacks2;
4
import android.support.v7.app.ActionBarActivity;
5
import android.os.Bundle;
6
import android.view.Menu;
@@ -36,4 +37,15 @@ public boolean onOptionsItemSelected(MenuItem item) {
36
37
38
return super.onOptionsItemSelected(item);
39
}
40
+
41
+ @Override
42
+ public void onTrimMemory(int level) {
43
+ super.onTrimMemory(level);
44
45
+ // release your UI resources when you receive onTrimMemory(TRIM_MEMORY_UI_HIDDEN).
46
47
+ if (level == ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN) {
48
+ //release UI Resources here
49
+ }
50
51
0 commit comments