RefreshActionItem alternatives and similar packages
Based on the "Progressbar/Progress View Widget" category.
Alternatively, view RefreshActionItem alternatives based on common mentions on social networks and blogs.
-
NumberProgressBar
A beautiful, slim Android ProgressBar. -
SmoothProgressBar
A small Android library allowing you to have a smooth and customizable horizontal or circular indeterminate ProgressBar -
CircleProgress
CircleProgress, DonutProgress, ArcProgress -
LoadingDrawable
Some beautiful android loading drawable, can be combined with any view as the LoadingView or the ProgressBar. Besides, some Drawable can customize the loading progress too. -
ProgressWheel
A progress wheel for android, intended for use instead of the standard progress bar. -
Android-RoundCornerProgressBar
[Android] Round Corner Progress Bar Library for Android -
AndroidFillableLoaders
Completely customizable progress based loaders drawn using custom CGPaths written in Swift -
KProgressHUD
An implement of ProgressHUD for Android, similar to MBProgressHUD, SVProgressHUD for iOS. -
android-square-progressbar
An android library to display a progressbar that goes around an image. -
GoogleProgressBar
Android library to display progress like google does in some of his services. -
android-HoloCircularProgressBar
Holo Circular ProgressBar -
CircleProgressBar
A circular android ProgressBar library which extends View, and the usage same as ProgressBar, It has solid,line and solid_line three styles. Besides, progress value can be freely customized. -
AnimatedCircleLoadingView
An animated circle loading view -
ArcProgressStackView
Present your progress bars in arc mode with information and total control. -
MaterialLoadingProgressBar
MaterialLoadingProgressBar provide a styled ProgressBar which looks like SwipeRefreshLayout's loading indicator(support-v4 v21+) -
DownloadProgressBar
DownloadProgressBar is an android library that delivers awesome custom progress bar. You can manipulate it's state in every way. -
ColorArcProgressBar
This is beautiful color arc progress bar. -
Loading Progress
A highly configurable library to do loading progress with animated balls -
Dilating Dots Progress Bar
A customizable indeterminate progress bar -
InfiniteIndicator
This lib can be used for viewpager infinite loop with indicator easily. -
ProgressPieView
Android library for showing progress in a highly customizable pie. -
ColoringLoading
This project provide Coloring Loading View for Android. And this project is not using the image file! -
Percentage Chart View
An Android percentage chart that displays the progress of any single given task or information. -
WheelIndicatorView
A 'Google Fit' like activity indicator for Android -
MaskProgressView
Yet another android custom progress view for your music player -
State Views for Android
Create & Show progress, data or error views, the easy way! -
circular-slider-android
Circular Slider UI Control for Android -
ACProgressLite
Android loading or progress dialog widget library, provide efficient way to implement iOS like loading dialog and progress wheel -
SlidingSquaresLoader
A simple progress loader inspired by Can you Code this UI? Volume 6! - https://stories.uplabs.com/can-you-code-this-ui-volume-6-7bd09fa6dd92#.nyh2zhpvb -
MultiProgressBar
Open source android library for different progress bar designs -
DelayedProgress
ProgressDialog that waits a minimum time to be dismissed before showing. Once visible, the ProgressDialog will be visible for a minimum amount of time to avoid "flashes" in the UI. -
NumberPicker
A simple customizable NumberPicker plugin for Android -
StackedHorizontalProgressBar
:barber: [Android Library] Stacked dual progress indicator progress-bar -
TinglingSquares
⏳ A delightful progress animation that you'll fall in ❤️️ with, very easily. -
ArcPointer
Arc pointer - simple customized progress bar in the form of an arch -
CoolProgressViews
Android library with collection of cool progress views. -
MusicBar
view visualize progress bar for sound file like sound cloud -
FillProgressLayout
A simple and flexible Fillable Progress Layout written in Kotlin -
ProgressDialog Library
A ProgressDialog Library for Android API 24+ apps provided by Techiness Overloaded (Developer name : Arunprasadh C). Quite Useful for showing progress during any operation. Has support for both Determinate and Indeterminate ProgressBar, Dark Theme, and NegativeButton. -
ProgressRingView
A simple lib to create a ring-like progress view with corner edges -
N-SidedProgressBar
Progress Bar in the shape of regular polygon.
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of RefreshActionItem or a related project?
README
RefreshActionItem
An action bar item that implements this common pattern:
- Initially it shows a refresh button.
- If the button is clicked, a background operation begins and the button turns into a progress indicator.
- When the background operation ends, the button is restored to its initial state.
The progress bar shows a magnitude which represents how far the operation has proceeded. The progress bar can also be made indeterminate, just like the built-in ProgressBar.
It is possible to add a small badge to the action item. This tells the user that there is new data available.
This library requires ActionBarSherlock, and is thus compatible with Android 2.x and newer. If you use the new ActionBarCompat instead, you can use this fork. Finally, if you don't need 2.x compatibility and thus use the native action bar, there is another fork that you can use.
Try out the sample application:
Or browse the source code of the sample application for a complete example of use.
Including in your project
If you’re using Eclipse with the ADT plugin you can include RefreshActionItem as a library project. Create a new Android project in Eclipse using the library/ folder as the existing source. Then, open the properties of this new project and, in the 'Android' category, add a reference to the ActionBarSherlock library project. Finally, in your application project properties, add a reference to the created library project.
If you use maven to build your Android project you can simply add a dependency for this library.
<dependency>
<groupId>com.github.manuelpeinado.refreshactionitem</groupId>
<artifactId>library</artifactId>
<version>1.0.3</version>
<type>apklib</type>
</dependency>
Usage
Add an element for the refresh action to your XML menu:
<item
android:id="@+id/refresh_button"
android:actionViewClass=
"com.manuelpeinado.refreshactionitem.RefreshActionItem"
android:showAsAction="always"
android:title="@string/action_refresh"/>
Then, configure the action in the onCreateOptionsMenu method of your SherlockActivity-derived activity:
@Override public boolean onCreateOptionsMenu(Menu menu) {
getSupportMenuInflater().inflate(R.menu.main, menu);
MenuItem item = menu.findItem(R.id.refresh_button);
mRefreshActionItem = (RefreshActionItem) item.getActionView();
mRefreshActionItem.setMenuItem(item);
mRefreshActionItem.setMax(100);
mRefreshActionItem.setRefreshActionListener(this);
return true;
}
The setRefreshActionListener method registers a callback that will be invoked when the refresh button is clicked. Start your background process from this callback and invoke showProgress(true) on the action item so that it turns into a progress indicator:
@Override
public void onRefreshButtonClick(RefreshActionItem sender) {
mRefreshActionItem.showProgress(true);
startBackgroundTask();
}
From your background task, call the action item's setProgress(int) method each time some progress is made:
mRefreshActionItem.setProgress(progress);
Finally, when the background task is complete restore the action item to its original state:
mRefreshActionItem.showProgress(false);
Progress indicator types
By default the action item shows the amount of progress using a wheel. There is an additional style, "pie", which you can activate by calling setProgressIndicatorType(ProgressIndicatorType.PIE) on your action item.
Also, if the progress of your background task cannot be easily measured you might prefer to use an indeterminate progress indicator. To achieve this just pass ProgressIndicatorType.INDETERMINATE to setProgressIndicatorType().
Badges
Sometimes it is useful to give the user a visual hint suggesting that there is new data to be loaded. You can easily achieve this by adding a badge to your action item:
mRefreshActionItem.showBadge();
The badge shows an exclamation mark by default, but you can specify an alternative text if you desire.
Customization
You can easily customize the appearance of your RefreshActionItems. Just define a refreshActionItemStyle attribute in your theme and make it reference a custom style where you specify new values for any of the multiple attributes recognized by the library.
The following snippet is extracted from the accompanying sample application. To see it in action open the "Styling" demo in the main menu.
<style name="AppTheme" parent="Theme.Sherlock.Light">
<item name="refreshActionItemStyle">@style/CustomRefreshActionItem</item>
</style>
<style name="CustomRefreshActionItem" parent="Widget.RefreshActionItem.Light">
<item name="progressIndicatorType">pie</item>
<item name="badgeBackgroundColor">#A4F4</item>
<item name="badgeTextStyle">@style/BadgeText</item>
<item name="badgePosition">bottomLeft</item>
</style>
<style name="BadgeText">
<item name="android:textSize">14dp</item>
<item name="android:textColor">#7000</item>
</style>
Libraries used
- ActionBarSherlock by Jake Wharton.
- android-viewbadger by Jeff Gilfelt.
Credits
- Thanks to Fede Fernández for adapting the library to use ActionBarCompat.
- Cake launcher icon by IconEden.
Who's using it
- The New York Times. Experience the world’s finest journalism with The New York Times app for Android.
- DevAppsDirect. Developer Apps Direct is a large and growing collection of library demos.
- Signos Fodas. With this app you can follow all horoscope signs, updated daily in real time on your Android (Portuguese only).
Does your app use RefreshActionItem? If you want to be featured on this list drop me a line.
Developed By
Manuel Peinado Gallego - [email protected]
License
Copyright 2013 Manuel Peinado
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*Note that all licence references and agreements mentioned in the RefreshActionItem README section above
are relevant to that project's source code only.