As amfcosta mentioned here:
This code works.
But I don't know what "getIndeterminateDrawable()" for. because without this line the code still works.
One more color can be changed is the background color:
Above picture shows the color set by "getProgressDrawable().setColorFilter()"
The green color shows on the above picture is the background color.