Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -1796,6 +1796,7 @@ package android { field public static final int updatePeriodMillis = 16843344; // 0x1010250 field public static final int use32bitAbi = 16844053; // 0x1010515 field public static final int useAppZygote = 16844183; // 0x1010597 field @FlaggedApi("com.android.text.flags.use_bounds_for_width") public static final int useBoundsForWidth; field public static final int useDefaultMargins = 16843641; // 0x1010379 field public static final int useEmbeddedDex = 16844190; // 0x101059e field public static final int useIntrinsicSizeAsMinimum = 16843536; // 0x1010310 core/java/android/widget/TextView.java +10 −4 Original line number Diff line number Diff line Loading @@ -1259,6 +1259,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener int lastBaselineToBottomHeight = -1; float lineHeight = -1f; int lineHeightUnit = -1; boolean hasUseBoundForWidthValue = false; readTextAppearance(context, a, attributes, true /* styleArray */); Loading Loading @@ -1613,6 +1614,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener lineHeight = a.getDimensionPixelSize(attr, -1); } break; case com.android.internal.R.styleable.TextView_useBoundsForWidth: mUseBoundsForWidth = a.getBoolean(attr, false); hasUseBoundForWidthValue = true; } } Loading @@ -1639,11 +1643,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener mUseFallbackLineSpacing = FALLBACK_LINE_SPACING_NONE; } if (!hasUseBoundForWidthValue) { if (CompatChanges.isChangeEnabled(USE_BOUNDS_FOR_WIDTH)) { mUseBoundsForWidth = ClientFlags.useBoundsForWidth(); } else { mUseBoundsForWidth = false; } } // TODO(b/179693024): Use a ChangeId instead. mUseTextPaddingForUiTranslation = targetSdkVersion <= Build.VERSION_CODES.R; Loading core/res/res/values/attrs.xml +11 −1 Original line number Diff line number Diff line Loading @@ -5783,7 +5783,17 @@ <enum name="none" value="0" /> <!-- Justification by stretching word spacing. --> <enum name="inter_word" value = "1" /> </attr> <!-- Justification by stretching letter spacing. --> <!-- @FlaggedApi("com.android.text.flags.inter_character_justification") --> <enum name="inter_character" value = "2" /> </attr> <!-- Whether to use width of bounding box as a source of automatic line breaking and drawing. If this value is false, the TextView determines the View width, drawing offset and automatic line breaking based on total advances as text widths. By setting true, use glyph bound's as a source of text width. --> <!-- @FlaggedApi("com.android.text.flags.use_bounds_for_width") --> <attr name="useBoundsForWidth" format="boolean" /> </declare-styleable> <declare-styleable name="TextViewAppearance"> <!-- Base text color, typeface, size, and style. --> Loading core/res/res/values/public-staging.xml +2 −0 Original line number Diff line number Diff line Loading @@ -143,6 +143,8 @@ <public name="fragmentAdvancedPattern"/> <!-- @FlaggedApi("android.content.pm.relative_reference_intent_filters") --> <public name="fragmentSuffix"/> <!-- @FlaggedApi("com.android.text.flags.use_bounds_for_width") --> <public name="useBoundsForWidth"/> </staging-public-group> <staging-public-group type="id" first-id="0x01bc0000"> Loading Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -1796,6 +1796,7 @@ package android { field public static final int updatePeriodMillis = 16843344; // 0x1010250 field public static final int use32bitAbi = 16844053; // 0x1010515 field public static final int useAppZygote = 16844183; // 0x1010597 field @FlaggedApi("com.android.text.flags.use_bounds_for_width") public static final int useBoundsForWidth; field public static final int useDefaultMargins = 16843641; // 0x1010379 field public static final int useEmbeddedDex = 16844190; // 0x101059e field public static final int useIntrinsicSizeAsMinimum = 16843536; // 0x1010310
core/java/android/widget/TextView.java +10 −4 Original line number Diff line number Diff line Loading @@ -1259,6 +1259,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener int lastBaselineToBottomHeight = -1; float lineHeight = -1f; int lineHeightUnit = -1; boolean hasUseBoundForWidthValue = false; readTextAppearance(context, a, attributes, true /* styleArray */); Loading Loading @@ -1613,6 +1614,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener lineHeight = a.getDimensionPixelSize(attr, -1); } break; case com.android.internal.R.styleable.TextView_useBoundsForWidth: mUseBoundsForWidth = a.getBoolean(attr, false); hasUseBoundForWidthValue = true; } } Loading @@ -1639,11 +1643,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener mUseFallbackLineSpacing = FALLBACK_LINE_SPACING_NONE; } if (!hasUseBoundForWidthValue) { if (CompatChanges.isChangeEnabled(USE_BOUNDS_FOR_WIDTH)) { mUseBoundsForWidth = ClientFlags.useBoundsForWidth(); } else { mUseBoundsForWidth = false; } } // TODO(b/179693024): Use a ChangeId instead. mUseTextPaddingForUiTranslation = targetSdkVersion <= Build.VERSION_CODES.R; Loading
core/res/res/values/attrs.xml +11 −1 Original line number Diff line number Diff line Loading @@ -5783,7 +5783,17 @@ <enum name="none" value="0" /> <!-- Justification by stretching word spacing. --> <enum name="inter_word" value = "1" /> </attr> <!-- Justification by stretching letter spacing. --> <!-- @FlaggedApi("com.android.text.flags.inter_character_justification") --> <enum name="inter_character" value = "2" /> </attr> <!-- Whether to use width of bounding box as a source of automatic line breaking and drawing. If this value is false, the TextView determines the View width, drawing offset and automatic line breaking based on total advances as text widths. By setting true, use glyph bound's as a source of text width. --> <!-- @FlaggedApi("com.android.text.flags.use_bounds_for_width") --> <attr name="useBoundsForWidth" format="boolean" /> </declare-styleable> <declare-styleable name="TextViewAppearance"> <!-- Base text color, typeface, size, and style. --> Loading
core/res/res/values/public-staging.xml +2 −0 Original line number Diff line number Diff line Loading @@ -143,6 +143,8 @@ <public name="fragmentAdvancedPattern"/> <!-- @FlaggedApi("android.content.pm.relative_reference_intent_filters") --> <public name="fragmentSuffix"/> <!-- @FlaggedApi("com.android.text.flags.use_bounds_for_width") --> <public name="useBoundsForWidth"/> </staging-public-group> <staging-public-group type="id" first-id="0x01bc0000"> Loading