[RangeSlider] theming of valueLabel applies only to unselected label
See original GitHub issueDescription: After theming a label using the following attributes:
<com.google.android.material.slider.RangeSlider
...
app:labelStyle="@style/Filters.Style.Criteria.SliderSectionItem.SliderLabel"
/>
in styles.xml:
<style name="Filters.Style.Criteria.SliderSectionItem.SliderLabel" parent="Widget.MaterialComponents.Tooltip">
<item name="backgroundTint">?cosmaColorFloatingButtonSecondaryVariantBackground</item>
<item name="android:textAppearance">@style/Filters.TextAppearance.Criteria.SliderSectionItem.SliderLabel</item>
</style>
<style name="Filters.TextAppearance.Criteria.SliderSectionItem.SliderLabel" parent="TextAppearance.MaterialComponents.Tooltip">
<item name="android:textColor">?colorSurface</item>
<item name="fontFamily">@font/cosma_make_it_sans</item>
<item name="android:fontFamily">@font/cosma_make_it_sans</item>
</style>
I see only the currently unselected item of the range being styled properly:
Expected behavior: both value label are having the same style (black with white text)
Source code: see above
Android API version: 28
Material Library version: 1.2.0
Device: Samsung Galaxy S10
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Add a custom label to material range slider - Stack Overflow
To change the background color of the label you can use a custom style: <com.google.android.material.slider.RangeSlider style="@style/Myslider" ...
Read more >Labels in Flutter Range Slider (SfRangeSlider) - Syncfusion
Learn here all about adding the Labels feature in Syncfusion Flutter Range Slider (SfRangeSlider) widget and more.
Read more >Element: <oj-status-meter-gauge> - Oracle
Only applies when thresholds are not defined. The default value varies based on theme. ... An object defining the value label.
Read more >Designing The Perfect Slider - Smashing Magazine
A price range slider just doesn't yield the same input speed as input ... but turning the value label into an input field...
Read more >USER GUIDE 6.2 - PrimeFaces
PrimeFaces only requires a JAVA 6+ runtime and a JSF 2.x implementation as mandatory ... unselect(index) ... Styling directly applies to a container...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cketcham thanks for the reply! I will create a project from scratch and try to reproduce. I will contact you as soon as it’s ready
@cketcham I realize that I encounter this error only when I’m setting initial values for my rangeslider programmatically. It works as expected when I set initial values for my RangeSlider using “app:values”. I’m loading the initial values for the range slider from sharedPreferences initially. How can I fix this?