BTProgressHUD 2.1.0
See the version list below for details.
dotnet add package BTProgressHUD --version 2.1.0
NuGet\Install-Package BTProgressHUD -Version 2.1.0
<PackageReference Include="BTProgressHUD" Version="2.1.0" />
paket add BTProgressHUD --version 2.1.0
#r "nuget: BTProgressHUD, 2.1.0"
// Install BTProgressHUD as a Cake Addin #addin nuget:?package=BTProgressHUD&version=2.1.0 // Install BTProgressHUD as a Cake Tool #tool nuget:?package=BTProgressHUD&version=2.1.0
BTProgressHUD
This has been taken over by @Redth - please contact him for bug reports etc
Port to Xamarin.iOS of the SVProgressHUD.
SVProgressHUD (and BTProgressHUD) is a clean and easy-to-use HUD meant to display the progress of an ongoing task.
If you need this for Xamarin.Android, AndHUD is very similar component
Installation
Install the NuGet package BTProgressHUD
TODO
- The progress HUD is not Accessability-aware, which would be very good to add.
Usage
Have a look at the BTProgressHUDDemo project.
There are a few main static methods, however:
BTProgressHUD.Show(); //shows the spinner
BTProgressHUD.Show(status: "Oh hai"); //show spinner + text
BTProgressHUD.ShowSuccessWithStatus("Wow, that worked"); //A big TICK with text
BTProgressHUD.ShowErrorWithStatus("Fail!"); //A big CROSS with text
BTProgressHUD.ShowInfoWithStatus("Info!"); //A big I with text
BTProgressHUD.ShowToast("Hello from Toast"); //show an Android-style toast
All of these can be dismissed with
BTProgressHUD.Dismiss();
BTProgressHUD is aware of the thread you are calling from, and ensures that HUDs are always manipulated from the UI thread.
If you need to make your own instance of the HUD, you can make a new ProgressHUD.
Other Show options
You can call Show with the following parameters
- status: <string> - show status text
- progress: <float> - show a progress circle with 0.0 - 1.0 of progress. Call again to change the progress.
- maskType: <MaskType> - show with the background (the whole window) clear, black or gradient. Default is none, which allows interaction with the underlying elements.
- imageStyle: <ImageStyle> - the type of image is used in the dialog, default, outline and outline full
public enum MaskType
{
None = 1, // allow user interactions, don't dim background UI (default)
Clear, // disable user interactions, don't dim background UI
Black, // disable user interactions, dim background UI with 50% translucent black
Gradient // disable user interactions, dim background UI with translucent radial gradient (a-la-alertView)
}
public enum ImageStyle
{
Default, // icon without an outline
Outline, // icon with an outline
OutlineFull // icon with a full outline
}
ShowToast
The toast can be centered or at the top or bottom of the screen. This is controlled by the second parameter.
BTProgressHUD.ShowToast("foo", toastPosition: ToastPosition.Center);
ShowSuccess/ShowError/ShowInfo/ShowImage
This method dismisses the activity after 1 second. You can provide your own images if needed
BTProgressHUD.ShowSuccessWithStatus("Wow, that worked"); //A big TICK with text
BTProgressHUD.ShowErrorWithStatus("Fail!"); //A big CROSS with text
BTProgressHUD.ShowInfoWithStatus("Info!"); //A big I with text
BTProgressHUD.ShowImage(UIImage.FromFile(…), "Nice one Stu!");
You can use the timeout parameter of ShowImage to control the time before it's dismissed.
Customization
You can customize the appearance of the ProgressHUD through the ProgressHUDAppearance
class where you can controll the
following options:
- Corner Radius
- Background Color
- Image Tint Color
- Text Font
- Button Font
- Text Color
- Button Text Color
- Text Alignment
- Ring Radius
- Ring Stroke Thickness
- Ring Color
- Images and the various outlined/full versions for:
- Error
- Success
- Info
Credits
SVProgressHUD is brought to you by Sam Vermette and contributors to the project.
The success, error and info icons are from Human Interface Guidelines from Apple. If you have feature suggestions or bug reports, feel free to help out by sending pull requests or by creating new issues. If you're using SVProgressHUD in your project, attribution would be nice.
BTProgressHUD is brought to you by Nic Wise. I'm also happy to take bug reports and pull requests for the MonoTouch version. If you use BTProgressHUD in your project, attribution would also be nice - or tweet me a link to your project when it's live.
Thanks to
for the updates / fixes.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0-ios16.1 is compatible. net7.0-maccatalyst16.1 is compatible. net8.0-ios was computed. net8.0-ios17.2 is compatible. net8.0-maccatalyst was computed. net8.0-maccatalyst17.2 is compatible. |
-
net7.0-ios16.1
- No dependencies.
-
net7.0-maccatalyst16.1
- No dependencies.
-
net8.0-ios17.2
- No dependencies.
-
net8.0-maccatalyst17.2
- No dependencies.
NuGet packages (18)
Showing the top 5 NuGet packages that depend on BTProgressHUD:
Package | Downloads |
---|---|
Acr.UserDialogs
A cross platform library that allows you to call for standard user dialogs from a shared/portable library. Supports Android, iOS, and UWP |
|
Controls.UserDialogs.Maui
This is the updated version of Acr.Userdialogs. It supports latest version of .Net and you have an ability to style your dialogs as you want |
|
NControl.Mvvm
NControl.Mvvm is a small Mvvm library built to be used with the NControl.Controls library. |
|
Placeworkers.Forms
Custom Controls for Xamarin.Forms |
|
Xam.Plugin.Hud
Display HUD's dialog. |
GitHub repositories (9)
Showing the top 5 popular GitHub repositories that depend on BTProgressHUD:
Repository | Stars |
---|---|
CodeHubApp/CodeHub
CodeHub is an iOS application written using Xamarin
|
|
aritchie/userdialogs
A cross platform library that allows you to call for standard user dialogs from a core .net standard library, Actionsheets, alerts, confirmations, loading, login, progress, prompt, toast... async just for fun
|
|
microsoft/SmartHotel360-Mobile
SmartHotel360 Mobile
|
|
xamarin/Sport
|
|
microsoft/XamarinAzure_ShoppingDemoApp
Xamarin and Azure Better Together demo app team.
|
Version | Downloads | Last updated |
---|---|---|
2.1.1 | 25,565 | 6/26/2024 |
2.1.0 | 7,026 | 5/14/2024 |
2.0.1 | 172,549 | 9/13/2023 |
2.0.0 | 14,942 | 1/23/2023 |
1.5.0 | 229,405 | 6/24/2022 |
1.4.0 | 29,998 | 5/11/2022 |
1.3.5 | 533,335 | 11/4/2021 |
1.3.4 | 155,360 | 10/6/2021 |
1.3.3 | 37,146 | 6/17/2021 |
1.3.2 | 264,327 | 4/8/2020 |
1.3.1 | 1,447,186 | 1/15/2020 |
1.3.0 | 2,733 | 1/9/2020 |
1.2.0.6 | 1,356,420 | 10/11/2017 |
1.2.0.5 | 291,844 | 5/24/2017 |
1.2.0.3 | 113,437 | 5/19/2016 |
1.2.0.2 | 22,876 | 4/11/2016 |
1.0.0 | 19,576 | 4/18/2015 |