What is the role of android:largeHeap?
1. What is android:largeHeap used for?
android:largeHeap
Property used to specify whether the application requires larger heap memory. If your application requires larger heap memory, you can set this property totrue
. By default, this property is set tofalse
.
When an application requires larger heap memory, it can use Runtime.getRuntime().maxMemory()
the method to obtain the maximum heap memory. If android:largeHeap
the property is set to true
, maxMemory()
the method will return a larger value.
Here are android:largeHeap
examples of usage of the attribute:
<activity android:name=".MyActivity"
android:largeHeap="true" />
In the above example, MyActivity
the activity will use larger heap memory.