Lines Matching defs:progress

59  * Visual indicator of progress in some operation.  Displays a bar to the user
61 * change the amount of progress (modifying the length of the bar) as it moves
62 * forward. There is also a secondary progress displayable on a progress bar
63 * which is useful for displaying intermediate progress, such as the buffer
64 * level during a streaming playback progress bar.
68 * A progress bar can also be made indeterminate. In indeterminate mode, the
69 * progress bar shows a cyclic animation without an indication of progress. This mode is used by
70 * applications when the length of the task is unknown. The indeterminate progress bar can be either
74 * <p>The following code example shows how a progress bar can be used from
75 * a worker thread to update the user interface to notify the user of progress:
100 * // Update the progress bar
112 * <p>To add a progress bar to a layout file, you can use the {@code &lt;ProgressBar&gt;} element.
113 * By default, the progress bar is a spinning wheel (an indeterminate indicator). To change to a
114 * horizontal progress bar, apply the {@link android.R.style#Widget_ProgressBar_Horizontal
122 * <p>If you will use the progress bar to show real progress, you must use the horizontal bar. You
123 * can then increment the progress with {@link #incrementProgressBy incrementProgressBy()} or
124 * {@link #setProgress setProgress()}. By default, the progress bar is full when it reaches 100. If
129 * <p>Another common style to apply to the progress bar is {@link
132 * For example, you can insert this kind of progress bar into your default layout for
134 * appears immediately and when your application receives the content, it replaces the progress bar
152 * <p>Other progress bar styles provided by the system include:</p>
227 * Create a new progress bar with range 0...100 and initial progress of 0.
321 (id == R.id.progress || id == R.id.secondaryProgress));
390 * Initialize the progress bar's default values:
393 * <li>progress = 0</li>
415 * <p>Indicate whether this progress bar is in indeterminate mode.</p>
417 * @return true if the progress bar is in indeterminate mode
419 @ViewDebug.ExportedProperty(category = "progress")
425 * <p>Change the indeterminate mode for this progress bar. In indeterminate
426 * mode, the progress is ignored and the progress bar shows an infinite
429 * If this progress bar's style only supports indeterminate mode (such as the circular
430 * progress bars), then this will be ignored.
451 * <p>Get the drawable used to draw the progress bar in
464 * <p>Define the drawable used to draw the progress bar in
484 * <p>Get the drawable used to draw the progress bar in
485 * progress mode.</p>
497 * <p>Define the drawable used to draw the progress bar in
498 * progress mode.</p>
533 doRefreshProgress(R.id.progress, mProgress, false, false);
539 * @return The drawable currently used to draw the progress bar
571 RefreshProgressRunnable(int id, int progress, boolean fromUser) {
573 mProgress = progress;
583 public void setup(int id, int progress, boolean fromUser) {
585 mProgress = progress;
591 private synchronized void doRefreshProgress(int id, int progress, boolean fromUser,
593 float scale = mMax > 0 ? (float) progress / (float) mMax : 0;
608 if (callBackToApp && id == R.id.progress) {
619 private synchronized void refreshProgress(int id, int progress, boolean fromUser) {
621 doRefreshProgress(id, progress, fromUser, true);
629 r.setup(id, progress, fromUser);
632 r = new RefreshProgressRunnable(id, progress, fromUser);
639 * <p>Set the current progress to the specified value. Does not do anything
640 * if the progress bar is in indeterminate mode.</p>
642 * @param progress the new progress, between 0 and {@link #getMax()}
650 public synchronized void setProgress(int progress) {
651 setProgress(progress, false);
655 synchronized void setProgress(int progress, boolean fromUser) {
660 if (progress < 0) {
661 progress = 0;
664 if (progress > mMax) {
665 progress = mMax;
668 if (progress != mProgress) {
669 mProgress = progress;
670 refreshProgress(R.id.progress, mProgress, fromUser);
676 * Set the current secondary progress to the specified value. Does not do
677 * anything if the progress bar is in indeterminate mode.
680 * @param secondaryProgress the new secondary progress, between 0 and {@link #getMax()}
707 * <p>Get the progress bar's current level of progress. Return 0 when the
708 * progress bar is in indeterminate mode.</p>
710 * @return the current progress, between 0 and {@link #getMax()}
718 @ViewDebug.ExportedProperty(category = "progress")
724 * <p>Get the progress bar's current level of secondary progress. Return 0 when the
725 * progress bar is in indeterminate mode.</p>
727 * @return the current secondary progress, between 0 and {@link #getMax()}
735 @ViewDebug.ExportedProperty(category = "progress")
741 * <p>Return the upper limit of this progress bar's range.</p>
749 @ViewDebug.ExportedProperty(category = "progress")
755 * <p>Set the range of the progress bar to 0...<tt>max</tt>.</p>
757 * @param max the upper range of this progress bar
775 refreshProgress(R.id.progress, mProgress, false);
780 * <p>Increase the progress bar's progress by the specified amount.</p>
782 * @param diff the amount by which the progress must be increased
791 * <p>Increase the progress bar's secondary progress by the specified amount.</p>
793 * @param diff the amount by which the secondary progress must be increased
802 * <p>Start the indeterminate progress animation.</p>
829 * <p>Stop the indeterminate progress animation.</p>
976 // Translate canvas so a indeterminate circular progress bar with padding
1041 int progress;
1056 progress = in.readInt();
1063 out.writeInt(progress);
1085 ss.progress = mProgress;
1096 setProgress(ss.progress);
1136 * system resources while the progress changes quickly.