/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/ |
H A D | SpannableStringUtils.java | 19 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; 70 public static CharSequence concatWithNonParagraphSuggestionSpansOnly(CharSequence... text) { argument 71 if (text.length == 0) { 75 if (text.length == 1) { 76 return text[ [all...] |
H A D | CsvUtils.java | 72 * Find the first non-space character in the text. 74 * @param text the text to be searched. 77 * <code>text</code> that is greater than or equal to <code>fromIndex</code>, or the length of 78 * the <code>text</code> if the character does not occur. 80 private static int indexOfNonSpace(final String text, final int fromIndex) { argument 81 final int length = text.length(); 83 throw new IllegalArgumentException("text=" + text + " fromIndex=" + fromIndex); 86 while (index < length && text 103 lastIndexOfNonSpace(final String text, final int fromIndex, final int toIndex) argument 124 indexOfSeparatorComma(final String text, final int fromIndex) argument 159 unescapeField(final String text) argument 240 escapeField(final String text, final boolean alwaysQuoted) argument [all...] |
H A D | StringUtils.java | 23 import android.text.TextUtils; 46 public static int codePointCount(final String text) { argument 47 if (TextUtils.isEmpty(text)) return 0; 48 return text.codePointCount(0, text.length()); 61 public static boolean containsInArray(final String text, final String[] array) { argument 63 if (text.equals(element)) return true; 70 * Unlike CSV, Comma-Splittable Text has no escaping mechanism, so that the text can't contain 75 public static boolean containsInCommaSplittableText(final String text, argument 80 return containsInArray(text, extraValue 83 appendToCommaSplittableTextIfNotExists(final String text, final String extraValues) argument 94 removeFromCommaSplittableTextIfExists(final String text, final String extraValues) argument 180 getCapitalizationType(final String text) argument 216 isIdenticalAfterUpcase(final String text) argument 229 isIdenticalAfterDowncase(final String text) argument 243 looksValidForDictionaryInsertion(final CharSequence text, final SettingsValues settings) argument 267 isIdenticalAfterCapitalizeEachWord(final String text, final String separators) argument 287 capitalizeEachWord(final String text, final String separators, final Locale locale) argument 322 lastPartLooksLikeURL(final CharSequence text) argument [all...] |
H A D | TextRange.java | 19 import android.text.Spanned; 20 import android.text.style.SuggestionSpan; 25 * Represents a range of text, relative to the current cursor position. 56 final Spanned text = (Spanned)mTextAtCursor; 74 final SuggestionSpan[] spans = text.getSpans(mWordAtCursorStartIndex - 1, 85 int spanStart = text.getSpanStart(span); 86 int spanEnd = text.getSpanEnd(span); 91 spanStart = Math.min(spanStart, text.getSpanStart(spans[i])); 92 spanEnd = Math.max(spanEnd, text.getSpanEnd(spans[i]));
|
/packages/apps/ContactsCommon/src/com/android/contacts/common/format/ |
H A D | TextHighlighter.java | 20 import android.text.SpannableString; 21 import android.text.style.CharacterStyle; 22 import android.text.style.ForegroundColorSpan; 23 import android.text.style.StyleSpan; 29 * Highlights the text in a text field. 45 * Sets the text on the given text view, highlighting the word that matches the given prefix. 47 * @param view the view on which to set the text 48 * @param text th 51 setPrefixText(TextView view, String text, String prefix) argument 65 applyMaskingHighlight(SpannableString text, int start, int end) argument 76 applyPrefixHighlight(CharSequence text, String prefix) argument [all...] |
H A D | FormatUtils.java | 20 import android.text.SpannableString; 21 import android.text.style.StyleSpan; 28 * Assorted utility methods related to text formatting in Contacts. 99 * @param flags Bitmask for configuring behavior of the span. See {@link android.text.Spanned}. 107 SpannableString text = new SpannableString(input); 108 text.setSpan(new StyleSpan(style), start, end, flags); 109 return text; 113 public static void copyToCharArrayBuffer(String text, CharArrayBuffer buffer) { argument 114 if (text != null) { 116 if (data == null || data.length < text 141 indexOfWordPrefix(CharSequence text, String prefix) argument [all...] |
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
H A D | SuggestionFormatter.java | 19 import android.text.Spannable; 38 * @return Formatted suggestion text. 42 protected void applyQueryTextStyle(Spannable text, int start, int end) { argument 44 setSpans(text, start, end, mSpanFactory.createSuggestionQueryTextAppearance()); 47 protected void applySuggestedTextStyle(Spannable text, int start, int end) { argument 49 setSpans(text, start, end, mSpanFactory.createSuggestionSuggestedTextAppearance()); 52 private void setSpans(Spannable text, int start, int end, Object[] spans) { argument 54 text.setSpan(span, start, end, 0);
|
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ |
H A D | EllipsizedMultilineTextView.java | 21 import android.text.Layout; 22 import android.text.Layout.Alignment; 23 import android.text.SpannableStringBuilder; 24 import android.text.Spanned; 25 import android.text.StaticLayout; 26 import android.text.TextUtils; 32 * line of text, such that the last line may be shorter than any previous lines. 54 * Ellipsize just the last line of text in this view and set the text to the 56 * @param text Tex 62 setText(final CharSequence text, int avail) argument [all...] |
/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/ |
H A D | StringTexture.java | 24 import android.text.TextPaint; 25 import android.text.TextUtils; 37 private StringTexture(String text, TextPaint paint, argument 40 mText = text; 55 String text, float textSize, int color) { 56 return newInstance(text, getDefaultPaint(textSize, color)); 60 String text, float textSize, int color, 67 text = TextUtils.ellipsize( 68 text, paint, lengthLimit, TextUtils.TruncateAt.END).toString(); 70 return newInstance(text, pain 54 newInstance( String text, float textSize, int color) argument 59 newInstance( String text, float textSize, int color, float lengthLimit, boolean isBold) argument 73 newInstance(String text, TextPaint paint) argument [all...] |
H A D | MultiLineTexture.java | 21 import android.text.Layout; 22 import android.text.StaticLayout; 23 import android.text.TextPaint; 39 String text, int maxWidth, float textSize, int color, 42 Layout layout = new StaticLayout(text, 0, text.length(), paint, 38 newInstance( String text, int maxWidth, float textSize, int color, Layout.Alignment alignment) argument
|
/packages/apps/Email/tests/src/com/android/emailcommon/utility/ |
H A D | TextUtilitiesTests.java | 26 import android.text.SpannableStringBuilder; 27 import android.text.style.BackgroundColorSpan; 136 * We pass in HTML text in which an ampersand (@) is two chars ahead of the correct end position 138 * correct position. HTML text not containing an ampersand should generate a calculated end of 140 * @param text the HTML text to test 142 private void findTagEnd(String text, String tag) { argument 143 int calculatedEnd = TextUtilities.findTagEnd(text , tag, 0); 144 int knownEnd = text.indexOf('@') + 2; 157 findTagEnd("<tag foo=\"bar\">some text [all...] |
/packages/apps/Settings/src/com/android/settings/wifi/ |
H A D | WifiConfigUiBase.java | 36 public void setSubmitButton(CharSequence text); argument 37 public void setForgetButton(CharSequence text); argument 38 public void setCancelButton(CharSequence text); argument
|
/packages/inputmethods/OpenWnn/src/jp/co/omronsoft/openwnn/ |
H A D | LetterConverter.java | 31 * Convert the layer #0 text(pressed key sequence) to layer #1 text(pre converted string). 38 * @param text The text data includes input sequence(layer #0) and output area(layer #1) 41 public boolean convert(ComposingText text); argument
|
/packages/apps/Email/src/com/android/email/ |
H A D | EmailAddressValidator.java | 30 public boolean isValid(CharSequence text) { argument 31 return Address.parse(text.toString()).length == 1;
|
/packages/apps/UnifiedEmail/src/com/android/emailcommon/utility/ |
H A D | ConversionUtilities.java | 24 import android.text.TextUtils; 37 * Helper function to append text to a StringBuffer, creating it if necessary. 72 * Parse body text (plain and/or HTML) from MimeMessage to {@link BodyFieldData}. 84 String text = MimeUtility.getTextFromPart(viewable); 90 // Deploy text as marked by the various tags 91 boolean isHtml = "text/html".equalsIgnoreCase(viewable.getMimeType()); 100 sbHtmlReply = appendTextPart(sbHtmlReply, text); 102 sbTextReply = appendTextPart(sbTextReply, text); 107 sbIntroText = appendTextPart(sbIntroText, text); 114 sbHtml = appendTextPart(sbHtml, text); [all...] |
/packages/apps/Mms/src/com/android/mms/ |
H A D | MmsConfig.java | 30 import android.text.TextUtils; 334 String text = null; 336 text = parser.getText(); 341 text); 347 mMmsEnabled = "true".equalsIgnoreCase(text) ? 1 : 0; 349 mTransIdEnabled = "true".equalsIgnoreCase(text); 351 mNotifyWapMMSC = "true".equalsIgnoreCase(text); 353 mAliasEnabled = "true".equalsIgnoreCase(text); 355 mAllowAttachAudio = "true".equalsIgnoreCase(text); 357 mEnableMultipartSMS = "true".equalsIgnoreCase(text); [all...] |
/packages/apps/Email/src/com/android/email/mail/internet/ |
H A D | EmailHtmlUtil.java | 31 * @param text Text to be displayed using WebView. 34 public static String escapeCharacterToDisplay(String text) { argument 36 Matcher match = pattern.matcher(text); 43 out.append(text.substring(end, start)); 45 int c = text.codePointAt(start); 62 out.append(text.substring(end)); 63 text = out.toString(); 65 return text;
|
/packages/apps/Calculator/src/com/android/calculator2/ |
H A D | CalculatorEditable.java | 19 import android.text.SpannableStringBuilder; 20 import android.text.Editable; 62 char text = delta.charAt(0); 65 if (text == '.') { 78 if (text == Logic.MINUS && prevChar == Logic.MINUS) { 83 if (Logic.isOperator(text)) { 85 (text != Logic.MINUS || prevChar == '+')) { 92 if (start == 0 && Logic.isOperator(text) && text != Logic.MINUS) {
|
H A D | CalculatorDisplay.java | 21 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); 87 text.setBackground(null); 88 text.setEditableFactory(factory); 89 text.setKeyListener(calculatorKeyListener); 90 text.setSingleLine(); 124 EditText text 128 setText(CharSequence text, Scroll dir) argument [all...] |
/packages/apps/Tag/src/com/android/apps/tag/record/ |
H A D | UnknownRecord.java | 31 TextView text = (TextView) inflater.inflate(R.layout.tag_text, parent, false); 32 text.setText(R.string.tag_unknown); 33 return text;
|
/packages/apps/Contacts/src/com/android/contacts/util/ |
H A D | PhonebookCollatorFactory.java | 19 import java.text.Collator;
|
/packages/apps/Contacts/src/com/android/contacts/widget/ |
H A D | TextWithHighlighting.java | 19 import android.text.Spanned; 22 * A Spanned that highlights a part of text by dimming another part of that text.
|
/packages/apps/ContactsCommon/src/com/android/contacts/common/ |
H A D | ClipboardUtils.java | 22 import android.text.TextUtils; 31 * Copy a text to clipboard. 35 * @param text Text to copy. 38 public static void copyText(Context context, CharSequence label, CharSequence text, argument 40 if (TextUtils.isEmpty(text)) return; 44 ClipData clipData = ClipData.newPlainText(label == null ? "" : label, text);
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/state/ |
H A D | State.java | 31 public State(String text) { argument 32 this(text, StateView.DEFAULT); 35 public State(String text, int type) { argument 36 mText = text; 59 void setText(String text) { argument 60 mText = text;
|
/packages/experimental/NotificationShowcase/src/com/android/example/notificationshowcase/ |
H A D | ToastService.java | 51 if (intent.hasExtra("text")) { 52 final String text = intent.getStringExtra("text"); 56 Toast.makeText(ToastService.this, text, Toast.LENGTH_LONG).show(); 57 Log.v(TAG, "toast " + text); 63 public static PendingIntent getPendingIntent(Context context, String text) { argument 66 toastIntent.setAction(ACTION_TOAST + ":" + text); // one per toast message 67 toastIntent.putExtra("text", text);
|