diff options
| author | 2017-04-21 21:31:13 +0000 | |
|---|---|---|
| committer | 2017-04-21 21:31:20 +0000 | |
| commit | 31eeb08bdbe8f6ababe6414db729ac9449b01fc9 (patch) | |
| tree | 1347581d415902a49a29f6a04e8cb87abd2d9a47 | |
| parent | a72902a079abd502f2325d21375e9aa7c65d62fe (diff) | |
| parent | 4cbb4414252326795b2956f20f974ace3314f917 (diff) | |
Merge "Introduce TextView attribute for control justification." into oc-dev
| -rw-r--r-- | api/current.txt | 1 | ||||
| -rw-r--r-- | api/system-current.txt | 1 | ||||
| -rw-r--r-- | api/test-current.txt | 1 | ||||
| -rw-r--r-- | core/java/android/widget/TextView.java | 3 | ||||
| -rw-r--r-- | core/res/res/values/attrs.xml | 7 | ||||
| -rw-r--r-- | core/res/res/values/public.xml | 1 |
6 files changed, 14 insertions, 0 deletions
diff --git a/api/current.txt b/api/current.txt index 3510f3b390e4..2de1baba1c7a 100644 --- a/api/current.txt +++ b/api/current.txt @@ -766,6 +766,7 @@ package android { field public static final int itemIconDisabledAlpha = 16843057; // 0x1010131 field public static final int itemPadding = 16843565; // 0x101032d field public static final int itemTextAppearance = 16843052; // 0x101012c + field public static final int justificationMode = 16844138; // 0x101056a field public static final int keepScreenOn = 16843286; // 0x1010216 field public static final int key = 16843240; // 0x10101e8 field public static final int keyBackground = 16843315; // 0x1010233 diff --git a/api/system-current.txt b/api/system-current.txt index faa9f167e077..4e2bd920da5f 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -884,6 +884,7 @@ package android { field public static final int itemIconDisabledAlpha = 16843057; // 0x1010131 field public static final int itemPadding = 16843565; // 0x101032d field public static final int itemTextAppearance = 16843052; // 0x101012c + field public static final int justificationMode = 16844138; // 0x101056a field public static final int keepScreenOn = 16843286; // 0x1010216 field public static final int key = 16843240; // 0x10101e8 field public static final int keyBackground = 16843315; // 0x1010233 diff --git a/api/test-current.txt b/api/test-current.txt index e010e17b1860..eec30f112088 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -766,6 +766,7 @@ package android { field public static final int itemIconDisabledAlpha = 16843057; // 0x1010131 field public static final int itemPadding = 16843565; // 0x101032d field public static final int itemTextAppearance = 16843052; // 0x101012c + field public static final int justificationMode = 16844138; // 0x101056a field public static final int keepScreenOn = 16843286; // 0x1010216 field public static final int key = 16843240; // 0x10101e8 field public static final int keyBackground = 16843315; // 0x1010233 diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 92c16af31cca..f42d6c81f444 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -1371,6 +1371,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener autoSizePresetTextSizes.recycle(); } break; + case com.android.internal.R.styleable.TextView_justificationMode: + mJustificationMode = a.getInt(attr, Layout.JUSTIFICATION_MODE_NONE); + break; } } diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 8682d7d8d8d8..6e790a70f6a4 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -4776,6 +4776,13 @@ <attr name="autoSizeMinTextSize" format="dimension" /> <!-- The maximum text size constraint to be used when auto-sizing text. --> <attr name="autoSizeMaxTextSize" format="dimension" /> + <!-- Mode for justification. --> + <attr name="justificationMode"> + <!-- No justification. --> + <enum name="none" value="0" /> + <!-- Justification by stretching word spacing. --> + <enum name="inter_word" value = "1" /> + </attr> </declare-styleable> <declare-styleable name="TextViewAppearance"> <!-- Base text color, typeface, size, and style. --> diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index 89c912fd1f83..e13026b1360e 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -2821,6 +2821,7 @@ <public name="requiredSystemPropertyName" /> <!-- @hide @SystemApi --> <public name="requiredSystemPropertyValue" /> + <public name="justificationMode" /> </public-group> <public-group type="style" first-id="0x010302e0"> |