Skip to content

Commit

Permalink
add update flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrahimsn98 committed Mar 29, 2021
1 parent 6f0ce50 commit bddaac8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/src/main/java/me/ibrahimsn/lib/PhoneNumberKit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ class PhoneNumberKit(private val context: Context) {
}
}
}

fun updateCountry(countryIso2: String) {
setCountry(
country = getCountry(countryIso2.trim().toLowerCase(Locale.ENGLISH)) ?: Countries.list[0],
prefill = true
)
}

// Creates a pattern like +90 506 555 55 55 -> +0010001000100100
private fun createNumberFormat(number: String): String {
Expand Down

0 comments on commit bddaac8

Please sign in to comment.