Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RadioGroup里的RadioButton绑定后RadioButton背景消失 #4

Open
yongming9011 opened this issue Nov 15, 2016 · 5 comments
Open

RadioGroup里的RadioButton绑定后RadioButton背景消失 #4

yongming9011 opened this issue Nov 15, 2016 · 5 comments

Comments

@yongming9011
Copy link

代码如下:
BadgeFactory.create(this)
.setTextColor(Color.WHITE)
.setWidthAndHeight(25,25)
.setBadgeBackground(Color.RED)
.setTextSize(10)
.setBadgeGravity(Gravity.RIGHT|Gravity.TOP)
.setBadgeCount(20)
.setShape(BadgeView.SHAPE_CIRCLE)
.setMargin(0,0,5,0)
.bind(rbAttention);

@AlexLiuSheng
Copy link
Owner

能看看radiobutton布局代码?

@yongming9011
Copy link
Author

不好意思哈,我写了个demo,已经删了,就是那种很普通的布局,一个RadioGroup嵌套了5个RadioButton,类似微信那种底部菜单。

@kingjyhn
Copy link

你好,我也遇到了相同的问题,RadioButton好像被隐藏了,不能点击,badge能显示
RadioButton代码:

<RadioButton
            android:id="@+id/radioButton_doctor_visit"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:scaleX="0.9"
            android:scaleY="0.9"
            android:layout_gravity="bottom"
            android:layout_weight="1"
            android:background="@android:color/transparent"
            android:button="@null"
            android:drawablePadding="6dp"
            android:drawableTop="@drawable/home_doctor_visit_selector"
            android:gravity="center_horizontal|bottom"
            android:paddingBottom="5dp"
            android:paddingTop="6dp"
            android:text="@string/doctorVisit"
            android:textColor="@drawable/home_radio_selector" />

Bind代码:

BadgeFactory.create(this)
                .setTextColor(ContextCompat.getColor(this, R.color.white))
                .setWidthAndHeight(25,25)
                .setBadgeBackground(ContextCompat.getColor(this, R.color.red))
                .setTextSize(10)
                .setBadgeGravity(Gravity.END|Gravity.TOP)
                .setBadgeCount(20)
                .setShape(BadgeView.SHAPE_CIRCLE)
                .setMargin(0,0,5,0)
                .bind(radioButtonDoctorVisit);

@liukewill
Copy link

weight 权重是1 导致的 具体因为原因是啥还没找到

@AlexLiuSheng
Copy link
Owner

不支持radiobutton

@AlexLiuSheng AlexLiuSheng reopened this Dec 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants