Skip to content

Commit 7d529cd

Browse files
author
Fabrice Di Meglio
committed
Fix Javadoc for View layoutDirection / textDirection / textAlignment
Change-Id: I2fa2f02bd2f59ee93ccd56fc6bd28b93e4713cc4
1 parent 18f9518 commit 7d529cd

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

core/java/android/view/View.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@
623623
* @attr ref android.R.styleable#View_hapticFeedbackEnabled
624624
* @attr ref android.R.styleable#View_keepScreenOn
625625
* @attr ref android.R.styleable#View_layerType
626+
* @attr ref android.R.styleable#View_layoutDirection
626627
* @attr ref android.R.styleable#View_longClickable
627628
* @attr ref android.R.styleable#View_minHeight
628629
* @attr ref android.R.styleable#View_minWidth
@@ -660,6 +661,7 @@
660661
* @attr ref android.R.styleable#View_soundEffectsEnabled
661662
* @attr ref android.R.styleable#View_tag
662663
* @attr ref android.R.styleable#View_textAlignment
664+
* @attr ref android.R.styleable#View_textDirection
663665
* @attr ref android.R.styleable#View_transformPivotX
664666
* @attr ref android.R.styleable#View_transformPivotY
665667
* @attr ref android.R.styleable#View_translationX
@@ -5854,6 +5856,7 @@ public boolean isHapticFeedbackEnabled() {
58545856
* {@link #LAYOUT_DIRECTION_RTL},
58555857
* {@link #LAYOUT_DIRECTION_INHERIT} or
58565858
* {@link #LAYOUT_DIRECTION_LOCALE}.
5859+
*
58575860
* @attr ref android.R.styleable#View_layoutDirection
58585861
*
58595862
* @hide
@@ -5909,6 +5912,8 @@ public void setLayoutDirection(int layoutDirection) {
59095912
*
59105913
* For compatibility, this will return {@link #LAYOUT_DIRECTION_LTR} if API version
59115914
* is lower than {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}.
5915+
*
5916+
* @attr ref android.R.styleable#View_layoutDirection
59125917
*/
59135918
@ViewDebug.ExportedProperty(category = "layout", mapping = {
59145919
@ViewDebug.IntToString(from = LAYOUT_DIRECTION_LTR, to = "RESOLVED_DIRECTION_LTR"),
@@ -16627,6 +16632,8 @@ protected float getHorizontalScrollFactor() {
1662716632
* {@link #TEXT_DIRECTION_RTL},
1662816633
* {@link #TEXT_DIRECTION_LOCALE}
1662916634
*
16635+
* @attr ref android.R.styleable#View_textDirection
16636+
*
1663016637
* @hide
1663116638
*/
1663216639
@ViewDebug.ExportedProperty(category = "text", mapping = {
@@ -16656,6 +16663,8 @@ public int getRawTextDirection() {
1665616663
* Resolution will be done if the value is set to TEXT_DIRECTION_INHERIT. The resolution
1665716664
* proceeds up the parent chain of the view to get the value. If there is no parent, then it will
1665816665
* return the default {@link #TEXT_DIRECTION_FIRST_STRONG}.
16666+
*
16667+
* @attr ref android.R.styleable#View_textDirection
1665916668
*/
1666016669
public void setTextDirection(int textDirection) {
1666116670
if (getRawTextDirection() != textDirection) {
@@ -16684,6 +16693,8 @@ public void setTextDirection(int textDirection) {
1668416693
* {@link #TEXT_DIRECTION_LTR},
1668516694
* {@link #TEXT_DIRECTION_RTL},
1668616695
* {@link #TEXT_DIRECTION_LOCALE}
16696+
*
16697+
* @attr ref android.R.styleable#View_textDirection
1668716698
*/
1668816699
public int getTextDirection() {
1668916700
return (mPrivateFlags2 & PFLAG2_TEXT_DIRECTION_RESOLVED_MASK) >> PFLAG2_TEXT_DIRECTION_RESOLVED_MASK_SHIFT;
@@ -16816,6 +16827,8 @@ private boolean isTextDirectionResolved() {
1681616827
* {@link #TEXT_ALIGNMENT_VIEW_START},
1681716828
* {@link #TEXT_ALIGNMENT_VIEW_END}
1681816829
*
16830+
* @attr ref android.R.styleable#View_textAlignment
16831+
*
1681916832
* @hide
1682016833
*/
1682116834
@ViewDebug.ExportedProperty(category = "text", mapping = {
@@ -16879,6 +16892,8 @@ public void setTextAlignment(int textAlignment) {
1687916892
* {@link #TEXT_ALIGNMENT_TEXT_END},
1688016893
* {@link #TEXT_ALIGNMENT_VIEW_START},
1688116894
* {@link #TEXT_ALIGNMENT_VIEW_END}
16895+
*
16896+
* @attr ref android.R.styleable#View_textAlignment
1688216897
*/
1688316898
@ViewDebug.ExportedProperty(category = "text", mapping = {
1688416899
@ViewDebug.IntToString(from = TEXT_ALIGNMENT_INHERIT, to = "INHERIT"),

core/res/res/values/attrs.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2107,8 +2107,8 @@
21072107
<enum name="locale" value="3" />
21082108
</attr>
21092109

2110-
<!-- Direction of the text. A heuristic is used to determine the resolved text direction
2111-
of paragraphs. -->
2110+
<!-- Defines the direction of the text. A heuristic is used to determine the resolved text
2111+
direction of paragraphs. -->
21122112
<attr name="textDirection" format="integer">
21132113
<!-- Default -->
21142114
<enum name="inherit" value="0" />
@@ -2128,7 +2128,7 @@
21282128
<enum name="locale" value="5" />
21292129
</attr>
21302130

2131-
<!-- Alignment of the text. A heuristic is used to determine the resolved
2131+
<!-- Defines the alignment of the text. A heuristic is used to determine the resolved
21322132
text alignment. -->
21332133
<attr name="textAlignment" format="integer">
21342134
<!-- Default -->

0 commit comments

Comments
 (0)