记录一个bug:
执行代码:
Drawable openIcon = context.getResources().getDrawable(R.drawable.drip_mail_opened); holder.timeTv.setCompoundDrawables(openIcon, null, null, null);
Icon不显示;
修改如下:
Drawable openIcon = context.getResources().getDrawable(R.drawable.drip_mail_opened); openIcon.setBounds(0, 0, 24, 24); holder.timeTv.setCompoundDrawables(openIcon, null, null, null);则Icon显示正常。
本文记录了一个关于Android应用中图标无法正常显示的问题及解决方案。通过设置Drawable的边界大小,成功使图标在TextView中正确显示。
1382

被折叠的 条评论
为什么被折叠?



