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

Shining effect is not working properly #2

Open
vahidvdn opened this issue Feb 15, 2019 · 10 comments
Open

Shining effect is not working properly #2

vahidvdn opened this issue Feb 15, 2019 · 10 comments

Comments

@vahidvdn
Copy link

Hi. I installed the plugin in nativescript-angular version. I copied customicon.png in all folders into App_Resources\Android\src\main\res. Now when I tap on button it only scales up without any shining effects. Also it changes the color of icon.

Additionally, after pressing the button the ui becomes very laggy and freezes for a few seconds. Here is my code:

<ShineButton col="1" row="0" shineSize="0" height="80" width="80"
    margin="20" src="customicon" color="gray" fillColor="blue" allowRandomColor="false"
    animDuration="1" bigShineColor="blue" smallShineColor="green" enableFlashing="true"
    shineCount="12" shineTurnAngle="45" shineDistanceMultiple="1.5" smallShineOffsetAngle="20">
</ShineButton>

Any idea?

@hamdiwanis
Copy link
Owner

hey @vahidvdn :), can you try without shineSize="0"?

@vahidvdn
Copy link
Author

Hey @hamdiwanis
There is no difference.

@hamdiwanis
Copy link
Owner

ok thanks @vahidvdn i will look into it, also do you test with android or ios? does the demo project works?

@hamdiwanis
Copy link
Owner

Sorry @vahidvdn but I could not reproduce the problem, i just tried it with a new angular project and it worked normally. if you want i can send you the test project i used or you can make a one with the problem and send me the repo link

@vahidvdn
Copy link
Author

@hamdiwanis Thanks for your reply.

do you test with android or ios?

Android.

does the demo project works?

The demo project is using nativescript core. If it's possible to you, please share your angular demo version.

@hamdiwanis
Copy link
Owner

ok, here it is :)
Archive.zip

@vahidvdn
Copy link
Author

vahidvdn commented Feb 15, 2019

@hamdiwanis It works fine in your attached project. Let me check out in details to see why it doesn't work in my case.

@vahidvdn
Copy link
Author

@hamdiwanis I found the issue. In my project if I transfer my shine button to the root component (app.component.html) , it works fine.

For reproducing the issue, please try angular project with tabview template, and put your shine button into one of the tabs.

@vahidvdn
Copy link
Author

vahidvdn commented Feb 16, 2019

Also there are another issues. There is programmatically control of the view. For example in iOS version of native library, there is something like this: (I couldn't be able to find any equation in android native lib)

favButton.isSelected = true

And one more thing, I don't have any idea about, is using in listview. Because when scrolling it shows the next items as selected.

@hamdiwanis
Copy link
Owner

Also there are another issues. There is grammatically control of the view. For example in iOS version of native library, there is something like this: (I couldn't be able to find any equation in android native lib)

hey @vahidvdn acctully i used WCLShineButton for ios not fav-button but it still have isSelected property, for android i think you can use setChecked https://github.com/ChadCSong/ShineButton/search?q=setChecked&unscoped_q=setChecked

And one more thing, I don't have any idea about, is using in listview. Because when scrolling it shows the next items as selected.

i think this is a problem with the native lib see here
ChadCSong/ShineButton#18
may be it can be worked arround by setting the select state yourself

same for tab view issue and ina dialog becuse of the use of difrent frame may be passing the frame manually to the library would be a solution

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