Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

pink color on api 27 #460

Open
Mateeen opened this issue Aug 26, 2018 · 3 comments
Open

pink color on api 27 #460

Mateeen opened this issue Aug 26, 2018 · 3 comments

Comments

@Mateeen
Copy link

Mateeen commented Aug 26, 2018

on API 27 every widget have pink color in unchecked state switch checkbox how to fix this issue?

@eku
Copy link

eku commented Aug 26, 2018

See #445

@DanielGunna
Copy link

DanielGunna commented Oct 18, 2018

After lots of debugging, I think that I achieved a workaround to this problem. I was facing same problem in Spinner's underline color, that was pink too. Instead of using library default style, as shown below,
I decided to create my own style that inherits from library's style then set color myself :

<com.rey.material.widget.Spinner
   android:id="@+id/spinnerPeriodo"
   style="@style/Material.Widget.Spinner"
   android:layout_width="match_parent"
   android:layout_height="50dp"
   android:layout_marginTop="@dimen/margin_20"
   app:rd_style="@style/Material.Drawable.Ripple.Wave" />

I found that "spn_dividerColor" attribute controls underline color, so in my style I can set the desired color:

    <style name="MySpinnerStyle" parent="Material.Widget.Spinner">
        <item name="spn_dividerColor">@color/accentColor</item>
    </style>

Therefore my advice is :

  • Try to find out which attribute controls view's component color;
  • Inherits parent's style values in your style file then set attribute with desired color

Another point is, if there's a problem in library, my guess would be that the problem probably has to do with the ThemeUtil file, used across various widgets and components to resolve colors to be set.

@eku
Copy link

eku commented Oct 18, 2018

@DanielGunna could one add the attribute to https://github.com/rey5137/material/blob/master/material/src/main/res/values/styles.xml and rebuild the librarry? Would this work? If yes, what about a PR?

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

No branches or pull requests

3 participants