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

The color doesn't change #203

Open
Neha--Agarwal opened this issue Sep 17, 2015 · 5 comments
Open

The color doesn't change #203

Neha--Agarwal opened this issue Sep 17, 2015 · 5 comments

Comments

@Neha--Agarwal
Copy link

Even when I change the color of button in its XML code, the color of button is keeping the same, blue. Why is it so? Please help!

@flaff
Copy link

flaff commented Sep 22, 2015

make sure you are editing
fab:fab_colorNormal
in your xml layout.

@MohammadAbbasKhan
Copy link

found an answer use this

fab.setColorNormalResId(R.color.fab_colorNormal);

and set color for pressed and ripple similarly

@ghost
Copy link

ghost commented Nov 13, 2015

Yes, the color only could be changed by code, can't get it from xml. How to solve it ?

@iamtodor
Copy link

@JackLauu fab:fab_colorNormal="@color/fab_background" this works for me. Don't know how to change item's color inside, for example: I use android:src="@android:drawable/ic_input_add" I want to change + color..

@xtonousou
Copy link

xtonousou commented Aug 2, 2016

To change color guys you should declare namespace
xmlns:fab="http://schemas.android.com/apk/res-auto"
and not
xmlns:fab="http://schemas.android.com/tools"

After you do that, you can change the color programmatically or with xml.

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

No branches or pull requests

5 participants