diff options
author | Fabrice Di Meglio <fdimeglio@google.com> | 2013-02-08 18:15:07 -0800 |
---|---|---|
committer | Fabrice Di Meglio <fdimeglio@google.com> | 2013-02-11 14:41:04 -0800 |
commit | 9dd4c5c6867f8b6de19096d2d68365dccb744c19 (patch) | |
tree | 285d4aaeef56f027b3a69e1bf860f197a863fa6a /core/java/android/view/ViewParent.java | |
parent | 981e60edc3ed91ea8b5e1dae98669b88b175e19b (diff) | |
download | frameworks_base-9dd4c5c6867f8b6de19096d2d68365dccb744c19.zip frameworks_base-9dd4c5c6867f8b6de19096d2d68365dccb744c19.tar.gz frameworks_base-9dd4c5c6867f8b6de19096d2d68365dccb744c19.tar.bz2 |
Fix bug #7381967 Add RTL APIs to ViewParent
- add RTL apis to ViewParent
- remove awful and performance bottleneck casts in View during LayoutDirection,
TextDirection and TextAlignment resolutions.
Change-Id: I92a56b16382e13c28c1dad35f6f205620eb01bfe
Diffstat (limited to 'core/java/android/view/ViewParent.java')
-rw-r--r-- | core/java/android/view/ViewParent.java | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/core/java/android/view/ViewParent.java b/core/java/android/view/ViewParent.java index ddff91d..4b70bc0 100644 --- a/core/java/android/view/ViewParent.java +++ b/core/java/android/view/ViewParent.java @@ -295,4 +295,105 @@ public interface ViewParent { * @hide */ public void childAccessibilityStateChanged(View child); + + /** + * Tells if this view parent can resolve the layout direction. + * See {@link View#setLayoutDirection(int)} + * + * @return True if this view parent can resolve the layout direction. + * + * @hide + */ + public boolean canResolveLayoutDirection(); + + /** + * Tells if this view parent layout direction is resolved. + * See {@link View#setLayoutDirection(int)} + * + * @return True if this view parent layout direction is resolved. + * + * @hide + */ + public boolean isLayoutDirectionResolved(); + + /** + * Return this view parent layout direction. See {@link View#getLayoutDirection()} + * + * @return {@link View#LAYOUT_DIRECTION_RTL} if the layout direction is RTL or returns + * {@link View#LAYOUT_DIRECTION_LTR} if the layout direction is not RTL. + * + * @hide + */ + public int getLayoutDirection(); + + /** + * Tells if this view parent can resolve the text direction. + * See {@link View#setTextDirection(int)} + * + * @return True if this view parent can resolve the text direction. + * + * @hide + */ + public boolean canResolveTextDirection(); + + /** + * Tells if this view parent text direction is resolved. + * See {@link View#setTextDirection(int)} + * + * @return True if this view parent text direction is resolved. + * + * @hide + */ + public boolean isTextDirectionResolved(); + + /** + * Return this view parent text direction. See {@link View#getTextDirection()} + * + * @return the resolved text direction. Returns one of: + * + * {@link View#TEXT_DIRECTION_FIRST_STRONG} + * {@link View#TEXT_DIRECTION_ANY_RTL}, + * {@link View#TEXT_DIRECTION_LTR}, + * {@link View#TEXT_DIRECTION_RTL}, + * {@link View#TEXT_DIRECTION_LOCALE} + * + * @hide + */ + public int getTextDirection(); + + /** + * Tells if this view parent can resolve the text alignment. + * See {@link View#setTextAlignment(int)} + * + * @return True if this view parent can resolve the text alignment. + * + * @hide + */ + public boolean canResolveTextAlignment(); + + /** + * Tells if this view parent text alignment is resolved. + * See {@link View#setTextAlignment(int)} + * + * @return True if this view parent text alignment is resolved. + * + * @hide + */ + public boolean isTextAlignmentResolved(); + + /** + * Return this view parent text alignment. See {@link android.view.View#getTextAlignment()} + * + * @return the resolved text alignment. Returns one of: + * + * {@link View#TEXT_ALIGNMENT_GRAVITY}, + * {@link View#TEXT_ALIGNMENT_CENTER}, + * {@link View#TEXT_ALIGNMENT_TEXT_START}, + * {@link View#TEXT_ALIGNMENT_TEXT_END}, + * {@link View#TEXT_ALIGNMENT_VIEW_START}, + * {@link View#TEXT_ALIGNMENT_VIEW_END} + * + * @hide + */ + public int getTextAlignment(); } |