Home
last modified time | relevance | path

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

12345678910>>...77

/frameworks/base/core/tests/coretests/src/android/text/method/
DWordIteratorTest.java17 package android.text.method;
30 import java.text.BreakIterator;
151 final String text = "text"; in testSetCharSequence() local
155 wordIterator.setCharSequence(text, 100, 100); in testSetCharSequence()
161 wordIterator.setCharSequence(text, -100, -100); in testSetCharSequence()
167 wordIterator.setCharSequence(text, 0, text.length()); in testSetCharSequence()
168 wordIterator.setCharSequence(text, 0, 0); in testSetCharSequence()
169 wordIterator.setCharSequence(text, text.length(), text.length()); in testSetCharSequence()
174 final String text = "aaaa bbbb cccc dddd eeee ffff gggg hhhh iiii jjjj kkkk llll mmmm nnnn"; in testWindowWidth() local
178 wordIterator.setCharSequence(text, text.indexOf('n'), text.length()); in testWindowWidth()
[all …]
/frameworks/base/core/java/android/text/
DSelection.java17 package android.text;
19 import java.text.BreakIterator;
37 public static final int getSelectionStart(CharSequence text) { in getSelectionStart() argument
38 if (text instanceof Spanned) in getSelectionStart()
39 return ((Spanned) text).getSpanStart(SELECTION_START); in getSelectionStart()
48 public static final int getSelectionEnd(CharSequence text) { in getSelectionEnd() argument
49 if (text instanceof Spanned) in getSelectionEnd()
50 return ((Spanned) text).getSpanStart(SELECTION_END); in getSelectionEnd()
67 public static void setSelection(Spannable text, int start, int stop) { in setSelection() argument
72 int ostart = getSelectionStart(text); in setSelection()
[all …]
DHtml.java17 package android.text;
25 import android.text.style.AbsoluteSizeSpan;
26 import android.text.style.AlignmentSpan;
27 import android.text.style.BackgroundColorSpan;
28 import android.text.style.BulletSpan;
29 import android.text.style.CharacterStyle;
30 import android.text.style.ForegroundColorSpan;
31 import android.text.style.ImageSpan;
32 import android.text.style.ParagraphStyle;
33 import android.text.style.QuoteSpan;
[all …]
/frameworks/minikin/tests/unittest/
DLayoutTest.cpp74 std::vector<uint16_t> text; in TEST_F() local
79 text = utf8ToUtf16("oneword"); in TEST_F()
80 layout.doLayout(text.data(), 0, text.size(), text.size(), kBidi_LTR, FontStyle(), paint, in TEST_F()
90 expectedValues.resize(text.size()); in TEST_F()
98 text = utf8ToUtf16("two words"); in TEST_F()
99 layout.doLayout(text.data(), 0, text.size(), text.size(), kBidi_LTR, FontStyle(), paint, in TEST_F()
109 expectedValues.resize(text.size()); in TEST_F()
117 text = utf8ToUtf16("three words test"); in TEST_F()
118 layout.doLayout(text.data(), 0, text.size(), text.size(), kBidi_LTR, FontStyle(), paint, in TEST_F()
128 expectedValues.resize(text.size()); in TEST_F()
[all …]
/frameworks/base/core/java/android/widget/
DMultiAutoCompleteTextView.java20 import android.text.Editable;
21 import android.text.SpannableString;
22 import android.text.Spanned;
23 import android.text.TextUtils;
24 import android.text.method.QwertyKeyListener;
94 protected void performFiltering(CharSequence text, int keyCode) { in performFiltering() argument
97 int start = mTokenizer.findTokenStart(text, end); in performFiltering()
99 performFiltering(text, start, end, keyCode); in performFiltering()
119 Editable text = getText(); in enoughToFilter() local
126 int start = mTokenizer.findTokenStart(text, end); in enoughToFilter()
[all …]
DDialerFilter.java21 import android.text.Editable;
22 import android.text.InputFilter;
23 import android.text.Selection;
24 import android.text.Spannable;
25 import android.text.Spanned;
26 import android.text.TextWatcher;
27 import android.text.method.DialerKeyListener;
28 import android.text.method.KeyListener;
29 import android.text.method.TextKeyListener;
325 public void append(String text) { in append() argument
[all …]
/frameworks/base/telephony/java/android/telephony/
DJapanesePhoneNumberFormatter.java19 import android.text.Editable;
157 public static void format(Editable text) { in format() argument
162 int length = text.length(); in format()
164 && text.subSequence(0, 3).toString().equals("+81")) { in format()
166 } else if (length < 1 || text.charAt(0) != '0') { in format()
170 CharSequence saved = text.subSequence(0, length); in format()
174 while (i < text.length()) { in format()
175 if (text.charAt(i) == '-') { in format()
176 text.delete(i, i + 1); in format()
182 length = text.length(); in format()
[all …]
/frameworks/base/graphics/java/android/graphics/
DPaint.java25 import android.text.FontConfig;
26 import android.text.GraphicsOperations;
27 import android.text.SpannableString;
28 import android.text.SpannedString;
29 import android.text.TextUtils;
1889 public float measureText(char[] text, int index, int count) { in measureText() argument
1890 if (text == null) { in measureText()
1893 if ((index | count) < 0 || index + count > text.length) { in measureText()
1897 if (text.length == 0 || count == 0) { in measureText()
1901 return (float) Math.ceil(nGetTextAdvances(mNativePaint, mNativeTypeface, text, in measureText()
[all …]
/frameworks/base/core/tests/coretests/src/android/widget/
DTextViewActivityMouseTest.java117 final String text = "abc def ghi."; in testContextMenu() local
119 onView(withId(R.id.textview)).perform(replaceText(text)); in testContextMenu()
124 mouseClickOnTextAtIndex(text.indexOf("d"), MotionEvent.BUTTON_SECONDARY)); in testContextMenu()
137 mouseClickOnTextAtIndex(text.indexOf("."))); in testContextMenu()
141 mouseClickOnTextAtIndex(text.indexOf("d"), MotionEvent.BUTTON_SECONDARY)); in testContextMenu()
153 mouseDragOnText(text.indexOf("c"), text.indexOf("h"))); in testContextMenu()
155 mouseClickOnTextAtIndex(text.indexOf("d"), MotionEvent.BUTTON_SECONDARY)); in testContextMenu()
168 mouseClickOnTextAtIndex(text.indexOf("i"), MotionEvent.BUTTON_SECONDARY)); in testContextMenu()
178 onView(withId(R.id.textview)).check(hasInsertionPointerAtIndex(text.indexOf("i"))); in testContextMenu()
185 final String text = "abc def ghi."; in testDragAndDrop() local
[all …]
DSuggestionsPopupWindowTest.java46 import android.text.Selection;
47 import android.text.Spannable;
48 import android.text.Spanned;
49 import android.text.TextPaint;
50 import android.text.style.SuggestionSpan;
51 import android.text.style.TextAppearanceSpan;
77 final Spannable text = (Spannable) textView.getText(); in setSuggestionSpan() local
78 text.setSpan(span, start, end, Spanned.SPAN_INCLUSIVE_INCLUSIVE); in setSuggestionSpan()
79 Selection.setSelection(text, (start + end) / 2); in setSuggestionSpan()
86 final String text = "abc def ghi"; in testOnTextContextMenuItem() local
[all …]
DTextViewActivityTest.java64 import android.text.InputType;
65 import android.text.Selection;
66 import android.text.Spannable;
128 final String text = "\u0623\u064F\u067A\u0633\u0652"; in testPositionCursorAtTextAtIndex_arabic() local
129 onView(withId(R.id.textview)).perform(replaceText(text)); in testPositionCursorAtTextAtIndex_arabic()
148 final String text = "\u0915\u093E"; in testPositionCursorAtTextAtIndex_devanagari() local
149 onView(withId(R.id.textview)).perform(replaceText(text)); in testPositionCursorAtTextAtIndex_devanagari()
196 final String text = "\uD83D\uDE00\uD83D\uDE01\uD83D\uDE02\uD83D\uDE03"; in testLongPressAndDragToSelect_emoji() local
197 onView(withId(R.id.textview)).perform(replaceText(text)); in testLongPressAndDragToSelect_emoji()
210 final String text = "abc def ghi."; in testDragAndDrop() local
[all …]
/frameworks/base/tools/aapt/
Dpseudolocalize.h12 virtual String16 text(const String16& text) = 0;
13 virtual String16 placeholder(const String16& text) = 0;
19 String16 text(const String16& text) { return text; } in text() argument
20 String16 placeholder(const String16& text) { return text; } in placeholder() argument
27 String16 text(const String16& text);
28 String16 placeholder(const String16& text);
36 String16 text(const String16& text);
37 String16 placeholder(const String16& text);
51 String16 text(const String16& text);
/frameworks/base/core/java/com/google/android/util/
DAbstractMessageParser.java69 private String text; field in AbstractMessageParser
88 public AbstractMessageParser(String text) { in AbstractMessageParser() argument
89 this(text, true, true, true, true, true, true); in AbstractMessageParser()
98 public AbstractMessageParser(String text, boolean parseSmilies, in AbstractMessageParser() argument
101 this.text = text; in AbstractMessageParser()
116 public final String getRawText() { return text; } in getRawText()
138 if (parseMeText && text.startsWith("/me") && (text.length() > 3) && in parse()
139 Character.isWhitespace(text.charAt(3))) { in parse()
140 meText = text.substring(0, 4); in parse()
141 text = text.substring(4); in parse()
[all …]
/frameworks/opt/setupwizard/library/platform/src/com/android/setupwizardlib/view/
DRichTextView.java20 import android.text.Annotation;
21 import android.text.SpannableString;
22 import android.text.Spanned;
23 import android.text.method.LinkMovementMethod;
24 import android.text.style.ClickableSpan;
25 import android.text.style.TextAppearanceSpan;
63 public static CharSequence getRichText(Context context, CharSequence text) { in getRichText() argument
64 if (text instanceof Spanned) { in getRichText()
65 final SpannableString spannable = new SpannableString(text); in getRichText()
86 return text; in getRichText()
[all …]
/frameworks/support/compat/java/android/support/v4/text/util/
DLinkifyCompat.java17 package android.support.v4.text.util;
27 import android.text.Spannable;
28 import android.text.SpannableString;
29 import android.text.Spanned;
30 import android.text.method.LinkMovementMethod;
31 import android.text.method.MovementMethod;
32 import android.text.style.URLSpan;
33 import android.text.util.Linkify;
34 import android.text.util.Linkify.MatchFilter;
35 import android.text.util.Linkify.TransformFilter;
[all …]
/frameworks/base/core/java/android/text/util/
DRfc822Tokenizer.java17 package android.text.util;
45 public static void tokenize(CharSequence text, Collection<Rfc822Token> out) { in tokenize() argument
51 int cursor = text.length(); in tokenize()
54 char c = text.charAt(i); in tokenize()
59 while (i < cursor && text.charAt(i) == ' ') { in tokenize()
82 c = text.charAt(i); in tokenize()
89 name.append(text.charAt(i + 1)); in tokenize()
102 c = text.charAt(i); in tokenize()
117 comment.append(text.charAt(i + 1)); in tokenize()
129 c = text.charAt(i); in tokenize()
[all …]
/frameworks/base/core/tests/coretests/src/android/view/textclassifier/
DTextClassificationManagerTest.java57 String text = "Contact me at droid@android.com"; in testSmartSelection()
60 int startIndex = text.indexOf(selected); in testSmartSelection()
62 int smartStartIndex = text.indexOf(suggested); in testSmartSelection()
65 assertThat(mClassifier.suggestSelection(text, startIndex, endIndex, LOCALES), in testSmartSelection()
73 String text = "Contact me at droid@android.com"; in testSmartSelection_nullLocaleList()
76 int startIndex = text.indexOf(selected); in testSmartSelection_nullLocaleList()
78 int smartStartIndex = text.indexOf(suggested); in testSmartSelection_nullLocaleList()
82 assertThat(mClassifier.suggestSelection(text, startIndex, endIndex, nullLocales), in testSmartSelection_nullLocaleList()
90 String text = "Visit http://www.android.com for more information"; in testSmartSelection_url()
93 int startIndex = text.indexOf(selected); in testSmartSelection_url()
[all …]
/frameworks/base/core/tests/coretests/src/android/text/
DSpannableStringBuilderTest.java17 package android.text;
23 import android.text.style.BulletSpan;
24 import android.text.style.QuoteSpan;
25 import android.text.style.SubscriptSpan;
26 import android.text.style.UnderlineSpan;
32 protected Spannable newSpannableWithText(String text) { in newSpannableWithText() argument
33 return new SpannableStringBuilder(text); in newSpannableWithText()
38 String text = "p_in_s"; in testGetSpans_sortsByPriorityEvenWhenSortParamIsFalse() local
39 SpannableStringBuilder builder = new SpannableStringBuilder(text); in testGetSpans_sortsByPriorityEvenWhenSortParamIsFalse()
46 builder.setSpan(second, 1, text.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testGetSpans_sortsByPriorityEvenWhenSortParamIsFalse()
[all …]
/frameworks/base/core/tests/coretests/src/android/text/style/
DUnderlineSpanTest.java17 package android.text.style;
24 import android.text.SpannableString;
25 import android.text.Spanned;
26 import android.text.StaticLayout;
27 import android.text.TextPaint;
48 final SpannableString text = new SpannableString("P."); in testDoesntAffectWidth_colorUnderlineSubclass() local
49 final float origLineWidth = textWidth(text); in testDoesntAffectWidth_colorUnderlineSubclass()
51 text.setSpan(new RedUnderlineSpan(), 0, 1, Spanned.SPAN_INCLUSIVE_INCLUSIVE); in testDoesntAffectWidth_colorUnderlineSubclass()
52 final float underlinedLineWidth = textWidth(text); in testDoesntAffectWidth_colorUnderlineSubclass()
57 private float textWidth(CharSequence text) { in textWidth() argument
[all …]
/frameworks/base/core/tests/coretests/src/android/graphics/
DPaintTest.java53 public HintingTestCase(String text, float textSize, float[] widthWithoutHinting, in HintingTestCase() argument
55 mText = text; in HintingTestCase()
168 String text = "abcdef"; in testGetTextRunAdvances() local
169 assertGetTextRunAdvances(text, 0, text.length(), 0, text.length(), false, true); in testGetTextRunAdvances()
170 assertGetTextRunAdvances(text, 1, text.length() - 1, 0, text.length(), false, false); in testGetTextRunAdvances()
174 final String text = in testGetTextRunAdvances() local
179 assertGetTextRunAdvances(text, 0, text.length(), 0, text.length(), true, true); in testGetTextRunAdvances()
180 assertGetTextRunAdvances(text, 1, text.length() - 1, 0, text.length(), true, false); in testGetTextRunAdvances()
239 String text = "test"; in testGetTextRunAdvances_invalid() local
260 p.getTextRunAdvances(text, 0, text.length(), 0, text.length(), false, in testGetTextRunAdvances_invalid()
[all …]
/frameworks/opt/setupwizard/library/gingerbread/src/com/android/setupwizardlib/view/
DRichTextView.java25 import android.text.Annotation;
26 import android.text.SpannableString;
27 import android.text.Spanned;
28 import android.text.method.LinkMovementMethod;
29 import android.text.style.ClickableSpan;
30 import android.text.style.TextAppearanceSpan;
64 public static CharSequence getRichText(Context context, CharSequence text) { in getRichText() argument
65 if (text instanceof Spanned) { in getRichText()
66 final SpannableString spannable = new SpannableString(text); in getRichText()
87 return text; in getRichText()
[all …]
/frameworks/base/cmds/uiautomator/library/core-src/com/android/uiautomator/core/
DUiCollection.java53 public UiObject getChildByDescription(UiSelector childPattern, String text) in getChildByDescription() argument
55 Tracer.trace(childPattern, text); in getChildByDescription()
56 if (text != null) { in getChildByDescription()
61 if(nodeDesc != null && nodeDesc.contains(text)) { in getChildByDescription()
64 UiObject item = row.getChild(new UiSelector().descriptionContains(text)); in getChildByDescription()
70 throw new UiObjectNotFoundException("for description= \"" + text + "\""); in getChildByDescription()
111 public UiObject getChildByText(UiSelector childPattern, String text) in getChildByText() argument
113 Tracer.trace(childPattern, text); in getChildByText()
114 if (text != null) { in getChildByText()
119 if(text.equals(nodeText)) { in getChildByText()
[all …]
/frameworks/opt/calendar/src/com/android/calendarcommon2/
DICalendar.java406 private static String normalizeText(String text) { in normalizeText() argument
408 text = text.replaceAll("\r\n", "\n"); in normalizeText()
409 text = text.replaceAll("\r", "\n"); in normalizeText()
414 text = text.replaceAll("\n ", ""); in normalizeText()
416 return text; in normalizeText()
428 String text) in parseComponentImpl() argument
435 String[] lines = text.split("\n"); in parseComponentImpl()
543 String text = state.line; in extractParameter() local
544 int len = text.length(); in extractParameter()
549 char c = text.charAt(state.index); in extractParameter()
[all …]
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/test/
DRichTextViewTest.java34 import android.text.Annotation;
35 import android.text.SpannableStringBuilder;
36 import android.text.Spanned;
37 import android.text.style.TextAppearanceSpan;
61 final CharSequence text = textView.getText(); in testLinkAnnotation() local
62 assertTrue("Text should be spanned", text instanceof Spanned); in testLinkAnnotation()
64 Object[] spans = ((Spanned) text).getSpans(0, text.length(), Annotation.class); in testLinkAnnotation()
67 spans = ((Spanned) text).getSpans(0, text.length(), LinkSpan.class); in testLinkAnnotation()
88 CharSequence text = textView.getText(); in testOnLinkClickListener() local
89 LinkSpan[] spans = ((Spanned) text).getSpans(0, text.length(), LinkSpan.class); in testOnLinkClickListener()
[all …]
/frameworks/base/tools/streaming_proto/
Dmain.cpp122 write_enum(stringstream& text, const EnumDescriptorProto& enu, const string& indent) in write_enum() argument
125 text << indent << "// enum " << enu.name() << endl; in write_enum()
128 text << indent << "public static final int " in write_enum()
132 text << endl; in write_enum()
263 write_field(stringstream& text, const FieldDescriptorProto& field, const string& indent) in write_field() argument
272 text << indent << "// " << optional_comment << repeated_comment << proto_type << ' ' in write_field()
275 text << indent << "public static final long " << make_constant_name(field.name()) << " = 0x"; in write_field()
277 ios::fmtflags fmt(text.flags()); in write_field()
278 text << setfill('0') << setw(16) << hex << get_field_id(field); in write_field()
279 text.flags(fmt); in write_field()
[all …]

12345678910>>...77