Example usage for android.telephony PhoneNumberFormattingTextWatcher PhoneNumberFormattingTextWatcher

List of usage examples for android.telephony PhoneNumberFormattingTextWatcher PhoneNumberFormattingTextWatcher

Introduction

In this page you can find the example usage for android.telephony PhoneNumberFormattingTextWatcher PhoneNumberFormattingTextWatcher.

Prototype

public PhoneNumberFormattingTextWatcher(String countryCode) 

Source Link

Document

The formatting is based on the given countryCode.

Usage

From source file:com.tomeokin.lspush.biz.auth.adapter.PhoneFieldViewHolder.java

private void updatePhoneNumberFormatting(CountryCodeData countryCodeData) {
    if (mFormatWatcher != null) {
        mPhoneField.removeTextChangedListener(mFormatWatcher);
    }//w  w w  .  j  a v a2  s.c  om
    mFormatWatcher = new PhoneNumberFormattingTextWatcher(countryCodeData.country);
    mPhoneField.addTextChangedListener(mFormatWatcher);
}