Home
last modified time | relevance | path

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

12345678910>>...74

/frameworks/base/core/tests/coretests/src/android/text/method/
DWordIteratorTest.java17 package android.text.method;
27 import java.text.BreakIterator;
39 final String text = "text"; in testSetCharSequence() local
43 wordIterator.setCharSequence(text, 100, 100); in testSetCharSequence()
49 wordIterator.setCharSequence(text, -100, -100); in testSetCharSequence()
55 wordIterator.setCharSequence(text, 0, text.length()); in testSetCharSequence()
56 wordIterator.setCharSequence(text, 0, 0); in testSetCharSequence()
57 wordIterator.setCharSequence(text, text.length(), text.length()); in testSetCharSequence()
62 final String text = "aaaa bbbb cccc dddd eeee ffff gggg hhhh iiii jjjj kkkk llll mmmm nnnn"; in testWindowWidth() local
66 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;
1793 public float measureText(char[] text, int index, int count) { in measureText() argument
1794 if (text == null) { in measureText()
1797 if ((index | count) < 0 || index + count > text.length) { in measureText()
1801 if (text.length == 0 || count == 0) { in measureText()
1805 return (float) Math.ceil(nGetTextAdvances(mNativePaint, mNativeTypeface, text, in measureText()
[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/tests/coretests/src/android/widget/
DTextViewActivityMouseTest.java104 final String text = "abc def ghi."; in testContextMenu() local
106 onView(withId(R.id.textview)).perform(typeTextIntoFocusedView(text)); in testContextMenu()
111 mouseClickOnTextAtIndex(text.indexOf("d"), MotionEvent.BUTTON_SECONDARY)); in testContextMenu()
123 mouseDragOnText(text.indexOf("c"), text.indexOf("h"))); in testContextMenu()
125 mouseClickOnTextAtIndex(text.indexOf("d"), MotionEvent.BUTTON_SECONDARY)); in testContextMenu()
138 mouseClickOnTextAtIndex(text.indexOf("i"), MotionEvent.BUTTON_SECONDARY)); in testContextMenu()
148 onView(withId(R.id.textview)).check(hasInsertionPointerAtIndex(text.indexOf("i"))); in testContextMenu()
155 final String text = "abc def ghi."; in testDragAndDrop() local
157 onView(withId(R.id.textview)).perform(typeTextIntoFocusedView(text)); in testDragAndDrop()
159 mouseDragOnText(text.indexOf("d"), text.indexOf("f") + 1)); in testDragAndDrop()
[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.java65 import android.text.Selection;
66 import android.text.Spannable;
67 import android.text.InputType;
111 final String text = "\u0623\u064F\u067A\u0633\u0652"; in testPositionCursorAtTextAtIndex_arabic() local
112 onView(withId(R.id.textview)).perform(replaceText(text)); in testPositionCursorAtTextAtIndex_arabic()
130 final String text = "\u0915\u093E"; in testPositionCursorAtTextAtIndex_devanagari() local
131 onView(withId(R.id.textview)).perform(replaceText(text)); in testPositionCursorAtTextAtIndex_devanagari()
174 final String text = "\uD83D\uDE00\uD83D\uDE01\uD83D\uDE02\uD83D\uDE03"; in testLongPressAndDragToSelect_emoji() local
175 onView(withId(R.id.textview)).perform(replaceText(text)); in testLongPressAndDragToSelect_emoji()
187 final String text = "abc def ghi."; in testDragAndDrop() local
[all …]
/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/base/core/tests/coretests/src/android/view/textclassifier/
DTextClassificationManagerTest.java60 String text = "Contact me at droid@android.com"; in testSmartSelection()
63 int startIndex = text.indexOf(selected); in testSmartSelection()
65 int smartStartIndex = text.indexOf(suggested); in testSmartSelection()
68 assertThat(mClassifier.suggestSelection(text, startIndex, endIndex, LOCALES), in testSmartSelection()
76 String text = "Contact me at droid@android.com"; in testSmartSelection_nullLocaleList()
79 int startIndex = text.indexOf(selected); in testSmartSelection_nullLocaleList()
81 int smartStartIndex = text.indexOf(suggested); in testSmartSelection_nullLocaleList()
85 assertThat(mClassifier.suggestSelection(text, startIndex, endIndex, nullLocales), in testSmartSelection_nullLocaleList()
93 String text = "Visit http://www.android.com for more information"; in testSmartSelection_url()
96 int startIndex = text.indexOf(selected); in testSmartSelection_url()
[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/eclair-mr1/src/com/android/setupwizardlib/view/
DRichTextView.java24 import android.text.Annotation;
25 import android.text.SpannableString;
26 import android.text.Spanned;
27 import android.text.method.LinkMovementMethod;
28 import android.text.style.ClickableSpan;
29 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;
26 import android.text.Spannable;
27 import android.text.SpannableString;
28 import android.text.Spanned;
29 import android.text.method.LinkMovementMethod;
30 import android.text.method.MovementMethod;
31 import android.text.style.URLSpan;
32 import android.text.util.Linkify;
33 import android.text.util.Linkify.MatchFilter;
34 import android.text.util.Linkify.TransformFilter;
[all …]
/frameworks/base/core/tests/coretests/src/android/graphics/
DPaintTest.java51 public HintingTestCase(String text, float textSize, float[] widthWithoutHinting, in HintingTestCase() argument
53 mText = text; in HintingTestCase()
163 String text = "abcdef"; in testGetTextRunAdvances() local
164 assertGetTextRunAdvances(text, 0, text.length(), 0, text.length(), false, true); in testGetTextRunAdvances()
165 assertGetTextRunAdvances(text, 1, text.length() - 1, 0, text.length(), false, false); in testGetTextRunAdvances()
169 final String text = in testGetTextRunAdvances() local
174 assertGetTextRunAdvances(text, 0, text.length(), 0, text.length(), true, true); in testGetTextRunAdvances()
175 assertGetTextRunAdvances(text, 1, text.length() - 1, 0, text.length(), true, false); in testGetTextRunAdvances()
234 String text = "test"; in testGetTextRunAdvances_invalid() local
255 p.getTextRunAdvances(text, 0, text.length(), 0, text.length(), false, in testGetTextRunAdvances_invalid()
[all …]
/frameworks/base/core/java/android/view/textclassifier/
DTextClassifierImpl.java27 import android.icu.text.BreakIterator;
32 import android.text.Spannable;
33 import android.text.TextUtils;
34 import android.text.method.WordIterator;
35 import android.text.style.ClickableSpan;
36 import android.text.util.Linkify;
97 @NonNull CharSequence text, int selectionStartIndex, int selectionEndIndex, in suggestSelection()
99 validateInput(text, selectionStartIndex, selectionEndIndex); in suggestSelection()
101 if (text.length() > 0) { in suggestSelection()
103 final String string = text.toString(); in suggestSelection()
[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/base/core/java/android/text/method/
DMovementMethod.java17 package android.text.method;
19 import android.text.Spannable;
36 public void initialize(TextView widget, Spannable text); in initialize() argument
37 public boolean onKeyDown(TextView widget, Spannable text, int keyCode, KeyEvent event); in onKeyDown() argument
38 public boolean onKeyUp(TextView widget, Spannable text, int keyCode, KeyEvent event); in onKeyUp() argument
45 public boolean onKeyOther(TextView view, Spannable text, KeyEvent event); in onKeyOther() argument
47 public void onTakeFocus(TextView widget, Spannable text, int direction); in onTakeFocus() argument
48 public boolean onTrackballEvent(TextView widget, Spannable text, MotionEvent event); in onTrackballEvent() argument
49 public boolean onTouchEvent(TextView widget, Spannable text, MotionEvent event); in onTouchEvent() argument
50 public boolean onGenericMotionEvent(TextView widget, Spannable text, MotionEvent event); in onGenericMotionEvent() argument
/frameworks/base/core/java/android/view/textservice/
DTextInfo.java21 import android.text.ParcelableSpan;
22 import android.text.SpannableStringBuilder;
23 import android.text.TextUtils;
24 import android.text.style.SpellCheckSpan;
41 public TextInfo(String text) { in TextInfo() argument
42 this(text, 0, getStringLengthOrZero(text), DEFAULT_COOKIE, DEFAULT_SEQUENCE_NUMBER); in TextInfo()
51 public TextInfo(String text, int cookie, int sequenceNumber) { in TextInfo() argument
52 this(text, 0, getStringLengthOrZero(text), cookie, sequenceNumber); in TextInfo()
55 private static int getStringLengthOrZero(final String text) { in getStringLengthOrZero() argument
56 return TextUtils.isEmpty(text) ? 0 : text.length(); in getStringLengthOrZero()
/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()
49 final float px = text.getTextSize(); in add()
51 mTexts.put(text, sp); in add()
52 text.addOnAttachStateChangeListener(new OnAttachStateChangeListener() { in add()
59 setTextSizeH(text, sp); in add()
62 mTextLabels.put(text, labelResId); in add()
71 private void setTextSizeH(TextView text, int sp) { in setTextSizeH() argument
[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>>...74