usernumber = phone.getString(phone.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER)) .trim(); if (usernumber.contains("+86")) { usernumber =usernumber.replace("+86", ""); } else if (usernumber.contains(" ")) { usernumber = usernumber.replace(" ", ""); } et_phone.setText(usernumber);