通过substring()方法设置中间四位为*
/*
设置手机号中间四位不可见
*/
private String hidePhone (String phone){
if(!TextUtils.isEmpty(phone) && phone.length() ==11) {
phone = phone.substring(0,3) +"****" + phone.substring(7,11);
}
return phone;
}