Inside the folder res/drawable create an xml named “progress_indeterminate_horizontal.xml” and copy this code into it
Now the layout file containing the progressBar.I named it main.xml
See the line
where I have added the xml as drawable.
Done. Now goon and run the project. Nothing needs to be done in the java code. Enjoy.
Please leave your valuable comments if you find this post useful.
Here is another one for creating custom progressbars.