How can i put this in a textview?
ActivityManager activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
MemoryInfo memoryInfo = new ActivityManager.MemoryInfo();
activityManager.getMemoryInfo(memoryInfo);
memoryInfo.availMem;
the textview id is for example freemem. The textview is in a second tab of a swipeview.thans
Put this in your layout XML
and this in your activity:
memoryInfo.availMem is the available memory on the system. memoryInfo.totalMem is the total memory accessible by the kernel.
Here is a link to a good answer about memory availability.