Example #1
0
        /// <summary>
        /// A method for getting tokens containing mutible words
        /// </summary>
        private ICharSequence InnerToken(ICharSequence text)
        {
            int i = text.Length();

            // Find the first space in the Token, going backwards
            while (i > 0 && text.CharAt(i - 1) == ' ')
            {
                i--;
            }

            if (i > 0 && text.CharAt(i - 1) == ' ')
            {
                return text;
            }
            else
            {
                if (text.GetType().IsInstanceOfType(typeof(ISpanned)))
                {
                    SpannableString sp = new SpannableString(text + " ");
                    TextUtils.CopySpansFrom((ISpanned)text, 0, text.Length(), Java.Lang.Class.FromType(typeof(Java.Lang.Object)), sp, 0);
                    return sp;
                }
                else
                {
                    return new Java.Lang.String(text + " ");
                }
            }
        }