Skip to content

Commit

Permalink
Review Android Studio and XCODE errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fabOnReact committed Feb 8, 2023
1 parent 112ed6f commit 235eda8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
6 changes: 4 additions & 2 deletions Libraries/Text/Text.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ export interface TextPropsIOS {
export interface TextPropsAndroid {
/**
* Used with nested Text and accessibilityRole measure, money or telephone to specify the unit to announce.
* Measure refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_UNIT
* Telephone refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_NUMBER_PARTS
* Ordinal and Cardinal https://developer.android.com/reference/android/text/style/TtsSpan#ARG_NUMBER
* Measure refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_UNIT
* Telephone refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_NUMBER_PARTS
* Verbatim refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_VERBATIM
*/
accessibilitySpan?:
| 'none'
Expand Down
6 changes: 4 additions & 2 deletions Libraries/Text/TextProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,10 @@ export type TextProps = $ReadOnly<{|

/**
* Used with nested Text and accessibilityRole measure, money or telephone to specify the unit to announce.
* Measure refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_UNIT
* Telephone refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_NUMBER_PARTS
* Ordinal and Cardinal https://developer.android.com/reference/android/text/style/TtsSpan#ARG_NUMBER
* Measure refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_UNIT
* Telephone refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_NUMBER_PARTS
* Verbatim refer to https://developer.android.com/reference/android/text/style/TtsSpan#ARG_VERBATIM
*/
accessibilitySpan?: ?(
| 'none'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public static AccessibilitySpan fromValue(@Nullable String value) {
}
}

public static class Builder<C extends Builder<?>> {
public static class Builder {
private String mType;
private final PersistableBundle mArgs = new PersistableBundle();

Expand All @@ -91,19 +91,19 @@ public Builder(AccessibilitySpan type, @Nullable String accessibilityLabel) {
return;
}
try {
if (mType == TYPE_TEXT) {
if (mType.equals(TYPE_TEXT)) {
setStringArgument(ARG_TEXT, accessibilityLabel);
}
if (mType == TYPE_TELEPHONE) {
if (mType.equals(TYPE_TELEPHONE)) {
warningMessage = TYPE_TELEPHONE_WARNING_MSG;
setStringArgument(ARG_NUMBER_PARTS, accessibilityLabel);
}
// https://developer.android.com/reference/android/text/style/TtsSpan#ARG_UNIT
if (mType == TYPE_MEASURE) {
if (mType.equals(TYPE_MEASURE)) {
warningMessage = TYPE_MEASURE_WARNING_MSG;
setStringArgument(ARG_UNIT, accessibilityLabel);
}
if (mType == TYPE_CARDINAL || mType == TYPE_ORDINAL) {
if (mType.equals(TYPE_CARDINAL) || mType.equals(TYPE_ORDINAL)) {
setStringArgument(ARG_NUMBER, accessibilityLabel);
}
} catch (Exception e) {
Expand Down

0 comments on commit 235eda8

Please sign in to comment.