

Create a new Android project in Eclipse using the library/ folder as the existing source. If you’re using Eclipse with the ADT plugin you can include RefreshActionItem as a library project. Or browse the source code of the sample application for a complete example of use. Finally, if you don't need 2.x compatibility and thus use the native action bar, there is another fork that you can use. If you use the new ActionBarCompat instead, you can use this fork. This library requires ActionBarSherlock, and is thus compatible with Android 2.x and newer. This tells the user that there is new data available. It is possible to add a small badge to the action item. The progress bar can also be made indeterminate, just like the built-in ProgressBar.

The progress bar shows a magnitude which represents how far the operation has proceeded. When the background operation ends, the button is restored to its initial state.If the button is clicked, a background operation begins and the button turns into a progress indicator.An action bar item that implements this common pattern:
