How to get size of the app data in Android

Here is few lines how to get size of directory in Android. To get size of directory you need sum sizes of all files in this directory and subdirectories. So, we need recursion.

Where :

Short sample project here on my github:

ProgressArcView implementation for Android

Would you like the same progress View? Here is source code for simple viewsion without customisation from XML.

And here is ProgressArcView usage. I’ve implemented delay for click action using this view. Case: Click action will activated it user hold round button during 10 seconds.

Source code:

How to Dynamically or Programmatically Add Menu Items for an Android Activity

Sometimes you don’t need huge menu. And int is’t super important create XML file for it. You can just create your menu from code. It is very simple. You need override

method. Let’s see the example below:

Here is you have created two menu items “Edit” and “Delete”. Read more…

Launch Battery Historian 2.1 on Mac

Android have great tool for tracking battery drain. It is Battery Historian. Here is simple steps how to get it on your Mac: Install Docker Run the next commands in Terminal

Open your http://localhost:9999 You will have Battery Historian ready for use: