获取最大运行内存
Runtime rt = Runtime.getRuntime();
long maxMemory = rt.maxMemory();
Log.i("maxMemory:", Long.toString(maxMemory / (1024 * 1024)));
使用最大内存
<!--android:largeHeap="true" 可以使用最大内存-->
<application
android:name=".app.MyApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:largeHeap="true"
>