您的位置:首页 > 移动开发 > Android开发

Android 4.1以上实现归属地JA…

2014-08-28 15:44 471 查看
setGeoDescription(info, label);
java代码:

private void setGeoDescription(CallerInfo info,
String label) {

if(TextUtils.isEmpty(info.geoDescription))

info.updateGeoDescription(mContext, info.phoneNumber);

if(label
!= null && !TextUtils.isEmpty(info.geoDescription))

{

mLabel.setText(label + "\n"
+info.geoDescription);

mLabel.setVisibility(View.VISIBLE);

}

else
if(!TextUtils.isEmpty(info.geoDescription))

{

mPhoneNumber.setText(info.geoDescription);

mPhoneNumber.setVisibility(View.VISIBLE);

}

}

调用方式:
在com/android/phone/callcard.java内:

在updateDisplayForPerson函数里的最后一句下面调用 setGeoDescription(info,
label);即可
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: