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);即可
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);即可
相关文章推荐
- android 如何实现apk search出现在…
- Android AIDL——实现机制浅析
- android 实时对讲机的实现
- Android 7.0中的多窗口实现解析
- Android GPS 定位的实现(1)
- Android testDemo 实现全屏等设置
- android 实现小窗口播放
- Android实现元素间的分割线 android:divider=""(3.0以上特性)支持3.0以下
- android USB绑定功能实现(fr…
- Android自动接听&挂断电话(包含怎么应对4.1以上版本的权限检查)
- Android自动接听&挂断电话(包含怎么应对4.1以上版本的权限检
- android设计与实现 收获
- Android Bander设计与实现 - 设计…
- Android自动接听&挂断电话(包含怎么应对4.1以上版本的权限检)
- Android 软件自动更新功能的实现
- Android ViewPager实现应用…
- android USB绑定功能实现(fr…
- android 实现图片加水印
- Android ContentProvider的实现
- [转]Cufon, jQuery和CSS3实现的超…