summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Main <smain@google.com>2013-06-17 22:14:28 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-06-17 22:14:28 -0700
commit2887271ff3b59cc4bc0925ef08cea190a0017462 (patch)
treee0ffa326a4291498cd75a3e6a26f20b1cbe0cb48
parentd0b0d6a4d9b468380443cffb746366f8863116bb (diff)
parent8303a2036efd93eecda6da1e481e1659a40ca12e (diff)
downloadframeworks_base-2887271ff3b59cc4bc0925ef08cea190a0017462.zip
frameworks_base-2887271ff3b59cc4bc0925ef08cea190a0017462.tar.gz
frameworks_base-2887271ff3b59cc4bc0925ef08cea190a0017462.tar.bz2
am 8303a203: am 94ba190e: am de04dfb6: Merge "some extra docs for TextDirectionHeuristic" into jb-mr2-dev
* commit '8303a2036efd93eecda6da1e481e1659a40ca12e': some extra docs for TextDirectionHeuristic
-rw-r--r--core/java/android/text/BidiFormatter.java10
-rw-r--r--core/java/android/text/TextDirectionHeuristics.java9
2 files changed, 16 insertions, 3 deletions
diff --git a/core/java/android/text/BidiFormatter.java b/core/java/android/text/BidiFormatter.java
index 3fab35b..2a2589a 100644
--- a/core/java/android/text/BidiFormatter.java
+++ b/core/java/android/text/BidiFormatter.java
@@ -25,8 +25,12 @@ import java.util.Locale;
/**
* Utility class for formatting text for display in a potentially opposite-directionality context
* without garbling. The directionality of the context is set at formatter creation and the
- * directionality of the text can be either estimated or passed in when known. Provides the
- * following functionality:
+ * directionality of the text can be either estimated or passed in when known.
+ *
+ * <p>To support versions lower than {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2},
+ * you can use the support library's {@link android.support.v4.text.BidiFormatter} class.
+ *
+ * <p>These APIs provides the following functionality:
* <p>
* 1. Bidi Wrapping
* When text in one language is mixed into a document in another, opposite-directionality language,
@@ -370,6 +374,7 @@ public final class BidiFormatter {
*
* @param str The input string.
* @param heuristic The algorithm to be used to estimate the string's overall direction.
+ * See {@link TextDirectionHeuristics} for pre-defined heuristics.
* @param isolate Whether to directionally isolate the string to prevent it from garbling the
* content around it
* @return Input string after applying the above processing.
@@ -401,6 +406,7 @@ public final class BidiFormatter {
*
* @param str The input string.
* @param heuristic The algorithm to be used to estimate the string's overall direction.
+ * See {@link TextDirectionHeuristics} for pre-defined heuristics.
* @return Input string after applying the above processing.
*/
public String unicodeWrap(String str, TextDirectionHeuristic heuristic) {
diff --git a/core/java/android/text/TextDirectionHeuristics.java b/core/java/android/text/TextDirectionHeuristics.java
index 7d7e3a9..866137c 100644
--- a/core/java/android/text/TextDirectionHeuristics.java
+++ b/core/java/android/text/TextDirectionHeuristics.java
@@ -22,7 +22,14 @@ import android.view.View;
import java.nio.CharBuffer;
/**
- * Some objects that implement TextDirectionHeuristic.
+ * Some objects that implement {@link TextDirectionHeuristic}. Use these with
+ * the {@link BidiFormatter#unicodeWrap unicodeWrap()} methods in {@link BidiFormatter}.
+ * Also notice that these direction heuristics correspond to the same types of constants
+ * provided in the {@link android.view.View} class for {@link android.view.View#setTextDirection
+ * setTextDirection()}, such as {@link android.view.View#TEXT_DIRECTION_RTL}.
+ * <p>To support versions lower than {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2},
+ * you can use the support library's {@link android.support.v4.text.TextDirectionHeuristicsCompat}
+ * class.
*
*/
public class TextDirectionHeuristics {