Stay organized with collections
Save and categorize content based on your preferences.
TextDirectionHeuristic
public
interface
TextDirectionHeuristic
android.text.TextDirectionHeuristic
|
Interface for objects that use a heuristic for guessing at the paragraph direction by examining text.
Summary
Public methods |
abstract
boolean
|
isRtl(char[] array, int start, int count)
Guess if a chars array is in the RTL direction or not.
|
abstract
boolean
|
isRtl(CharSequence cs, int start, int count)
Guess if a CharSequence is in the RTL direction or not.
|
Public methods
isRtl
public abstract boolean isRtl (char[] array,
int start,
int count)
Guess if a chars array is in the RTL direction or not.
Parameters |
array |
char : the char array. |
start |
int : start index, inclusive. |
count |
int : the length to check, must not be negative and not greater than
array.length - start . |
Returns |
boolean |
true if all chars in the range are to be considered in a RTL direction,
false otherwise. |
isRtl
public abstract boolean isRtl (CharSequence cs,
int start,
int count)
Guess if a CharSequence
is in the RTL direction or not.
Parameters |
cs |
CharSequence : the CharSequence. |
start |
int : start index, inclusive. |
count |
int : the length to check, must not be negative and not greater than
CharSequence.length() - start . |
Returns |
boolean |
true if all chars in the range are to be considered in a RTL direction,
false otherwise. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# TextDirectionHeuristic\n\nAdded in [API level 18](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nTextDirectionHeuristic\n======================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/text/TextDirectionHeuristic \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\n\ninterface\nTextDirectionHeuristic\n`\n\n\n`\n\n\n`\n\n|-------------------------------------|\n| android.text.TextDirectionHeuristic |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface for objects that use a heuristic for guessing at the paragraph direction by examining text.\n\nSummary\n-------\n\n| ### Public methods ||\n|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract boolean` | ` `[isRtl](/reference/android/text/TextDirectionHeuristic#isRtl(char[],%20int,%20int))`(char[] array, int start, int count) ` Guess if a chars array is in the RTL direction or not. |\n| ` abstract boolean` | ` `[isRtl](/reference/android/text/TextDirectionHeuristic#isRtl(java.lang.CharSequence,%20int,%20int))`(`[CharSequence](/reference/java/lang/CharSequence)` cs, int start, int count) ` Guess if a `CharSequence` is in the RTL direction or not. |\n\nPublic methods\n--------------\n\n### isRtl\n\nAdded in [API level 18](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract boolean isRtl (char[] array, \n int start, \n int count)\n```\n\nGuess if a chars array is in the RTL direction or not.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|------------------------------------------------------------------------------------------------------|\n| `array` | `char`: the char array. \u003cbr /\u003e |\n| `start` | `int`: start index, inclusive. \u003cbr /\u003e |\n| `count` | `int`: the length to check, must not be negative and not greater than `array.length - start`. \u003cbr /\u003e |\n\n| Returns ||\n|-----------|-------------------------------------------------------------------------------------------------|\n| `boolean` | true if all chars in the range are to be considered in a RTL direction, false otherwise. \u003cbr /\u003e |\n\n### isRtl\n\nAdded in [API level 18](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract boolean isRtl (CharSequence cs, \n int start, \n int count)\n```\n\nGuess if a `CharSequence` is in the RTL direction or not.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|---------------------------------------------------------------------------------------------------------------|\n| `cs` | `CharSequence`: the CharSequence. \u003cbr /\u003e |\n| `start` | `int`: start index, inclusive. \u003cbr /\u003e |\n| `count` | `int`: the length to check, must not be negative and not greater than `CharSequence.length() - start`. \u003cbr /\u003e |\n\n| Returns ||\n|-----------|-------------------------------------------------------------------------------------------------|\n| `boolean` | true if all chars in the range are to be considered in a RTL direction, false otherwise. \u003cbr /\u003e |"]]