BadgeView icon indicating copy to clipboard operation
BadgeView copied to clipboard

主页底部RadioButton添加badgeView之后异常!

Open STGing opened this issue 7 years ago • 5 comments

在app的主页面,底部有4个RadioButton,给其中购物车设置了BadgeView之后,第一次点击这个radiobutton可以切换对应的fragment,但是点击其他radiobutton之后再次点击购物车的radiobutton就失效了,而且checked的状态一直为选中状态。请教大神要是有空帮忙看看!

PS:根据注意事项中说的,我将使用了BadgeView的radioButton的获取修改成了badgeView.getTargetView()方法,然后几个RadioButton设置setOnCheckedChangeListener(...)

STGing avatar Nov 12 '17 05:11 STGing

网上找了半天,搜索到解决方案了,原来这个问题一直有的。 解决方法:添加一个透明的button,和要显示消息的view重合,给button设置角标,这样radiobutton就可以点击啦!

STGing avatar Nov 12 '17 06:11 STGing

RadioButton不是必需是RadioGroup的直接子控件吗?怎么添加一个透明的button和它重合?

GhRyuJin avatar Nov 08 '18 03:11 GhRyuJin

<RadioGroup android:layout_width="match_parent" android:layout_height="50dp" android:clickable="false" android:layout_alignParentBottom="true" android:background="@color/transparent" android:orientation="horizontal" > <Button style="@style/custom_radio_button" android:visibility="invisible" /> <Button style="@style/custom_radio_button" android:id="@+id/waitting_btn" android:visibility="invisible" /> <Button style="@style/custom_radio_button" android:visibility="invisible" /> <Button style="@style/custom_radio_button" android:visibility="invisible" /> </RadioGroup>

yulu1121 avatar Aug 22 '19 09:08 yulu1121

放在点击RadioGroup的下面

yulu1121 avatar Aug 22 '19 09:08 yulu1121

RadioGroup 包含 RadioButton 的结构 替换成了 LinearLayout 包含 TextVew 的结构 效果尚可

TomGarden avatar Jan 15 '20 14:01 TomGarden