/// <summary><p>Starts filtering the content of the drop down list.</summary> /// <remarks> /// <p>Starts filtering the content of the drop down list. The filtering /// pattern is the specified range of text from the edit box. Subclasses may /// override this method to filter with a different pattern, for /// instance a smaller substring of <code>text</code>.</p> /// </remarks> protected internal virtual void performFiltering(java.lang.CharSequence text, int start, int end, int keyCode) { getFilter().filter(text.SubSequence(start, end), this); }
public override java.io.Writer append(java.lang.CharSequence csq, int start, int end) { if (csq == null) { csq = java.lang.CharSequenceProxy.Wrap("null"); } string output = csq.SubSequence(start, end).ToString(); write(output, 0, output.Length); return this; }
internal void insert0(int index, java.lang.CharSequence s, int start, int end) { if (s == null) { s = java.lang.CharSequenceProxy.Wrap("null"); } if ((index | start | end) < 0 || index > count || start > end || end > s.Length) { throw new System.IndexOutOfRangeException(); } insert0(index, s.SubSequence(start, end).ToString()); }
public override java.lang.CharSequence filter(java.lang.CharSequence source, int start, int end, android.text.Spanned dest, int dstart, int dend) { if (this._enclosing.mDisplayedValues == null) { java.lang.CharSequence filtered = base.filter(source, start, end, dest, dstart, dend ); if (filtered == null) { filtered = source.SubSequence(start, end); } string result = Sharpen.StringHelper.GetValueOf(dest.SubSequence(0, dstart)) + filtered + dest.SubSequence(dend, dest.Length); if (string.Empty.Equals(result)) { return java.lang.CharSequenceProxy.Wrap(result); } int val = this._enclosing.getSelectedPos(result); if (val > this._enclosing.mMaxValue) { return java.lang.CharSequenceProxy.Wrap(string.Empty); } else { return filtered; } } else { java.lang.CharSequence filtered = java.lang.CharSequenceProxy.Wrap(Sharpen.StringHelper.GetValueOf (source.SubSequence(start, end))); if (android.text.TextUtils.isEmpty(filtered)) { return java.lang.CharSequenceProxy.Wrap(string.Empty); } string result = Sharpen.StringHelper.GetValueOf(dest.SubSequence(0, dstart)) + filtered + dest.SubSequence(dend, dest.Length); string str = Sharpen.StringHelper.GetValueOf(result).ToLower(); foreach (string val in this._enclosing.mDisplayedValues) { string valLowerCase = val.ToLower(); if (valLowerCase.StartsWith(str)) { this._enclosing.postSetSelectionCommand(result.Length, val.Length); return val.SubSequence(dstart, val.Length); } } return java.lang.CharSequenceProxy.Wrap(string.Empty); } }
public virtual java.io.PrintStream append(java.lang.CharSequence charSequence, int start, int end) { if (charSequence == null) { charSequence = java.lang.CharSequenceProxy.Wrap("null"); } print(charSequence.SubSequence(start, end).ToString()); return this; }
public virtual java.lang.CharSequence filter(java.lang.CharSequence source, int start , int end, android.text.Spanned dest, int dstart, int dend) { int keep = mMax - (dest.Length - (dend - dstart)); if (keep <= 0) { return java.lang.CharSequenceProxy.Wrap(string.Empty); } else { if (keep >= end - start) { return null; } else { keep += start; if (System.Char.IsHighSurrogate(source[keep - 1])) { --keep; if (keep == start) { return java.lang.CharSequenceProxy.Wrap(string.Empty); } } return source.SubSequence(start, keep); } } }
private java.lang.CharSequence padding(java.lang.CharSequence source, int startIndex ) { int start = startIndex; int width = formatToken.getWidth(); int precision = formatToken.getPrecision(); int length = source.Length; if (precision >= 0) { length = System.Math.Min(length, precision); if (source is java.lang.StringBuilder) { ((java.lang.StringBuilder)source).setLength(length); } else { source = source.SubSequence(0, length); } } if (width > 0) { width = System.Math.Max(source.Length, width); } if (length >= width) { return source; } char paddingChar = '\u0020'; // space as padding char. if (formatToken.flagZero) { if (formatToken.getConversionType() == 'd') { paddingChar = localeData.zeroDigit; } else { paddingChar = '0'; } } else { // No localized digits for bases other than decimal. // if padding char is space, always pad from the start. start = 0; } char[] paddingChars = new char[width - length]; java.util.Arrays.fill(paddingChars, paddingChar); bool paddingRight = formatToken.flagMinus; java.lang.StringBuilder result = toStringBuilder(source); if (paddingRight) { result.append(paddingChars); } else { result.insert(start, paddingChars); } return result; }
public virtual java.io.Writer append(java.lang.CharSequence csq, int start, int end ) { if (csq == null) { csq = java.lang.CharSequenceProxy.Wrap("null"); } write(csq.SubSequence(start, end).ToString()); return this; }