Phone number formatting an EditText in Android

前端 未结 14 961
情深已故
情深已故 2020-12-02 12:03

I am making a simple Address Book app (targeting 4.2) that takes name, address, city, state, zip and phone.

I want to format the phone number input as a phone number

14条回答
  •  感动是毒
    2020-12-02 12:38

    If you're only interested in international numbers and you'd like to be able to show the flag of the country that matches the country code in the input, I wrote a small library for that:

    https://github.com/tfcporciuncula/phonemoji

    Here's how it looks:

提交回复
热议问题