Home
last modified time | relevance | path

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

12345678910>>...33

/packages/apps/Email/tests/src/com/android/emailcommon/utility/
DTextUtilitiesTests.java26 import android.text.SpannableStringBuilder;
27 import android.text.style.BackgroundColorSpan;
142 private void findTagEnd(String text, String tag) { in findTagEnd() argument
143 int calculatedEnd = TextUtilities.findTagEnd(text , tag, 0); in findTagEnd()
144 int knownEnd = text.indexOf('@') + 2; in findTagEnd()
198 String text = "This< should be visibl>e"; in testHighlightSingleTermText() local
201 (SpannableStringBuilder)TextUtilities.highlightTermsInText(text, "Visi"); in testHighlightSingleTermText()
205 assertEquals(text.indexOf("visi"), ssb.getSpanStart(span)); in testHighlightSingleTermText()
206 assertEquals(text.indexOf("bl>e"), ssb.getSpanEnd(span)); in testHighlightSingleTermText()
208 assertEquals(text, ssb.toString()); in testHighlightSingleTermText()
[all …]
/packages/apps/Mms/src/com/android/mms/
DMmsConfig.java296 String text = null; in loadMmsSettings() local
298 text = parser.getText(); in loadMmsSettings()
303 text); in loadMmsSettings()
309 mMmsEnabled = "true".equalsIgnoreCase(text) ? 1 : 0; in loadMmsSettings()
311 mTransIdEnabled = "true".equalsIgnoreCase(text); in loadMmsSettings()
313 mNotifyWapMMSC = "true".equalsIgnoreCase(text); in loadMmsSettings()
315 mAliasEnabled = "true".equalsIgnoreCase(text); in loadMmsSettings()
317 mAllowAttachAudio = "true".equalsIgnoreCase(text); in loadMmsSettings()
319 mEnableMultipartSMS = "true".equalsIgnoreCase(text); in loadMmsSettings()
321 mEnableSlideDuration = "true".equalsIgnoreCase(text); in loadMmsSettings()
[all …]
/packages/apps/Contacts/src/com/android/contacts/format/
DFormatUtils.java20 import android.text.SpannableString;
21 import android.text.style.StyleSpan;
109 SpannableString text = new SpannableString(input); in applyStyleToSpan() local
110 text.setSpan(new StyleSpan(style), start, end, flags); in applyStyleToSpan()
111 return text; in applyStyleToSpan()
115 public static void copyToCharArrayBuffer(String text, CharArrayBuffer buffer) { in copyToCharArrayBuffer() argument
116 if (text != null) { in copyToCharArrayBuffer()
118 if (data == null || data.length < text.length()) { in copyToCharArrayBuffer()
119 buffer.data = text.toCharArray(); in copyToCharArrayBuffer()
121 text.getChars(0, text.length(), data, 0); in copyToCharArrayBuffer()
[all …]
DPrefixHighlighter.java19 import android.text.SpannableString;
20 import android.text.style.ForegroundColorSpan;
42 public void setText(TextView view, String text, char[] prefix) { in setText() argument
43 view.setText(apply(text, prefix)); in setText()
52 public CharSequence apply(CharSequence text, char[] prefix) { in apply() argument
53 int index = FormatUtils.indexOfWordPrefix(text, prefix); in apply()
59 SpannableString result = new SpannableString(text); in apply()
63 return text; in apply()
/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/keyboard/internal/
DKeySpecParser.java21 import android.text.TextUtils;
81 private static String parseEscape(final String text) { in parseEscape() argument
82 if (text.indexOf(ESCAPE_CHAR) < 0) { in parseEscape()
83 return text; in parseEscape()
85 final int length = text.length(); in parseEscape()
88 final char c = text.charAt(pos); in parseEscape()
92 sb.append(text.charAt(pos)); in parseEscape()
194 public static int parseCode(final String text, final KeyboardCodesSet codesSet, in parseCode() argument
196 if (text == null) return defCode; in parseCode()
197 if (text.startsWith(PREFIX_CODE)) { in parseCode()
[all …]
/packages/apps/Email/src/org/apache/james/mime4j/codec/
DEncoderUtil.java194 public static String encodeIfNecessary(String text, Usage usage, in encodeIfNecessary() argument
196 if (hasToBeEncoded(text, usedCharacters)) in encodeIfNecessary()
197 return encodeEncodedWord(text, usage, usedCharacters); in encodeIfNecessary()
199 return text; in encodeIfNecessary()
216 public static boolean hasToBeEncoded(String text, int usedCharacters) { in hasToBeEncoded() argument
217 if (text == null) in hasToBeEncoded()
224 for (int idx = 0; idx < text.length(); idx++) { in hasToBeEncoded()
225 char ch = text.charAt(idx); in hasToBeEncoded()
268 public static String encodeEncodedWord(String text, Usage usage) { in encodeEncodedWord() argument
269 return encodeEncodedWord(text, usage, 0, null, null); in encodeEncodedWord()
[all …]
/packages/apps/Calculator/src/com/android/calculator2/
DCalculatorDisplay.java21 import android.text.Editable;
22 import android.text.InputType;
23 import android.text.Spanned;
24 import android.text.method.NumberKeyListener;
86 EditText text = (EditText) getChildAt(i); in setLogic() local
87 text.setBackground(null); in setLogic()
88 text.setEditableFactory(factory); in setLogic()
89 text.setKeyListener(calculatorKeyListener); in setLogic()
90 text.setSingleLine(); in setLogic()
124 EditText text = (EditText) getCurrentView(); in getText() local
[all …]
DLogic.java21 import android.text.TextUtils;
120 String text = mHistory.getText(); in clearWithHistory() local
121 if (MARKER_EVALUATE_ON_RESUME.equals(text)) { in clearWithHistory()
123 text = ""; in clearWithHistory()
125 text = mHistory.getText(); in clearWithHistory()
126 evaluateAndShowResult(text, CalculatorDisplay.Scroll.NONE); in clearWithHistory()
130 text, scroll ? CalculatorDisplay.Scroll.UP : CalculatorDisplay.Scroll.NONE); in clearWithHistory()
150 String text = getText(); in acceptInsert() local
152 (!mResult.equals(text) || in acceptInsert()
154 mDisplay.getSelectionStart() != text.length()); in acceptInsert()
[all …]
DCalculatorEditable.java19 import android.text.SpannableStringBuilder;
20 import android.text.Editable;
62 char text = delta.charAt(0); in internalReplace() local
65 if (text == '.') { in internalReplace()
78 if (text == Logic.MINUS && prevChar == Logic.MINUS) { in internalReplace()
83 if (Logic.isOperator(text)) { in internalReplace()
85 (text != Logic.MINUS || prevChar == '+')) { in internalReplace()
92 if (start == 0 && Logic.isOperator(text) && text != Logic.MINUS) { in internalReplace()
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DStringTexture.java24 import android.text.TextPaint;
25 import android.text.TextUtils;
37 private StringTexture(String text, TextPaint paint, in StringTexture() argument
40 mText = text; in StringTexture()
55 String text, float textSize, int color) { in newInstance() argument
56 return newInstance(text, getDefaultPaint(textSize, color)); in newInstance()
60 String text, float textSize, int color, in newInstance() argument
67 text = TextUtils.ellipsize( in newInstance()
68 text, paint, lengthLimit, TextUtils.TruncateAt.END).toString(); in newInstance()
70 return newInstance(text, paint); in newInstance()
[all …]
DMultiLineTexture.java21 import android.text.Layout;
22 import android.text.StaticLayout;
23 import android.text.TextPaint;
38 String text, int maxWidth, float textSize, int color, in newInstance() argument
41 Layout layout = new StaticLayout(text, 0, text.length(), paint, in newInstance()
/packages/apps/Mms/src/com/android/mms/ui/
DRecipientsEditor.java26 import android.text.Annotation;
27 import android.text.Editable;
28 import android.text.Layout;
29 import android.text.Spannable;
30 import android.text.SpannableString;
31 import android.text.Spanned;
32 import android.text.TextUtils;
33 import android.text.TextWatcher;
34 import android.text.util.Rfc822Token;
35 import android.text.util.Rfc822Tokenizer;
[all …]
/packages/apps/Contacts/src/com/android/contacts/util/
DHtmlUtils.java21 import android.text.Html;
22 import android.text.Html.ImageGetter;
23 import android.text.Html.TagHandler;
24 import android.text.SpannableStringBuilder;
25 import android.text.Spanned;
26 import android.text.TextUtils;
27 import android.text.style.ImageSpan;
28 import android.text.style.QuoteSpan;
44 public static Spanned fromHtml(Context context, String text) { in fromHtml() argument
45 if (TextUtils.isEmpty(text)) { in fromHtml()
[all …]
/packages/apps/Email/emailcommon/src/com/android/emailcommon/utility/
DTextUtilities.java22 import android.text.Spannable;
23 import android.text.SpannableString;
24 import android.text.SpannableStringBuilder;
25 import android.text.TextUtils;
26 import android.text.style.BackgroundColorSpan;
329 public static String makeSnippetFromHtmlText(String text) { in makeSnippetFromHtmlText() argument
330 return makeSnippetFromText(text, true); in makeSnippetFromHtmlText()
333 public static String makeSnippetFromPlainText(String text) { in makeSnippetFromPlainText() argument
334 return makeSnippetFromText(text, false); in makeSnippetFromPlainText()
364 public static String makeSnippetFromText(String text, boolean stripHtml) { in makeSnippetFromText() argument
[all …]
DConversionUtilities.java25 import android.text.TextUtils;
73 String text = MimeUtility.getTextFromPart(viewable); in updateBodyFields() local
89 sbHtmlReply = appendTextPart(sbHtmlReply, text); in updateBodyFields()
91 sbTextReply = appendTextPart(sbTextReply, text); in updateBodyFields()
101 sbIntroText = appendTextPart(sbIntroText, text); in updateBodyFields()
108 sbHtml = appendTextPart(sbHtml, text); in updateBodyFields()
110 sbText = appendTextPart(sbText, text); in updateBodyFields()
116 String text = sbText.toString(); in updateBodyFields() local
117 body.mTextContent = text; in updateBodyFields()
118 localMessage.mSnippet = TextUtilities.makeSnippetFromPlainText(text); in updateBodyFields()
[all …]
/packages/apps/Contacts/src/com/android/contacts/
DPhoneCallDetailsHelper.java23 import android.text.SpannableString;
24 import android.text.Spanned;
25 import android.text.TextUtils;
26 import android.text.format.DateUtils;
27 import android.text.style.ForegroundColorSpan;
28 import android.text.style.StyleSpan;
167 final CharSequence text; in setCallCountAndDate() local
169 text = mResources.getString( in setCallCountAndDate()
172 text = dateText; in setCallCountAndDate()
178 formattedText = addBoldAndColor(text, highlightColor); in setCallCountAndDate()
[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 …]
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
DSuggestionFormatter.java19 import android.text.Spannable;
42 protected void applyQueryTextStyle(Spannable text, int start, int end) { in applyQueryTextStyle() argument
44 setSpans(text, start, end, mSpanFactory.createSuggestionQueryTextAppearance()); in applyQueryTextStyle()
47 protected void applySuggestedTextStyle(Spannable text, int start, int end) { in applySuggestedTextStyle() argument
49 setSpans(text, start, end, mSpanFactory.createSuggestionSuggestedTextAppearance()); in applySuggestedTextStyle()
52 private void setSpans(Spannable text, int start, int end, Object[] spans) { in setSpans() argument
54 text.setSpan(span, start, end, 0); in setSpans()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/spellcheck/
DAndroidWordLevelSpellCheckerSession.java23 import android.text.TextUtils;
164 private static boolean shouldFilterOut(final String text, final int script) { in shouldFilterOut() argument
165 if (TextUtils.isEmpty(text) || text.length() <= 1) return true; in shouldFilterOut()
170 final int firstCodePoint = text.codePointAt(0); in shouldFilterOut()
176 final int length = text.length(); in shouldFilterOut()
178 for (int i = 0; i < length; i = text.offsetByCodePoints(i, 1)) { in shouldFilterOut()
179 final int codePoint = text.codePointAt(i); in shouldFilterOut()
235 final String text = inText.replaceAll( in onGetSuggestions() local
243 text, suggestionsLimit); in onGetSuggestions()
245 final int length = text.length(); in onGetSuggestions()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/compat/
DSuggestionSpanUtils.java20 import android.text.Spannable;
21 import android.text.SpannableString;
22 import android.text.Spanned;
23 import android.text.TextUtils;
86 Context context, CharSequence text) { in getTextWithAutoCorrectionIndicatorUnderline() argument
87 if (TextUtils.isEmpty(text) || CONSTRUCTOR_SuggestionSpan == null in getTextWithAutoCorrectionIndicatorUnderline()
90 return text; in getTextWithAutoCorrectionIndicatorUnderline()
92 final Spannable spannable = text instanceof Spannable in getTextWithAutoCorrectionIndicatorUnderline()
93 ? (Spannable) text : new SpannableString(text); in getTextWithAutoCorrectionIndicatorUnderline()
100 return text; in getTextWithAutoCorrectionIndicatorUnderline()
[all …]
/packages/apps/Email/src/com/android/email/mail/internet/
DEmailHtmlUtil.java34 public static String escapeCharacterToDisplay(String text) { in escapeCharacterToDisplay() argument
36 Matcher match = pattern.matcher(text); in escapeCharacterToDisplay()
43 out.append(text.substring(end, start)); in escapeCharacterToDisplay()
45 int c = text.codePointAt(start); in escapeCharacterToDisplay()
62 out.append(text.substring(end)); in escapeCharacterToDisplay()
63 text = out.toString(); in escapeCharacterToDisplay()
65 return text; in escapeCharacterToDisplay()
/packages/apps/Contacts/tests/src/com/android/contacts/util/
DHtmlUtilsTest.java22 import android.text.SpannableStringBuilder;
23 import android.text.Spanned;
24 import android.text.SpannedString;
25 import android.text.style.ImageSpan;
26 import android.text.style.QuoteSpan;
54 private final void checkTrimNewLines(String expectedString, CharSequence text) { in checkTrimNewLines() argument
57 HtmlUtils.postprocess(getContext(), new SpannedString(text)).toString()); in checkTrimNewLines()
60 HtmlUtils.postprocess(getContext(), new SpannableStringBuilder(text)).toString()); in checkTrimNewLines()
/packages/inputmethods/OpenWnn/src/jp/co/omronsoft/openwnn/EN/
DTutorialEN.java41 import android.text.Layout;
42 import android.text.SpannableStringBuilder;
43 import android.text.StaticLayout;
44 import android.text.Spanned;
45 import android.text.style.ImageSpan;
46 import android.text.style.DynamicDrawableSpan;
87 CharSequence text; field in TutorialEN.Bubble
97 CharSequence text = context.getResources().getText(description); in Bubble() local
98 init(context, inputView, backgroundResource, bx, by, text, guide, false); in Bubble()
113 text = new SpannableStringBuilder() in init()
[all …]
/packages/apps/Browser/tools/
Dget_search_engines.py180 text = []
184 text.append(' <string-array name="%s" translatable="false">\n' % (engine_data[0]))
186 text.append(' <item>%s</item>\n' % (engine_data[i]))
187 text.append(' </string-array>\n')
191 all_search_engines_path, text)
230 text = []
231 text.append(' <string-array name="search_engines" translatable="false">\n');
235 text.append(' <item>%s</item>\n' % (name))
236 text.append(' </string-array>\n');
240 text)
[all …]

12345678910>>...33