Closed j-ns closed 6 years ago
Hi, thanks for positive review.
setUnSelectedBackgroundColor() method's argument must be a color value. Do not pass the resource value directly.
Here is the working example ..
SegmentedControl segmentedControl = findViewById(R.id.segmented_control);
int colorValue = ContextCompat.getColor(this, R.color.segmented_control_disabled) segmentedControl.setUnSelectedBackgroundColor(colorValue); _// here pass the color value, instead of R.color.segmented_controldisabled
segmentedControl.notifyConfigIsChanged();
Hi Robert, this is the SegmentedControl I was looking for. Great work.
Unfortuanetly I'm not able to change colors programmatically. When I change e.g. the unselectedBackgroundColor, I get a purple background no matter what color I choose.