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

can't change colors #36

Closed
jackthebeast opened this issue Oct 15, 2015 · 1 comment
Closed

can't change colors #36

jackthebeast opened this issue Oct 15, 2015 · 1 comment

Comments

@jackthebeast
Copy link

Hi, I'm trying to use this component but I'm actually unable to change any of the colors.

my code:
xml:

<info.hoang8f.android.segmented.SegmentedGroup
                        xmlns:segmentedgroup="http://schemas.android.com/apk/res-auto"
                        android:id="@+id/segmented"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_margin="10dp"
                        android:orientation="horizontal"
                        segmentedgroup:sc_border_width="2dp"
                        segmentedgroup:sc_corner_radius="10dp"
                        segmentedgroup:sc_tint_color="#CC0000"
                        segmentedgroup:sc_checked_text_color="#00CC00">

                        <RadioButton
                            android:id="@+id/button21"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="One"
                            style="@style/RadioButton" />

                        <RadioButton
                            android:id="@+id/button22"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="Two"
                            style="@style/RadioButton" />
                    </info.hoang8f.android.segmented.SegmentedGroup>

java:

SegmentedGroup segmented = (SegmentedGroup) view.findViewById(R.id.segmented);
segmented.setTintColor(Color.parseColor("#CC0000"));

the component remains blue and white
Am I doing something wrong?

@jackthebeast
Copy link
Author

Removing that line solved the problem:

xmlns:segmentedgroup="http://schemas.android.com/apk/res-auto"

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

1 participant