Git Product home page Git Product logo

Comments (10)

romandanylyk avatar romandanylyk commented on June 16, 2024

Hi, glad that you liked my library.
I probably understand which bug you are describing, I had it in java earlier, but it seems to be fixed now. Does it looks ok for you in common java code?

I believe that NativeScript is for cross platform, is that right? I didn't tested it on it, more over it wasn't designed for cross platforming. I think that it will require additional fixing after converting, so that I can't really help you with.

For fixing animations you can check if frame values are initialized well at the start, that probably why you get issues with drawing it. For the worm animation those values are: frameLeftX and frameRightX. They should firstly initialize in setFrameValues method after calling view constructor.

Hope it will help you,
thanks.

from pageindicatorview.

manijak avatar manijak commented on June 16, 2024

I didn't get a change to test it purely in java no. NativeScript is native-cross-platform ;) Each plugin we create can have a platform-specific part, that aims directly at android or ios libraries. So this "porting" that I'm doing is actually just a javascript-wrapper that calls the native functions, properties ect in the "PageIndicatorView" lib. https://www.nativescript.org/about

I will look more into it, and do some more testing. The hard part here is the debugging of these native libraries... These properties you mention, aren't available as public?

from pageindicatorview.

romandanylyk avatar romandanylyk commented on June 16, 2024

No those are private inside a PageIndicatorView. They are responsable for drawing each frame while animation is performing. So you just need to check if they are updating correctly for those animation, that has issues.
You can probably send me some videos or gifs and we can try to figure out what's wrong.

from pageindicatorview.

manijak avatar manijak commented on June 16, 2024

Ok, I created two .gifs, one for each animation that I have issues with.

Scale

https://dl.dropboxusercontent.com/u/33168380/scale_animation.gif

Worm

https://dl.dropboxusercontent.com/u/33168380/worm_animation.gif

from pageindicatorview.

romandanylyk avatar romandanylyk commented on June 16, 2024

Looks like I figured out what was the problem with worm animation and fixed it. I will appreciate if you will be able to check it from dev branch.
But I still can't reproduce issue that you have with scale animation. Maybe it is defect by porting library to native script. Can you please describe which parameters in scale animation do you use?

from pageindicatorview.

manijak avatar manijak commented on June 16, 2024

Thanks, I'll try it out.

The library is used as-is, no porting being done. NativeScript lets your write apps in JavaScript/TypeScript and XML (UI), but compiles and runs as native. Libraries used are left untouched.

Just to show you how we use native libraries, all we do is this:

var pageIndicatorView = new com.rd.PageIndicatorView(_context);
pageIndicatorView.setViewPager(_viewPager);
pageIndicatorView.setCount(_items.childrenCount);
pageIndicatorView.setAnimationType(com.rd.animation.AnimationType.SCALE);

That's it :)

from pageindicatorview.

romandanylyk avatar romandanylyk commented on June 16, 2024

Please see update in v0.0.7

from pageindicatorview.

manijak avatar manijak commented on June 16, 2024

I just updated to v0.0.7 and now the entire Indicator is gone, not visible at all.
If I revert back to v0.0.6 it works again, did not touch my own code.

Any special trick in order to get v0.0.7 working?

from pageindicatorview.

romandanylyk avatar romandanylyk commented on June 16, 2024

I have tried to use same parameters that you provided and still can't reproduce issue.
Can you please also provide layout.xml that you use?

The only reason PageIndicatorView could be invisible is that is has indicators count 0. Please make sure you set a right value.
Thanks.

from pageindicatorview.

manijak avatar manijak commented on June 16, 2024

I don't have a layout.xml since I'm using NativeScript...

I tried with and without setting the indicator count, still nothing. If I do a getCount() after the view is loaded, it returns the proper count (5 items). I can call all properties and methods, I get no exceptions, but still no indicator is shown.

from pageindicatorview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.