PhoneNumberFormatter.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:silent-contacts-android 作者:
@Override
protected void onPostExecute(PhoneNumberFormattingTextWatcher watcher) {
    if (watcher == null || isCancelled()) {
        return; // May happen if we cancel the task.
    }
    // Setting a text changed listener is safe even after the view is detached.
    mTextView.addTextChangedListener(watcher);

    // Note changes the user made before onPostExecute() will not be formatted, but
    // once they type the next letter we format the entire text, so it's not a big deal.
    // (And loading PhoneNumberFormattingTextWatcher is usually fast enough.)
    // We could use watcher.afterTextChanged(mTextView.getEditableText()) to force format
    // the existing content here, but that could cause unwanted results.
    // (e.g. the contact editor thinks the user changed the content, and would save
    // when closed even when the user didn't make other changes.)
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号