Example usage for android.text Editable length

List of usage examples for android.text Editable length

Introduction

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

Prototype

int length();

Source Link

Document

Returns the length of this character sequence.

Usage

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  ww w  . ja v  a 2s  .  com
 *
 * @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);
    }
}