Home
last modified time | relevance | path

Searched refs:text (Results 1 – 25 of 2662) sorted by relevance

12345678910>>...107

/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/compat/
DLocaleSpanCompatUtilsTests.java25 import android.text.SpannableString;
26 import android.text.Spanned;
27 import android.text.style.StyleSpan;
82 final SpannableString text = new SpannableString("0123456789"); in testUpdateLocaleSpan() local
83 LocaleSpanCompatUtils.updateLocaleSpan(text, 1, 5, Locale.JAPANESE); in testUpdateLocaleSpan()
84 assertSpanCount(1, text); in testUpdateLocaleSpan()
85 assertLocaleSpan(text, 0, 1, 5, Locale.JAPANESE, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testUpdateLocaleSpan()
90 final SpannableString text = new SpannableString("0123456789"); in testUpdateLocaleSpan() local
92 text.setSpan(styleSpan, 0, 7, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testUpdateLocaleSpan()
93 LocaleSpanCompatUtils.updateLocaleSpan(text, 1, 5, Locale.JAPANESE); in testUpdateLocaleSpan()
[all …]
/packages/inputmethods/LatinIME/common/src/com/android/inputmethod/latin/common/
DStringUtils.java110 public static int codePointCount(@Nullable final CharSequence text) { in codePointCount() argument
111 if (isEmpty(text)) { in codePointCount()
114 return Character.codePointCount(text, 0, text.length()); in codePointCount()
128 public static boolean containsInArray(@Nonnull final String text, in containsInArray() argument
131 if (text.equals(element)) { in containsInArray()
146 public static boolean containsInCommaSplittableText(@Nonnull final String text, in containsInCommaSplittableText() argument
151 return containsInArray(text, extraValues.split(SEPARATOR_FOR_COMMA_SPLITTABLE_TEXT)); in containsInCommaSplittableText()
155 public static String removeFromCommaSplittableTextIfExists(@Nonnull final String text, in removeFromCommaSplittableTextIfExists() argument
161 if (!containsInArray(text, elements)) { in removeFromCommaSplittableTextIfExists()
166 if (!text.equals(element)) { in removeFromCommaSplittableTextIfExists()
[all …]
/packages/inputmethods/LatinIME/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/
DLocaleUtils.java65 final String text = localeElements[INDEX_LANGUAGE]; in constructLocaleFromString() local
66 if (isValidLanguage(text)) { in constructLocaleFromString()
67 builder.setLanguage(text); in constructLocaleFromString()
73 final String text = localeElements[INDEX_SCRIPT]; in constructLocaleFromString() local
74 if (isValidScript(text)) { in constructLocaleFromString()
75 builder.setScript(text); in constructLocaleFromString()
76 } else if (isValidRegion(text)) { in constructLocaleFromString()
77 builder.setRegion(text); in constructLocaleFromString()
84 final String text = localeElements[INDEX_REGION]; in constructLocaleFromString() local
85 if (!hasRegion && isValidRegion(text)) { in constructLocaleFromString()
[all …]
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/
DICalendarTest.java33 String text = "BEGIN:DUMMY\n" + in testAddProperty() local
44 assertEquals(text, component.toString()); in testAddProperty()
49 String text = "BEGIN:DUMMY\n" + in testAddComponent() local
64 assertEquals(text, parent.toString()); in testAddComponent()
69 String text = "BEGIN:DUMMY\n" + in testParseBasicComponent() local
75 ICalendar.Component component = ICalendar.parseComponent(text); in testParseBasicComponent()
155 String text = "BEGIN:VEVENT\nEND:VEVENT\n"; in testParseBareEvent() local
156 ICalendar.Component event = ICalendar.parseEvent(text); in testParseBareEvent()
165 String text = "BEGIN:VEVENT\n" + in testParseEvent1() local
171 ICalendar.Component event = ICalendar.parseEvent(text); in testParseEvent1()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/
DSpannableStringUtils.java19 import android.text.Spannable;
20 import android.text.SpannableString;
21 import android.text.Spanned;
22 import android.text.SpannedString;
23 import android.text.TextUtils;
24 import android.text.style.SuggestionSpan;
25 import android.text.style.URLSpan;
82 public static CharSequence concatWithNonParagraphSuggestionSpansOnly(CharSequence... text) { in concatWithNonParagraphSuggestionSpansOnly() argument
83 if (text.length == 0) { in concatWithNonParagraphSuggestionSpansOnly()
87 if (text.length == 1) { in concatWithNonParagraphSuggestionSpansOnly()
[all …]
/packages/apps/Settings/tests/uitests/src/com/android/settings/ui/
DMoreWirelessSettingsTest2.java157 (By.text(CONFIGURE_WIFI_PREFERENCE_TEXT)), TIMEOUT); in testWifiMenuLoadConfigure()
177 By.text(ADD_NETWORK_MENU_SAVE_BUTTON_TEXT)), TIMEOUT).isEnabled()); in testAddNetworkMenu_Default()
179 By.text(ADD_NETWORK_MENU_CANCEL_BUTTON_TEXT)), TIMEOUT).isEnabled()); in testAddNetworkMenu_Default()
221 mDevice.wait(Until.findObject(By.text("Manual")), TIMEOUT).click(); in testAddNetworkMenu_Proxy()
232 mDevice.wait(Until.findObject(By.text("Proxy Auto-Config")), TIMEOUT).click(); in testAddNetworkMenu_Proxy()
256 mDevice.wait(Until.findObject(By.text("Static")), TIMEOUT).click(); in testAddNetworkMenu_IpSettings()
284 assertNotNull(mDevice.wait(Until.findObject(By.text(PHASE2_MENU_NONE_TEXT)), TIMEOUT)); in testPhase2Settings()
285 assertNotNull(mDevice.wait(Until.findObject(By.text(PHASE2_MENU_MSCHAPV2_TEXT)), TIMEOUT)); in testPhase2Settings()
286 assertNotNull(mDevice.wait(Until.findObject(By.text(PHASE2_MENU_GTC_TEXT)), TIMEOUT)); in testPhase2Settings()
305 By.text(CACERT_MENU_PLEASE_SELECT_TEXT)), TIMEOUT)); in testCaCertSettings()
[all …]
DNotificationSettingsTests.java77 Until.findObject(By.text("Notifications")), TIMEOUT); in testNotificationsSettingsListForCalculator()
79 mDevice.wait(Until.findObject(By.text("Blink light")), TIMEOUT); in testNotificationsSettingsListForCalculator()
81 Until.findObject(By.text("On for all apps")), TIMEOUT); in testNotificationsSettingsListForCalculator()
85 Until.findObject(By.text("All apps")), TIMEOUT); in testNotificationsSettingsListForCalculator()
87 UiObject2 app = mDevice.wait(Until.findObject(By.text("Calculator")), TIMEOUT); in testNotificationsSettingsListForCalculator()
95 Until.findObject(By.text("Notifications")), TIMEOUT); in testNotificationsSettingsListForPhone()
97 mDevice.wait(Until.findObject(By.text("Blink light")), TIMEOUT); in testNotificationsSettingsListForPhone()
99 Until.findObject(By.text("On for all apps")), TIMEOUT); in testNotificationsSettingsListForPhone()
103 Until.findObject(By.text("All apps")), TIMEOUT); in testNotificationsSettingsListForPhone()
109 UiObject2 phone = scrollTo(mDevice, apps, By.text("Phone"), Direction.DOWN); in testNotificationsSettingsListForPhone()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/
DKeyboardTextsSet.java21 import android.text.TextUtils;
66 private static int searchTextNameEnd(final String text, final int start) { in searchTextNameEnd() argument
67 final int size = text.length(); in searchTextNameEnd()
69 final char c = text.charAt(pos); in searchTextNameEnd()
85 String text = rawText; in resolveTextReference() local
91 " reference indirection: " + text); in resolveTextReference()
95 final int size = text.length(); in resolveTextReference()
102 final char c = text.charAt(pos); in resolveTextReference()
103 if (text.startsWith(PREFIX_TEXT, pos)) { in resolveTextReference()
105 sb = new StringBuilder(text.substring(0, pos)); in resolveTextReference()
[all …]
/packages/apps/Contacts/src/com/android/contacts/format/
DFormatUtils.java20 import android.text.SpannableString;
21 import android.text.style.StyleSpan;
107 SpannableString text = new SpannableString(input); in applyStyleToSpan() local
108 text.setSpan(new StyleSpan(style), start, end, flags); in applyStyleToSpan()
109 return text; in applyStyleToSpan()
113 public static void copyToCharArrayBuffer(String text, CharArrayBuffer buffer) { in copyToCharArrayBuffer() argument
114 if (text != null) { in copyToCharArrayBuffer()
116 if (data == null || data.length < text.length()) { in copyToCharArrayBuffer()
117 buffer.data = text.toCharArray(); in copyToCharArrayBuffer()
119 text.getChars(0, text.length(), data, 0); in copyToCharArrayBuffer()
[all …]
DTextHighlighter.java19 import android.text.SpannableString;
20 import android.text.style.CharacterStyle;
21 import android.text.style.StyleSpan;
47 public void setPrefixText(TextView view, String text, String prefix) { in setPrefixText() argument
48 view.setText(applyPrefixHighlight(text, prefix)); in setPrefixText()
61 public void applyMaskingHighlight(SpannableString text, int start, int end) { in applyMaskingHighlight() argument
63 text.setSpan(getStyleSpan(), start, end, 0); in applyMaskingHighlight()
72 public CharSequence applyPrefixHighlight(CharSequence text, String prefix) { in applyPrefixHighlight() argument
74 return text; in applyPrefixHighlight()
85 int index = FormatUtils.indexOfWordPrefix(text, trimmedPrefix); in applyPrefixHighlight()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/spellcheck/
DAndroidWordLevelSpellCheckerSession.java24 import android.text.TextUtils;
146 private static int getCheckabilityInScript(final String text, final int script) { in getCheckabilityInScript() argument
147 if (TextUtils.isEmpty(text) || text.length() <= 1) return CHECKABILITY_TOO_SHORT; in getCheckabilityInScript()
152 final int firstCodePoint = text.codePointAt(0); in getCheckabilityInScript()
158 final int length = text.length(); in getCheckabilityInScript()
160 for (int i = 0; i < length; i = text.offsetByCodePoints(i, 1)) { in getCheckabilityInScript()
161 final int codePoint = text.codePointAt(i); in getCheckabilityInScript()
192 private boolean isInDictForAnyCapitalization(final String text, final int capitalizeType) { in isInDictForAnyCapitalization() argument
195 if (mService.isValidWord(mLocale, text)) return true; in isInDictForAnyCapitalization()
201 final String lowerCaseText = text.toLowerCase(mLocale); in isInDictForAnyCapitalization()
[all …]
/packages/apps/TV/tests/func/src/com/android/tv/tests/ui/dvr/
DDvrLibraryTest.java58 ByResource.text(controller.getTargetResources(), R.string.dvr_main_recent)); in setUp()
61 ByResource.text( in setUp()
65 ByResource.text(controller.getTargetResources(), R.string.dvr_main_series)); in setUp()
69 ByResource.text( in setUp()
109 ByResource.text( in testEmptyLibrary()
131 By.text( in testScheduleRecordings()
142 By.text( in testScheduleRecordings()
162 ByResource.text( in testScheduleRecordings()
168 ByResource.text( in testScheduleRecordings()
196 ByResource.text( in testScheduleRecordings()
[all …]
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
DRichInputConnectionAndTextRangeTests.java26 import android.text.SpannableString;
27 import android.text.TextUtils;
28 import android.text.style.SuggestionSpan;
77 public MockConnection(final CharSequence text, final int cursorPosition) { in MockConnection() argument
85 TextUtils.writeToParcel(text.subSequence(0, cursorPosition), p, 0 /* flags */); in MockConnection()
86 TextUtils.writeToParcel(text.subSequence(cursorPosition, text.length()), p, in MockConnection()
314 SpannableString text = new SpannableString("This is a string for test"); in helpTestGetSuggestionSpansAtWord() local
315 text.setSpan(new SuggestionSpan(Locale.ENGLISH, SUGGESTIONS1, 0 /* flags */), in helpTestGetSuggestionSpansAtWord()
317 mockInputMethodService.setInputConnection(new MockConnection(text, cursorPos)); in helpTestGetSuggestionSpansAtWord()
327 text = new SpannableString("This is a string for test"); in helpTestGetSuggestionSpansAtWord()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/suggestions/
DSuggestionStripLayoutHelper.java31 import android.text.Spannable;
32 import android.text.SpannableString;
33 import android.text.Spanned;
34 import android.text.TextPaint;
35 import android.text.TextUtils;
36 import android.text.style.CharacterStyle;
37 import android.text.style.StyleSpan;
38 import android.text.style.UnderlineSpan;
440 final CharSequence text = getEllipsizedTextWithSettingScaleX( in layoutWord() local
443 wordView.setText(text); // TextView.setText() resets text scale x to 1.0. in layoutWord()
[all …]
/packages/apps/Traceur/uitests/src/com/android/traceur/uitest/
DTraceurAppTests.java92 mDevice.wait(Until.findObject(By.text("Record trace")), in testElementsOnMainScreen()
95 mDevice.wait(Until.findObject(By.text("Trace debuggable applications")), in testElementsOnMainScreen()
98 mDevice.wait(Until.findObject(By.text("Categories")), in testElementsOnMainScreen()
101 mDevice.wait(Until.findObject(By.text("Restore default categories")), in testElementsOnMainScreen()
104 mDevice.wait(Until.findObject(By.text("Per-CPU buffer size")), in testElementsOnMainScreen()
142 mDevice.wait(Until.findObject(By.text("Record trace")), TIMEOUT); in testSuccessfulTracing()
144 mDevice.findObject(By.text("Record trace")).click(); in testSuccessfulTracing()
145 mDevice.wait(Until.hasObject(By.text("Trace is being recorded")), TIMEOUT); in testSuccessfulTracing()
146 mDevice.findObject(By.text("Record trace")).click(); in testSuccessfulTracing()
150 mDevice.wait(Until.hasObject(By.text("Tap to share your trace")), TIMEOUT); in testSuccessfulTracing()
[all …]
/packages/apps/Messaging/src/com/android/messaging/datamodel/
DMessageNotificationState.java29 import android.text.Html;
30 import android.text.Spannable;
31 import android.text.SpannableString;
32 import android.text.SpannableStringBuilder;
33 import android.text.Spanned;
34 import android.text.TextUtils;
35 import android.text.style.ForegroundColorSpan;
36 import android.text.style.StyleSpan;
37 import android.text.style.TextAppearanceSpan;
38 import android.text.style.URLSpan;
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/
DStringTexture.java24 import android.text.TextPaint;
25 import android.text.TextUtils;
36 private StringTexture(String text, TextPaint paint, in StringTexture() argument
39 mText = text; in StringTexture()
54 String text, float textSize, int color) { in newInstance() argument
55 return newInstance(text, getDefaultPaint(textSize, color)); in newInstance()
59 String text, float textSize, int color, in newInstance() argument
66 text = TextUtils.ellipsize( in newInstance()
67 text, paint, lengthLimit, TextUtils.TruncateAt.END).toString(); in newInstance()
69 return newInstance(text, paint); in newInstance()
[all …]
/packages/apps/Dialer/java/com/android/dialer/i18n/
DDialerBidiFormatter.java21 import android.text.SpannableStringBuilder;
22 import android.text.SpannedString;
23 import android.text.TextUtils;
54 public static CharSequence format(@Nullable CharSequence text) { in format() argument
55 if (TextUtils.isEmpty(text)) { in format()
56 return text; in format()
62 Matcher matcher = Patterns.PHONE.matcher(text.toString()); in format()
71 spannableStringBuilder.append(text.subSequence(currIndex, start)); in format()
79 String.valueOf(LRE), text.subSequence(start, end), String.valueOf(PDF)))); in format()
85 if (currIndex < text.length()) { in format()
[all …]
/packages/apps/Settings/src/com/android/settings/
DLinkifyUtils.java19 import android.text.Spannable;
20 import android.text.TextPaint;
21 import android.text.method.LinkMovementMethod;
22 import android.text.style.ClickableSpan;
49 public static boolean linkify(TextView textView, StringBuilder text, in linkify() argument
52 final int beginIndex = text.indexOf(PLACE_HOLDER_LINK_BEGIN); in linkify()
54 textView.setText(text); in linkify()
57 text.delete(beginIndex, beginIndex + PLACE_HOLDER_LINK_BEGIN.length()); in linkify()
58 final int endIndex = text.indexOf(PLACE_HOLDER_LINK_END); in linkify()
60 textView.setText(text); in linkify()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/
DLinkifyUtils.java19 import android.text.Spannable;
20 import android.text.TextPaint;
21 import android.text.method.LinkMovementMethod;
22 import android.text.style.ClickableSpan;
49 public static boolean linkify(TextView textView, StringBuilder text, in linkify() argument
52 final int beginIndex = text.indexOf(PLACE_HOLDER_LINK_BEGIN); in linkify()
54 textView.setText(text); in linkify()
57 text.delete(beginIndex, beginIndex + PLACE_HOLDER_LINK_BEGIN.length()); in linkify()
58 final int endIndex = text.indexOf(PLACE_HOLDER_LINK_END); in linkify()
60 textView.setText(text); in linkify()
[all …]
/packages/inputmethods/LatinIME/tools/EditTextVariations/src/com/android/inputmethod/tools/edittextvariations/
DEditTextVariations.java31 import android.text.InputType;
32 import android.text.TextUtils;
223 String text; in setupHintText() local
225 text = "actionLabel<" + e.getImeActionLabel() + ":" + e.getImeActionId() + ">"; in setupHintText()
227 text = actionName(imeOptions & EditorInfo.IME_MASK_ACTION); in setupHintText()
229 text = appendFlagText(text, in setupHintText()
231 text = appendFlagText(text, in setupHintText()
233 text = appendFlagText(text, in setupHintText()
235 text = appendFlagText(text, in setupHintText()
237 text = appendFlagText(text, in setupHintText()
[all …]
/packages/apps/Car/Dialer/src/com/android/car/dialer/ui/view/
DScaleSpan.java22 import android.text.StaticLayout;
23 import android.text.TextPaint;
24 import android.text.TextUtils;
25 import android.text.style.ReplacementSpan;
46 public int getSize(Paint paint, CharSequence text, int start, int end, in getSize() argument
48 if (TextUtils.isEmpty(text)) { in getSize()
54 float desiredWidth = StaticLayout.getDesiredWidth(text.toString(), start, end, textPaint); in getSize()
59 public void draw(Canvas canvas, CharSequence text, int start, int end, float x, int top, int y, in draw() argument
62 paint.getTextBounds(text, start, end, targetRect); in draw()
66 paint.getTextBounds(text, start, end, currentRect); in draw()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/category/
DIconView.java77 protected void computeTextPosition(String text) { in computeTextPosition() argument
78 if (text == null) { in computeTextPosition()
83 text = text.toUpperCase(); in computeTextPosition()
87 mPaint.getTextBounds(text, 0, text.length(), mTextBounds); in computeTextPosition()
97 protected void drawText(Canvas canvas, String text) { in drawText() argument
98 if (text == null) { in drawText()
101 float textWidth = mPaint.measureText(text); in drawText()
112 canvas.drawText(text, x, y, mPaint); in drawText()
115 protected void drawOutlinedText(Canvas canvas, String text) { in drawOutlinedText() argument
119 drawText(canvas, text); in drawOutlinedText()
[all …]
/packages/apps/Dialer/java/com/android/incallui/autoresizetext/
DAutoResizeTextView.java23 import android.text.Layout.Alignment;
24 import android.text.StaticLayout;
25 import android.text.TextPaint;
169 String text = getText().toString(); in suggestedSizeFitsInSpace() local
174 && textPaint.measureText(text) <= availableSpace.right; in suggestedSizeFitsInSpace()
178 StaticLayout layout = new StaticLayout(text, in suggestedSizeFitsInSpace()
203 CharSequence text = getText(); in computeTextSize() local
204 if (text != null && textSizesCache.get(text.hashCode()) != 0) { in computeTextSize()
205 return textSizesCache.get(text.hashCode()); in computeTextSize()
208 textSizesCache.put(text == null ? 0 : text.hashCode(), size); in computeTextSize()
[all …]
/packages/apps/Tag/src/com/android/apps/tag/record/
DTextRecord.java48 private TextRecord(String languageCode, String text) { in TextRecord() argument
50 mText = Preconditions.checkNotNull(text); in TextRecord()
55 TextView text = (TextView) inflater.inflate(R.layout.tag_text, parent, false); in getView() local
56 text.setText(mText); in getView()
57 return text; in getView()
107 String text = new String(payload, in parse() local
111 return new TextRecord(languageCode, text); in parse()
129 public static NdefRecord newTextRecord(String text, Locale locale) { in newTextRecord() argument
130 return newTextRecord(text, locale, true); in newTextRecord()
133 public static NdefRecord newTextRecord(String text, Locale locale, boolean encodeInUtf8) { in newTextRecord() argument
[all …]

12345678910>>...107