Android - Loading Spinner Tutorial
You can show progress of a task in android through loading progress bar. The progress bar comes in two shapes. Loading bar and Loading Spinner. In this chapter we will discuss spinner. Spinner is used to display progress of those tasks whose total time of completion is unknown. In order to use that, you just need to define it in the xml like this. <ProgressBar android:id = "@+id/progressBar1" style = " ? android : attr / progressBarStyleLarge " android:layout_width = "wrap_content" android:layout_height = "wrap_content" android:layout_centerHorizontal = "true" /> After defining it in xml, you have to get its reference in java file through ProgressBar class. Its syntax is given below − private ProgressBar spinner ; spinner = ( ProgressBar ) findViewById ( R . id . progressBar1 ); After that you can make its disappear , and bring it back when needed through setVisibility Method. Its syntax is given...