Example usage for android.text Editable append

List of usage examples for android.text Editable append

Introduction

In this page you can find the example usage for android.text Editable append.

Prototype

public Editable append(char text);

Source Link

Document

Convenience for append(String.valueOf(text)).

Usage

From source file:cgeo.geocaching.CacheDetailActivity.java

private void addWarning(final UnknownTagsHandler unknownTagsHandler, final Editable description) {
    if (unknownTagsHandler.isProblematicDetected()) {
        final int startPos = description.length();
        final IConnector connector = ConnectorFactory.getConnector(cache);
        if (StringUtils.isNotEmpty(cache.getUrl())) {
            final Spanned tableNote = Html.fromHtml(res.getString(R.string.cache_description_table_note,
                    "<a href=\"" + cache.getUrl() + "\">" + connector.getName() + "</a>"));
            description.append("\n\n").append(tableNote);
            description.setSpan(new StyleSpan(Typeface.ITALIC), startPos, description.length(),
                    Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
        }/* w ww.  j a  va2s. com*/
    }
}

From source file:com.android.mail.compose.ComposeActivity.java

/**
 * Append text to the body of the message. If there is no existing body
 * text, just sets the body to text.// ww w. j  a v a 2  s. c o  m
 *
 * @param text Text to append
 * @param withSignature True to append a signature.
 */
public void appendToBody(CharSequence text, boolean withSignature) {
    Editable bodyText = mBodyView.getEditableText();
    if (bodyText != null && bodyText.length() > 0) {
        bodyText.append(text);
    } else {
        setBody(text, withSignature);
    }
}

From source file:com.tct.mail.compose.ComposeActivity.java

/**
 * Append text to the body of the message. If there is no existing body
 * text, just sets the body to text./*from  w  w w. j a  va 2  s.c o m*/
 *
 * @param text Text to append
 * @param withSignature True to append a signature.
 */
public void appendToBody(CharSequence text, boolean withSignature) {
    Editable bodyText = mBodyView.getEditableText();
    if (bodyText != null && bodyText.length() > 0) {
        //TS: yanhua.chen 2015-11-11 EMAIL BUGFIX_861373 ADD_S
        //if click respone inline,directly show signature,hidden "..." icon
        if (mRespondedInline && /*!mIsClickIcon &&*/ !TextUtils.isEmpty(mSignature)) {//[BUGFIX]-MOD by SCDTABLET.shujing.jin@tcl.com,05/06/2016,2013535
            bodyText.append(convertToPrintableSignature(mSignature));
        }
        //TS: yanhua.chen 2015-11-11 EMAIL BUGFIX_861373 ADD_E
        bodyText.append(text);
    } else {
        setBody(text, withSignature);
    }
}