您的位置:首页 > 产品设计 > UI/UE

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

2017-05-04 09:40 1591 查看
问题已经解决,之前写成了 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));

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐