substring() メソッドで真ん中の 4 桁を * に設定します
/*
设置手机号中间四位不可见
*/
private String hidePhone (String phone){
if(!TextUtils.isEmpty(phone) && phone.length() ==11) {
phone = phone.substring(0,3) +"****" + phone.substring(7,11);
}
return phone;
}