Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e11e020 authored by Sally's avatar Sally Committed by Sally Yuen
Browse files

Add docs in ProgressBar to suggest a11y min durations

setMinDurationBetweenContentChanges was introduced in Android 34.
ProgressBars, which frequently emit state changes due to its incrementing state, are examples of where this API can be used to prevent disruptive notifications.

Bug: 332393061
Test: na (docs)
Change-Id: Ia1b22137d3078211d23d56872af36ad20d0ce19d
parent 976207c4
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -69,6 +69,7 @@ import android.widget.RemoteViews.RemoteView;
import com.android.internal.R;
import com.android.internal.R;


import java.text.NumberFormat;
import java.text.NumberFormat;
import java.time.Duration;
import java.util.ArrayList;
import java.util.ArrayList;
import java.util.Locale;
import java.util.Locale;


@@ -139,6 +140,14 @@ import java.util.Locale;
 * <p>The "inverse" styles provide an inverse color scheme for the spinner, which may be necessary
 * <p>The "inverse" styles provide an inverse color scheme for the spinner, which may be necessary
 * if your application uses a light colored theme (a white background).</p>
 * if your application uses a light colored theme (a white background).</p>
 *
 *
 * <h4>Accessibility</h4>
 * <p>
 * Consider using
 * {@link AccessibilityNodeInfo#setMinDurationBetweenContentChanges(Duration)} to
 * convey to accessibility services that changes can be throttled. This may reduce the
 * frequency of potentially disruptive notifications.
 * </p>
 *
 * <p><strong>XML attributes</b></strong>
 * <p><strong>XML attributes</b></strong>
 * <p>
 * <p>
 * See {@link android.R.styleable#ProgressBar ProgressBar Attributes},
 * See {@link android.R.styleable#ProgressBar ProgressBar Attributes},