public class KProgressHUD
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
KProgressHUD.Style |
Constructor and Description |
---|
KProgressHUD(android.content.Context context) |
Modifier and Type | Method and Description |
---|---|
static KProgressHUD |
create(android.content.Context context)
Create a new HUD.
|
static KProgressHUD |
create(android.content.Context context,
KProgressHUD.Style style)
Create a new HUD.
|
void |
dismiss() |
boolean |
isShowing() |
KProgressHUD |
setAnimationSpeed(int scale)
Change animation speed relative to default.
|
KProgressHUD |
setAutoDismiss(boolean isAutoDismiss)
Specify whether this HUD closes itself if progress reaches max.
|
KProgressHUD |
setBackgroundColor(int color)
Specify the HUD background color
|
KProgressHUD |
setCancellable(boolean isCancellable)
Specify whether this HUD can be cancelled by using back button (default is false)
|
KProgressHUD |
setCornerRadius(float radius)
Specify corner radius of the HUD (default is 10)
|
KProgressHUD |
setCustomView(android.view.View view)
Provide a custom view to be displayed.
|
KProgressHUD |
setDetailsLabel(java.lang.String detailsLabel)
Optional detail description to be displayed on the HUD
|
KProgressHUD |
setDetailsLabel(java.lang.String detailsLabel,
int color)
Optional detail description to be displayed
|
KProgressHUD |
setDimAmount(float dimAmount)
Specify the dim area around the HUD, like in Dialog
|
KProgressHUD |
setGraceTime(int graceTimeMs)
Grace period is the time (in milliseconds) that the invoked method may be run without
showing the HUD.
|
KProgressHUD |
setLabel(java.lang.String label)
Optional label to be displayed.
|
KProgressHUD |
setLabel(java.lang.String label,
int color)
Optional label to be displayed
|
KProgressHUD |
setMaxProgress(int maxProgress)
Max value for use in one of the determinate styles
|
void |
setProgress(int progress)
Set current progress.
|
KProgressHUD |
setSize(int width,
int height)
Set HUD size.
|
KProgressHUD |
setStyle(KProgressHUD.Style style)
Specify the HUD style (not needed if you use a custom view)
|
KProgressHUD |
setWindowColor(int color)
Deprecated.
As of release 1.1.0, replaced by
setBackgroundColor(int) |
KProgressHUD |
show() |
public static KProgressHUD create(android.content.Context context)
context
- Activity context that the HUD bound topublic static KProgressHUD create(android.content.Context context, KProgressHUD.Style style)
KProgressHUD.create(Context context)
).context
- Activity context that the HUD bound tostyle
- One of the KProgressHUD.Style valuespublic KProgressHUD setStyle(KProgressHUD.Style style)
style
- One of the KProgressHUD.Style valuespublic KProgressHUD setDimAmount(float dimAmount)
dimAmount
- May take value from 0 to 1. Default to 0 (no dimming)public KProgressHUD setSize(int width, int height)
width
- in dpheight
- in dp@Deprecated public KProgressHUD setWindowColor(int color)
setBackgroundColor(int)
color
- ARGB colorpublic KProgressHUD setBackgroundColor(int color)
color
- ARGB colorpublic KProgressHUD setCornerRadius(float radius)
radius
- Corner radius in dppublic KProgressHUD setAnimationSpeed(int scale)
scale
- Default is 1. If you want double the speed, set the param at 2.public KProgressHUD setLabel(java.lang.String label)
public KProgressHUD setLabel(java.lang.String label, int color)
public KProgressHUD setDetailsLabel(java.lang.String detailsLabel)
public KProgressHUD setDetailsLabel(java.lang.String detailsLabel, int color)
public KProgressHUD setMaxProgress(int maxProgress)
public void setProgress(int progress)
public KProgressHUD setCustomView(android.view.View view)
view
- Must not be nullpublic KProgressHUD setCancellable(boolean isCancellable)
public KProgressHUD setAutoDismiss(boolean isAutoDismiss)
public KProgressHUD setGraceTime(int graceTimeMs)
graceTimeMs
- Grace time in millisecondspublic KProgressHUD show()
public boolean isShowing()
public void dismiss()