Lines Matching defs:end

162      * 0 for end, 1 for start.
400 public void onSelectionChanged(int start, int end) {
408 super.onSelectionChanged(start, end);
434 public void append(CharSequence text, int start, int end) {
439 super.append(text, start, end);
547 int end = getSelectionEnd();
548 int start = mTokenizer.findTokenStart(editable, end);
550 getSpannable().getSpans(start, end, DrawableRecipientChip.class);
564 commitChip(start, end, editable);
657 // Chip start padding is the same as the end padding if there is no contact image.
712 * Takes into account both the set avatar position (start or end) as well as whether
1054 // Always leave a space at the end between tokens.
1121 int end;
1124 end = spannable.getSpanEnd(mMoreChip);
1126 end = getSpannable().getSpanEnd(getLastChip());
1130 if (length > end) {
1136 editable.delete(end + 1, length);
1343 int end = getSelectionEnd();
1344 int start = mTokenizer.findTokenStart(editable, end);
1346 if (shouldCreateChip(start, end)) {
1355 return commitChip(start, end , editable);
1366 int end = getSelectionEnd();
1367 int start = mTokenizer.findTokenStart(editable, end);
1368 if (shouldCreateChip(start, end)) {
1369 commitChip(start, end, editable);
1374 private boolean commitChip(int start, int end, Editable editable) {
1377 && end == getSelectionEnd() && !isPhoneQuery()) {
1381 if (!isValidEmailAddress(editable.toString().substring(start, end).trim())) {
1405 QwertyKeyListener.markAsReplaced(editable, start, end, "");
1407 if (chipText != null && start > -1 && end > -1) {
1408 editable.replace(start, end, chipText);
1415 if (end == getSelectionEnd()) {
1440 int end = getSpannable().getSpanStart(last);
1452 if (startLooking >= 0 && end >= 0 && startLooking < end) {
1453 getText().delete(startLooking, end);
1458 private boolean shouldCreateChip(int start, int end) {
1459 return !mNoChips && hasFocus() && enoughToFilter() && !alreadyHasChip(start, end);
1462 private boolean alreadyHasChip(int start, int end) {
1467 getSpannable().getSpans(start, end, DrawableRecipientChip.class);
1474 private void handleEdit(int start, int end) {
1475 if (start == -1 || end == -1) {
1483 setSelection(end);
1484 String text = getText().toString().substring(start, end);
1487 QwertyKeyListener.markAsReplaced(editable, start, end, "");
1554 int end = getSelectionEnd();
1555 int start = mTokenizer.findTokenStart(text, end);
1559 DrawableRecipientChip[] chips = span.getSpans(start, end, DrawableRecipientChip.class);
1577 int end = text.length();
1578 int start = mTokenizer.findTokenStart(text, end);
1579 String token = text.toString().substring(start, end).trim();
1741 // Remove whitespace from end to find "real end"
1751 // If the offset is beyond or at the end of the text,
1778 int end = getChipEnd(chip);
1779 if (offset >= start && offset <= end) {
1837 // Always leave a blank space at the end of a chip.
1885 int end = getSelectionEnd();
1886 int start = mTokenizer.findTokenStart(getText(), end);
1889 QwertyKeyListener.markAsReplaced(editable, start, end, "");
1891 if (chip != null && start >= 0 && end >= 0) {
1892 editable.replace(start, end, chip);
1896 return end - start;
2000 // Take the first <= CHIP_LIMIT addresses and get to the end of the second one.
2003 int end = start;
2005 end = movePastTerminators(mTokenizer.findTokenEnd(text, start));
2006 start = end; // move to the next token and get its end.
2012 SpannableString chipText = new SpannableString(text.subSequence(end, text.length()));
2014 text.replace(end, text.length(), chipText);
2084 int end = Math.max(totalReplaceStart, totalReplaceEnd);
2086 SpannableString chipText = new SpannableString(text.subSequence(start, end));
2088 text.replace(start, end, chipText);
2115 int end = span.getSpanEnd(recipients[recipients.length - 1]);
2127 chipStart = editable.toString().indexOf(token, end);
2128 end = chipEnd = Math.min(editable.length(), chipStart + token.length());
2143 * the end of the RecipientEditTextView for inline editing. If the
2169 int end = getChipEnd(currentChip);
2185 QwertyKeyListener.markAsReplaced(editable, start, end, "");
2186 if (start == -1 || end == -1) {
2189 editable.setSpan(newChip, start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
2242 int end = getChipEnd(chip);
2245 if (start == -1 || end == -1) {
2251 QwertyKeyListener.markAsReplaced(editable, start, end, "");
2256 start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
2317 int end = getChipEnd(chip);
2322 if (start == -1 || end == -1) {
2329 int toReplace = end;
2414 int end = getSelectionEnd() == 0 ? 0 : getSelectionEnd() - 1;
2416 if (end != len) {
2417 last = s.charAt(end);
2480 int end = getSelectionEnd() == 0 ? 0 : getSelectionEnd() - 1;
2482 if (end != len) {
2483 last = s.charAt(end);
2529 final int end = getSelectionEnd();
2530 if (start < 0 || end < 1) {
2533 } else if (start == end) {
2537 editable.append(pastedItem, start, end);
2599 // +1 for the space at the end.
2625 // This token had not only an end token character, but also a space
2774 final int end =
2777 // Make sure we always have just 1 space at the end to
2788 text.replace(start, end, displayText);
3067 * Append a new {@link RecipientEntry} to the end of the recipient chips, leaving any
3068 * unfinished text at the end.
3076 // Find the end of last chip and see if there's any unchipified text.
3080 // The chip will be inserted at the end of last chip + 1. All the unfinished text after