com.android.repository.api
Interface ProgressIndicator

All Known Implementing Classes:
ConsoleProgressIndicator, FakeProgressIndicator, ProgressIndicatorAdapter

public interface ProgressIndicator

A progress indicator and logger. Progress is from 0-1, or indeterminate.


Method Summary
 void cancel()
          Try to cancel this operation.
 double getFraction()
           
 boolean isCanceled()
           
 boolean isCancellable()
           
 boolean isIndeterminate()
           
 void logError(java.lang.String s)
          Logs an error.
 void logError(java.lang.String s, java.lang.Throwable e)
          Logs an error, including a stacktrace.
 void logInfo(java.lang.String s)
          Logs an info message.
 void logWarning(java.lang.String s)
          Logs a warning.
 void logWarning(java.lang.String s, java.lang.Throwable e)
          Logs a warning, including a stacktrace.
 void setCancellable(boolean cancellable)
          Sets whether the user should be able to cancel this operation.
 void setFraction(double v)
          Sets how much progress should be shown on the progress bar, between 0 and 1.
 void setIndeterminate(boolean indeterminate)
          Sets whether this progress indicator should show indeterminate progress.
 void setSecondaryText(java.lang.String s)
          Sets the secondary text on the progress indicator.
 void setText(java.lang.String s)
          Sets the main text shown in the progress indicator.
 

Method Detail

setText

void setText(@Nullable
             java.lang.String s)
Sets the main text shown in the progress indicator.


isCanceled

boolean isCanceled()
Returns:
True if the user has canceled this operation.

cancel

void cancel()
Try to cancel this operation.


setCancellable

void setCancellable(boolean cancellable)
Sets whether the user should be able to cancel this operation.


isCancellable

boolean isCancellable()
Returns:
true if the user should be able to cancel this operation.

setIndeterminate

void setIndeterminate(boolean indeterminate)
Sets whether this progress indicator should show indeterminate progress.


isIndeterminate

boolean isIndeterminate()
Returns:
true if this progress indicator is set to show indeterminate progress.

setFraction

void setFraction(double v)
Sets how much progress should be shown on the progress bar, between 0 and 1.


getFraction

double getFraction()
Returns:
The current amount of progress shown on the progress bar, between 0 and 1.

setSecondaryText

void setSecondaryText(@Nullable
                      java.lang.String s)
Sets the secondary text on the progress indicator.


logWarning

void logWarning(@NonNull
                java.lang.String s)
Logs a warning.


logWarning

void logWarning(@NonNull
                java.lang.String s,
                @Nullable
                java.lang.Throwable e)
Logs a warning, including a stacktrace.


logError

void logError(@NonNull
              java.lang.String s)
Logs an error.


logError

void logError(@NonNull
              java.lang.String s,
              @Nullable
              java.lang.Throwable e)
Logs an error, including a stacktrace.


logInfo

void logInfo(@NonNull
             java.lang.String s)
Logs an info message.