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

[SwitchMaterial] Impossible to change textcolor which is black in day theme and white in night theme #4388

Open
ronenfe opened this issue Nov 17, 2024 · 1 comment

Comments

@ronenfe
Copy link

ronenfe commented Nov 17, 2024

I tried in code with setColor, I tried in xml, I tried in the style. Nothing works.

<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/switchNoiseSpeed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textOff="@string/speed"
android:textOn="@string/noise"
app:layout_constraintBottom_toBottomOf="@+id/circularRangeSliderValue"
app:layout_constraintEnd_toEndOf="@+id/circularRangeSliderValue"
app:layout_constraintStart_toStartOf="@+id/circularRangeSliderValue"
app:layout_constraintTop_toTopOf="@+id/circularRangeSliderValue"
app:layout_constraintVertical_bias="0.77"
app:showText="true"
android:textColor="?attr/colorError"
/>

@ronenfe ronenfe added the bug label Nov 17, 2024
@ronenfe ronenfe changed the title [SwitchMaterial] Impossible to change textcolor which is black [SwitchMaterial] Impossible to change textcolor which is black in day theme and white in night theme Nov 17, 2024
@ronenfe
Copy link
Author

ronenfe commented Nov 17, 2024

I changed to compatswitch which also doesn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants