@@ -3479,15 +3479,15 @@ private void updateLabels() {
34793479 break ;
34803480 case LABEL_VISIBLE :
34813481 if (isEnabled () && isSliderVisibleOnScreen ()) {
3482- ensureLabelsAdded ();
3482+ ensureLabelsAdded (/* showLabelOnAllThumbs= */ true );
34833483 } else {
34843484 ensureLabelsRemoved ();
34853485 }
34863486 break ;
34873487 case LABEL_FLOATING :
34883488 case LABEL_WITHIN_BOUNDS :
34893489 if (activeThumbIdx != -1 && isEnabled ()) {
3490- ensureLabelsAdded ();
3490+ ensureLabelsAdded (/* showLabelOnAllThumbs= */ false );
34913491 } else {
34923492 ensureLabelsRemoved ();
34933493 }
@@ -3572,7 +3572,7 @@ public void onAnimationEnd(Animator animation) {
35723572 }
35733573 }
35743574
3575- private void ensureLabelsAdded () {
3575+ private void ensureLabelsAdded (boolean showLabelOnAllThumbs ) {
35763576 // If the labels are not animating in, start an animator to show them. ensureLabelsAdded will
35773577 // be called multiple times by BaseSlider's draw method, making this check necessary to avoid
35783578 // creating and starting an animator for each draw call.
@@ -3585,13 +3585,14 @@ private void ensureLabelsAdded() {
35853585
35863586 Iterator <TooltipDrawable > labelItr = labels .iterator ();
35873587
3588- for (int i = 0 ; i < values .size () && labelItr .hasNext (); i ++) {
3589- if (i == focusedThumbIdx ) {
3590- // We position the focused thumb last so it's displayed on top, so skip it for now.
3591- continue ;
3588+ if (showLabelOnAllThumbs ) {
3589+ for (int i = 0 ; i < values .size () && labelItr .hasNext (); i ++) {
3590+ if (i == focusedThumbIdx ) {
3591+ // We position the focused thumb last so it's displayed on top, so skip it for now.
3592+ continue ;
3593+ }
3594+ setValueForLabel (labelItr .next (), values .get (i ));
35923595 }
3593-
3594- setValueForLabel (labelItr .next (), values .get (i ));
35953596 }
35963597
35973598 if (!labelItr .hasNext ()) {
0 commit comments