<span style="font-size:18px;">TextView memory = (TextView) findViewById(R.id.mymemory);
String s = "系统总内存:"+(Runtime.getRuntime().totalMemory())+"\n"+
"剩余内存:"+Runtime.getRuntime().freeMemory()+"\n"+
"已使用内存:"+(Runtime.getRuntime().totalMemory()-Runtime.getRuntime().freeMemory());
memory.setText(s);</span>
获取系统内存使用情况
最新推荐文章于 2022-04-03 17:26:17 发布