Skip to content

can't change colors #36

@jackthebeast

Description

@jackthebeast

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions