Home
last modified time | relevance | path

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

12345678910>>...94

/frameworks/base/core/tests/coretests/src/android/text/method/
DWordIteratorTest.java17 package android.text.method;
32 import java.text.BreakIterator;
154 final String text = "text"; in testSetCharSequence() local
158 wordIterator.setCharSequence(text, 100, 100); in testSetCharSequence()
164 wordIterator.setCharSequence(text, -100, -100); in testSetCharSequence()
170 wordIterator.setCharSequence(text, 0, text.length()); in testSetCharSequence()
171 wordIterator.setCharSequence(text, 0, 0); in testSetCharSequence()
172 wordIterator.setCharSequence(text, text.length(), text.length()); in testSetCharSequence()
177 final String text = "aaaa bbbb cccc dddd eeee ffff gggg hhhh iiii jjjj kkkk llll mmmm nnnn"; in testWindowWidth() local
181 wordIterator.setCharSequence(text, text.indexOf('n'), text.length()); in testWindowWidth()
[all …]
/frameworks/base/core/java/android/text/
DSelection.java17 package android.text;
22 import java.text.BreakIterator;
40 public static final int getSelectionStart(CharSequence text) { in getSelectionStart() argument
41 if (text instanceof Spanned) { in getSelectionStart()
42 return ((Spanned) text).getSpanStart(SELECTION_START); in getSelectionStart()
51 public static final int getSelectionEnd(CharSequence text) { in getSelectionEnd() argument
52 if (text instanceof Spanned) { in getSelectionEnd()
53 return ((Spanned) text).getSpanStart(SELECTION_END); in getSelectionEnd()
58 private static int getSelectionMemory(CharSequence text) { in getSelectionMemory() argument
59 if (text instanceof Spanned) { in getSelectionMemory()
[all …]
DHtml.java17 package android.text;
27 import android.text.style.AbsoluteSizeSpan;
28 import android.text.style.AlignmentSpan;
29 import android.text.style.BackgroundColorSpan;
30 import android.text.style.BulletSpan;
31 import android.text.style.CharacterStyle;
32 import android.text.style.ForegroundColorSpan;
33 import android.text.style.ImageSpan;
34 import android.text.style.ParagraphStyle;
35 import android.text.style.QuoteSpan;
[all …]
/frameworks/base/tools/streaming_proto/cpp/
Dmain.cpp22 write_enum(stringstream& text, const EnumDescriptorProto& enu, const string& indent) in write_enum() argument
25 text << indent << "// enum " << enu.name() << endl; in write_enum()
28 text << indent << "const int " in write_enum()
36 text << indent << "static const int _ENUM_" << name << "_COUNT = " << N << ";" << endl; in write_enum()
37 text << indent << "static const char* _ENUM_" << name << "_NAMES[" << N << "] = {" << endl; in write_enum()
39text << indent << INDENT << "\"" << stripPrefix(enu.value(i).name(), prefix) << "\"," << endl; in write_enum()
41 text << indent << "};" << endl; in write_enum()
42 text << indent << "static const int _ENUM_" << name << "_VALUES[" << N << "] = {" << endl; in write_enum()
44 text << indent << INDENT << make_constant_name(enu.value(i).name()) << "," << endl; in write_enum()
46 text << indent << "};" << endl; in write_enum()
[all …]
/frameworks/minikin/tests/unittest/
DLayoutTest.cpp39 static void getBounds(const U16StringPiece& text, Bidi bidiFlags, const MinikinPaint& paint, in getBounds() argument
41 getBounds(text, Range(0, text.size()), bidiFlags, paint, StartHyphenEdit::NO_EDIT, in getBounds()
64 std::vector<uint16_t> text; in TEST_F() local
69 text = utf8ToUtf16("oneword"); in TEST_F()
70 Range range(0, text.size()); in TEST_F()
71 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
75 getBounds(text, Bidi::LTR, paint, &rect); in TEST_F()
80 expectedValues.resize(text.size()); in TEST_F()
88 text = utf8ToUtf16("two words"); in TEST_F()
89 Range range(0, text.size()); in TEST_F()
[all …]
DMeasuredTextTest.cpp46 std::vector<uint16_t> text(CHAR_COUNT, 'a'); in TEST() local
49 builder.build(text, true /* compute hyphenation */, false /* compute full layout */, in TEST()
62 auto text = utf8ToUtf16("Hello, World!"); in TEST() local
68 builder.addStyleRun(0, text.size(), std::move(paint), false /* is RTL */); in TEST()
69 auto mt = builder.build(text, true /* hyphenation */, true /* full layout */, in TEST()
72 EXPECT_EQ(MinikinRect(0.0f, 0.0f, 0.0f, 0.0f), mt->getBounds(text, Range(0, 0))); in TEST()
73 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 10.0f, 0.0f), mt->getBounds(text, Range(0, 1))); in TEST()
74 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 20.0f, 0.0f), mt->getBounds(text, Range(0, 2))); in TEST()
75 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 10.0f, 0.0f), mt->getBounds(text, Range(1, 2))); in TEST()
76 EXPECT_EQ(MinikinRect(0.0f, 10.0f, 130.0f, 0.0f), mt->getBounds(text, Range(0, text.size()))); in TEST()
[all …]
DBidiUtilsTest.cpp33 auto text = utf8ToUtf16(LTR_1); in TEST() local
34 uint32_t ltrLength = text.size(); in TEST()
36 BidiText bidiText(text, Range(0, ltrLength), Bidi::LTR); in TEST()
45 BidiText bidiText(text, Range(0, ltrLength), Bidi::RTL); in TEST()
54 BidiText bidiText(text, Range(0, ltrLength), Bidi::DEFAULT_LTR); in TEST()
63 BidiText bidiText(text, Range(0, ltrLength), Bidi::DEFAULT_RTL); in TEST()
72 BidiText bidiText(text, Range(0, ltrLength), Bidi::FORCE_LTR); in TEST()
81 BidiText bidiText(text, Range(0, ltrLength), Bidi::FORCE_RTL); in TEST()
92 auto text = utf8ToUtf16(RTL_1); in TEST() local
93 uint32_t rtlLength = text.size(); in TEST()
[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 …]
/frameworks/base/tools/powermodel/test/com/android/powermodel/
DCsvParserTest.java62 final String text = ""; in testEmpty() local
63 System.out.println("Test: [" + text + "]"); in testEmpty()
64 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testEmpty()
74 final String text = "\n"; in testOnlyNewline() local
75 System.out.println("Test: [" + text + "]"); in testOnlyNewline()
76 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testOnlyNewline()
86 final String text = "one,twoo,3\nfour,5,six\n"; in testTwoLines() local
87 System.out.println("Test: [" + text + "]"); in testTwoLines()
88 final InputStream is = new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8)); in testTwoLines()
101 final String text = "\"\",\"\",\"\"\n"; in testEscapedEmpty() local
[all …]
/frameworks/base/apct-tests/perftests/core/src/android/text/
DStaticLayoutPerfTest.java17 package android.text;
56 private PrecomputedText makeMeasured(CharSequence text, TextPaint paint) { in makeMeasured() argument
58 return PrecomputedText.create(text, param); in makeMeasured()
61 private PrecomputedText makeMeasured(CharSequence text, TextPaint paint, int strategy, in makeMeasured() argument
65 return PrecomputedText.create(text, param); in makeMeasured()
71 final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT); in testCreate_FixedText_NoStyle_Greedy_NoHyphenation() local
73 StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH) in testCreate_FixedText_NoStyle_Greedy_NoHyphenation()
85 final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT); in testCreate_RandomText_NoStyled_Greedy_NoHyphenation() local
88 StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH) in testCreate_RandomText_NoStyled_Greedy_NoHyphenation()
100 final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT); in testCreate_RandomText_NoStyled_Greedy_Hyphenation() local
[all …]
/frameworks/base/tools/stringslint/
Dstringslint.py103 elif tag.text:
104 yield decode_escapes(tag.text)
133 text = "".join(child.itertext())
141 if "do not translate" in comment.text.lower():
153 limit = re.search("CHAR[ _-]LIMIT=(\d+|NONE|none)", comment.text)
164 if "'" in text:
166 text, "This doesn\u2019t need to \u2018happen\u2019 today")
167 if '"' in text and not text.startswith('"') and text.endswith('"'):
169 text, "This needs to \u201chappen\u201d today")
170 if "..." in text:
[all …]
/frameworks/base/telephony/java/android/telephony/
DJapanesePhoneNumberFormatter.java20 import android.text.Editable;
159 public static void format(Editable text) { in format() argument
164 int length = text.length(); in format()
166 && text.subSequence(0, 3).toString().equals("+81")) { in format()
168 } else if (length < 1 || text.charAt(0) != '0') { in format()
172 CharSequence saved = text.subSequence(0, length); in format()
176 while (i < text.length()) { in format()
177 if (text.charAt(i) == '-') { in format()
178 text.delete(i, i + 1); in format()
184 length = text.length(); in format()
[all …]
/frameworks/base/core/java/com/google/android/util/
DAbstractMessageParser.java71 private String text; field in AbstractMessageParser
90 public AbstractMessageParser(String text) { in AbstractMessageParser() argument
91 this(text, true, true, true, true, true, true); in AbstractMessageParser()
100 public AbstractMessageParser(String text, boolean parseSmilies, in AbstractMessageParser() argument
103 this.text = text; in AbstractMessageParser()
118 public final String getRawText() { return text; } in getRawText()
140 if (parseMeText && text.startsWith("/me") && (text.length() > 3) && in parse()
141 Character.isWhitespace(text.charAt(3))) { in parse()
142 meText = text.substring(0, 4); in parse()
143 text = text.substring(4); in parse()
[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() function
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/tests/coretests/src/android/widget/
DTextViewActivityMouseTest.java108 final String text = "abc def ghi."; in testContextMenu() local
110 onView(withId(R.id.textview)).perform(replaceText(text)); in testContextMenu()
115 mouseClickOnTextAtIndex(text.indexOf("d"), MotionEvent.BUTTON_SECONDARY)); in testContextMenu()
128 mouseClickOnTextAtIndex(text.indexOf("."))); in testContextMenu()
132 mouseClickOnTextAtIndex(text.indexOf("d"), MotionEvent.BUTTON_SECONDARY)); in testContextMenu()
144 mouseDragOnText(text.indexOf("c"), text.indexOf("h"))); in testContextMenu()
146 mouseClickOnTextAtIndex(text.indexOf("d"), MotionEvent.BUTTON_SECONDARY)); in testContextMenu()
159 mouseClickOnTextAtIndex(text.indexOf("i"), MotionEvent.BUTTON_SECONDARY)); in testContextMenu()
169 onView(withId(R.id.textview)).check(hasInsertionPointerAtIndex(text.indexOf("i"))); in testContextMenu()
176 final String text = "abc def ghi."; in testDragAndDrop() local
[all …]
DSuggestionsPopupWindowTest.java49 import android.text.Selection;
50 import android.text.Spannable;
51 import android.text.Spanned;
52 import android.text.TextPaint;
53 import android.text.style.SuggestionSpan;
54 import android.text.style.TextAppearanceSpan;
84 final Spannable text = (Spannable) textView.getText(); in setSuggestionSpan() local
85 text.setSpan(span, start, end, Spanned.SPAN_INCLUSIVE_INCLUSIVE); in setSuggestionSpan()
86 Selection.setSelection(text, (start + end) / 2); in setSuggestionSpan()
93 final String text = "abc def ghi"; in testOnTextContextMenuItem() local
[all …]
/frameworks/base/tools/streaming_proto/java/
Dmain.cpp76 write_enum(stringstream& text, const EnumDescriptorProto& enu, const string& indent) in write_enum() argument
79 text << indent << "// enum " << enu.name() << endl; in write_enum()
82 text << indent << "public static final int " in write_enum()
86 text << endl; in write_enum()
93 write_field(stringstream& text, const FieldDescriptorProto& field, const string& indent) in write_field() argument
102 text << indent << "// " << optional_comment << repeated_comment << proto_type << ' ' in write_field()
105 text << indent << "public static final long " << make_constant_name(field.name()) << " = 0x"; in write_field()
107 ios::fmtflags fmt(text.flags()); in write_field()
108 text << setfill('0') << setw(16) << hex << get_field_id(field); in write_field()
109 text.flags(fmt); in write_field()
[all …]
/frameworks/base/core/tests/coretests/src/android/view/textclassifier/
DTextClassifierUtilsTest.java35 final String text = "Yakuza call themselves 任侠団体"; in testGetSubString() local
41 start = text.indexOf("任侠団体"); in testGetSubString()
42 end = text.length(); in testGetSubString()
44 assertThat(TextClassifier.Utils.getSubString(text, start, end, minimumLength)) in testGetSubString()
51 assertThat(TextClassifier.Utils.getSubString(text, start, end, minimumLength)) in testGetSubString()
55 start = text.indexOf("all"); in testGetSubString()
58 assertThat(TextClassifier.Utils.getSubString(text, start, end, minimumLength)) in testGetSubString()
62 start = text.indexOf("themselves"); in testGetSubString()
65 assertThat(TextClassifier.Utils.getSubString(text, start, end, minimumLength)) in testGetSubString()
69 minimumLength = text.length() + 1; in testGetSubString()
[all …]
/frameworks/base/graphics/java/android/graphics/
DPaint.java31 import android.text.GraphicsOperations;
32 import android.text.SpannableString;
33 import android.text.SpannedString;
34 import android.text.TextUtils;
2213 public float measureText(char[] text, int index, int count) { in measureText() argument
2214 if (text == null) { in measureText()
2217 if ((index | count) < 0 || index + count > text.length) { in measureText()
2221 if (text.length == 0 || count == 0) { in measureText()
2225 return (float) Math.ceil(nGetTextAdvances(mNativePaint, text, in measureText()
2231 final float w = nGetTextAdvances(mNativePaint, text, index, count, index, count, in measureText()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
DConfigurableTexts.java40 public int add(final TextView text) { in add() argument
41 return add(text, -1); in add()
44 public int add(final TextView text, final int labelResId) { in add() argument
45 if (text == null) return 0; in add()
46 if (mTexts.containsKey(text)) { in add()
47 return mTexts.get(text); in add()
52 final float px = text.getTextSize(); in add()
54 mTexts.put(text, sp); in add()
55 text.addOnAttachStateChangeListener(new OnAttachStateChangeListener() { in add()
62 setTextSizeH(text, sp); in add()
[all …]
/frameworks/base/core/java/android/text/format/
DRelativeDateTimeFormatter.java17 package android.text.format;
19 import static android.text.format.DateUtils.FORMAT_ABBREV_ALL;
20 import static android.text.format.DateUtils.FORMAT_ABBREV_MONTH;
21 import static android.text.format.DateUtils.FORMAT_ABBREV_RELATIVE;
22 import static android.text.format.DateUtils.FORMAT_NO_YEAR;
23 import static android.text.format.DateUtils.FORMAT_NUMERIC_DATE;
24 import static android.text.format.DateUtils.FORMAT_SHOW_DATE;
25 import static android.text.format.DateUtils.FORMAT_SHOW_TIME;
26 import static android.text.format.DateUtils.FORMAT_SHOW_YEAR;
30 import android.icu.text.DisplayContext;
[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/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.MovementMethod;
24 import android.text.style.ClickableSpan;
25 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()
88 return text; in getRichText()
[all …]
/frameworks/base/core/java/com/android/internal/util/
DXmlSerializerWrapper.java104 public XmlSerializer text(String text) throws IOException{ in text() argument
105 return mWrapped.text(text); in text()
108 public XmlSerializer text(char[] buf, int start, int len) throws IOException { in text() method in XmlSerializerWrapper
109 return mWrapped.text(buf, start, len); in text()
112 public void cdsect(String text) in cdsect() argument
114 mWrapped.cdsect(text); in cdsect()
117 public void entityRef(String text) throws IOException { in entityRef() argument
118 mWrapped.entityRef(text); in entityRef()
121 public void processingInstruction(String text) throws IOException { in processingInstruction() argument
122 mWrapped.processingInstruction(text); in processingInstruction()
[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()
223 char[] text = "test".toCharArray(); in testGetTextRunAdvances_invalid() local
232 p.getTextRunAdvances(text, 0, text.length, 0, text.length, false, in testGetTextRunAdvances_invalid()
[all …]

12345678910>>...94