W/ResourceType: No package identifier when getting value for resource number 0x00000034

来源:互联网 发布:淘宝软文范例 编辑:程序博客网 时间:2024/05/23 01:14

问题已经解决,之前写成了 tabUnReadMsg.setText(count);

setText方法里面应该传入string类型的字串,而不是传int型字串
public void updateTabUnReadMsg(int which,int count) {
if(count <= 0){
    return;
}
View v = tabsContainer.getChildAt(which);
if (v instanceof TextView) {
    Log.i("wangqx", "287 updateTabUnReadMsg");
} else if (v instanceof ViewGroup) {
    mWhich = which;
    Log.i("wangqx", "326 count="+count);
    mCount = count;
    Log.i("wangqx", "289 updateTabUnReadMsg");
    TextView tabUnReadMsg = (TextView) v.findViewById(R.id.tv_unreadmsg);
    Log.i("wangqx", "291 updateTabUnReadMsg");
    tabUnReadMsg.setVisibility(View.VISIBLE);
    Log.i("wangqx", "293 updateTabUnReadMsg");
    tabUnReadMsg.setText(String.valueOf(count));
}

0 0