@@ -885,8 +885,7 @@ && shouldSetCollectionInfo(semanticsNode)) {
885885 // Scopes routes are not focusable, only need to set the content
886886 // for non-scopes-routes semantics nodes.
887887 if (semanticsNode .hasFlag (Flag .IS_TEXT_FIELD )) {
888- result .setText (semanticsNode .getValue ());
889- result .setHintText (semanticsNode .getTextFieldHint ());
888+ result .setText (semanticsNode .getValueLabelHint ());
890889 } else if (!semanticsNode .hasFlag (Flag .SCOPES_ROUTE )) {
891890 CharSequence content = semanticsNode .getValueLabelHint ();
892891 if (Build .VERSION .SDK_INT < Build .VERSION_CODES .P ) {
@@ -2774,47 +2773,18 @@ private float max(float a, float b, float c, float d) {
27742773 return Math .max (a , Math .max (b , Math .max (c , d )));
27752774 }
27762775
2777- private CharSequence getValue () {
2778- if (Build .VERSION .SDK_INT < Build .VERSION_CODES .LOLLIPOP ) {
2779- return value ;
2780- } else {
2781- return createSpannableString (value , valueAttributes );
2782- }
2783- }
2784-
2785- private CharSequence getLabel () {
2786- if (Build .VERSION .SDK_INT < Build .VERSION_CODES .LOLLIPOP ) {
2787- return label ;
2788- } else {
2789- return createSpannableString (label , labelAttributes );
2790- }
2791- }
2792-
2793- private CharSequence getHint () {
2776+ private CharSequence getValueLabelHint () {
2777+ CharSequence [] array ;
27942778 if (Build .VERSION .SDK_INT < Build .VERSION_CODES .LOLLIPOP ) {
2795- return hint ;
2779+ array = new CharSequence [] { value , label , hint } ;
27962780 } else {
2797- return createSpannableString (hint , hintAttributes );
2781+ array =
2782+ new CharSequence [] {
2783+ createSpannableString (value , valueAttributes ),
2784+ createSpannableString (label , labelAttributes ),
2785+ createSpannableString (hint , hintAttributes ),
2786+ };
27982787 }
2799- }
2800-
2801- private CharSequence getValueLabelHint () {
2802- CharSequence [] array = new CharSequence [] {getValue (), getLabel (), getHint ()};
2803- CharSequence result = null ;
2804- for (CharSequence word : array ) {
2805- if (word != null && word .length () > 0 ) {
2806- if (result == null || result .length () == 0 ) {
2807- result = word ;
2808- } else {
2809- result = TextUtils .concat (result , ", " , word );
2810- }
2811- }
2812- }
2813- return result ;
2814- }
2815-
2816- private CharSequence getTextFieldHint () {
2817- CharSequence [] array = new CharSequence [] {getLabel (), getHint ()};
28182788 CharSequence result = null ;
28192789 for (CharSequence word : array ) {
28202790 if (word != null && word .length () > 0 ) {
0 commit comments