@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.)
}
PhoneNumberFormatter.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:sms_DualCard
作者:
评论列表
文章目录