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

Primary Color Dot in the middle of icon #5

Closed
jonl1096 opened this issue Aug 3, 2016 · 6 comments
Closed

Primary Color Dot in the middle of icon #5

jonl1096 opened this issue Aug 3, 2016 · 6 comments

Comments

@jonl1096
Copy link

jonl1096 commented Aug 3, 2016

If the icon has a transparent center, sometimes when you unselect it a dot of color appears in the middle. The color of the dot appears to be what you set as the spark button's primary color.

normal selected:
selected normal

normal unselected:
unselected normal

unselected with dot:
screen shot 2016-08-03 at 2 59 34 pm

This doesn't happen every time a button is selected and unselected, only sometimes, I have no idea why.

Here is the xml:

<com.varunest.sparkbutton.SparkButton
        android:id="@+id/addButton"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:background="@color/white"
        app:sparkbutton_activeImage="@drawable/ic_add_box_active_24dp"
        app:sparkbutton_inActiveImage="@drawable/ic_add_box_inactive_24dp"
        app:sparkbutton_iconSize="25dp"
        app:sparkbutton_primaryColor="#3498db"
        app:sparkbutton_secondaryColor="#f1c40f"
        android:layout_alignParentTop="true"
        android:layout_alignParentEnd="true" />

Here is the java, I didn't do any logic with the button yet:

SparkButton addButton = (SparkButton) view.findViewById(R.id.addButton);
addButton.setChecked(false);

Here is the icon xml:

<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
    <path
        android:fillColor="@color/add_inactive"
        android:pathData="M19,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM17,13h-4v4h-2v-4L7,13v-2h4L11,7h2v4h4v2z"/>
</vector>
@varunest
Copy link
Owner

varunest commented Aug 4, 2016

Hi,
This was really a bug. The circular animation was visible even when no animation was playing. Have fixed this issue in v1.0.1. Kindly check and revert so I can close this issue.

@jonl1096
Copy link
Author

jonl1096 commented Aug 5, 2016

Thanks!

@jonl1096 jonl1096 closed this as completed Aug 5, 2016
@jonl1096 jonl1096 reopened this Aug 8, 2016
@jonl1096
Copy link
Author

jonl1096 commented Aug 8, 2016

Hi sorry for closing and reopening, I updated to 1.0.1 in my gradle file and its still giving me the dot.

@lfkdsk
Copy link
Contributor

lfkdsk commented Sep 20, 2016

@jonl1096 I had fixed this bug in my pull request.

@nikhilpanju
Copy link
Contributor

@lfkdsk Do I have to pull a snapshot to get that then?

@varunest
Copy link
Owner

@nikhilpanju I have released v1.0.2 which includes @ifkdsk's pull request. Simply update version in dependency and you are good to go.

@varunest varunest closed this as completed Dec 7, 2016
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

4 participants