u013936727
步行vs天下
采纳率50%
2016-01-21 09:45

RadioButton上添加BadgeView显示消息数量时,RadioButton无法显示

已采纳

RadioButton代码:
android:id="@+id/radioButton_yiwancheng_mine"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:button="@null"
android:drawablePadding="5dp"
android:drawableTop="@drawable/selector_yiwancheng"
android:gravity="center"
android:paddingTop="5dp"
android:text="已完成"
android:textColor="@color/selector_textcolor_wode"
android:textSize="14sp" />

BadgeView代码:
BadgeView badgeView_yiwancheg = new BadgeView(getActivity());
badgeView_yiwancheg.setTargetView(radioButton_yiwancheng);
badgeView_yiwancheg.setBackgroundResource(R.drawable.informationcount);
badgeView_yiwancheg.setBadgeCount(1);

    效果图:![图片说明](https://img-ask.csdn.net/upload/201601/21/1453369420_924757.png)

    求解决!
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答