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

How to change icon fabspeed dial primary icon "+" ? #55

Open
Sarun1001 opened this issue Feb 20, 2017 · 1 comment
Open

How to change icon fabspeed dial primary icon "+" ? #55

Sarun1001 opened this issue Feb 20, 2017 · 1 comment

Comments

@Sarun1001
Copy link

Hi yavski ,
First of all, Thank you for this awesome library.
Is there any way to change the button icon in fabspeeddial - "+" (Need to replace the "+" with custom)

android:src="@drawable/reload" - Not working

@cesarmax22
Copy link

after investigating the code a little bit, this is what I think is your answer:

app:fabDrawable

The problem is that in order to make it animate (rotate) when tapped, you need to provide an animation through xml, and this only works from v21 and above.

In yavski project, look for: drawable-v21/fab_add_clear_selector.xml

So, if you want your custom "+" icon with rotation, you will have to create your own drawable-v21/your_custom_selector.xml which will be similar to yavski's but IT WILL ONLY WORK v21 and above.

I think yavski's library should have the ability to add it programmatically, having a hook method that the user may implement if desired.

Hope it helped!

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

2 participants