Comments (20)
@tarek360
Hi, I wanna share my progress and need your advices.
I added 'kotlin source set' in animator module and converted to Kotlin classes.
-
package name : >
/animator/src/main/kotlin/{richpathanimator}/AnimationBuilder.kt
I added 'richpathanimator' package. Because {com.richpathanimator} package cannot have duplicate classes.
What do you think I should do? -
AnimationBuilder
I did convert like this.
public AnimationBuilder durationSet(long duration) { richPathAnimator.duration(duration); return this; }
fun durationSet(duration: Long) = apply { richPathAnimator.duration = duration }
Like above, I convert 'AnimationBuilder return type' using apply inline function.
Then, I thought how about add 'build function' like this:
fun build(block: AnimationBuilder.() -> Unit) = apply(block)
Have a good day! :)
from richpath.
Hi :)
I'm happy to hear that :)
I don't think I have time to convert it to Kotlin, but I'll be more than happy to see a contribution on this.
In the meantime, do you have any compatibility problems with Kotlin?
from richpath.
Awesome!
As you see in the root project, RichPath has two modules:
- animator
- richpath
I would say you can start by the smaller one (you can break it down as you want)
Sure, you can check out a new branch from develop and create a PR when you think it's ready, so I can review it. Don't hesitate to ask any question if you found something not clear.
Thank you!
from richpath.
Sure, I'd be glad to.
from richpath.
Hi :)
Great progress 👍
You shouldn't have duplicate classes, You should remove any Java class you converted to Kotlin, or what duplicates you have?
Regarding the second point, please let me check later when I can open my laptop!
from richpath.
Hi @step4me sorry for the late reply,
Yes, if you already converted some classes don't hesitate to create a PR then we can discuss easily on it.
from richpath.
A new PR: #60
from richpath.
@tarek360
Thanks for your reply :)
I didn't have any compatibility issues.
I want to participate converting to Kotlin. That's why I just asked.
So, I wonder your opinion. How should I contribute to RichPath? Should I make a Kotlin branch?
from richpath.
@tarek360
Thanks for your kindness!
Then, where I write a kotlin code?
For example, I'm gonna create module like 'animator-kotlin' or 'richpath-kotlin'.
I wanna your opinion.
Have a good day!
from richpath.
we have /richpath/src/main/java
and /animator/src/main/java
so you need to create a new source directory for kotlin for each module like the following:
/richpath/src/main/kotlin
/animator/src/main/kotlin
from richpath.
@tarek360
Oh, I understand.
I'm gonna fork your repository, then start from animator.
Thank you.
from richpath.
@step4me Sounds a good idea, would you like some help?
from richpath.
@vipafattal
Thanks! I'm just about to start.
Do you wanna work together, by any chance?
from richpath.
@vipafattal
Good! :)
I'm gonna request PR in few days about some part of animator module.
After that, we would be better collaborate with.
What do you think about it?
from richpath.
Great idea! Ok.
from richpath.
@tarek360
Oh, I thought we have two source sets, java and kotlin. So the first one is resolved. I'm gonna remove java classes.
And, Is it better to discuss my work so far through PR with regard to the second point?
from richpath.
Hi, @tarek360 that's ok. I understand.
I created a PR minutes ago (#55).
I'm looking forward to your advice.
Thanks!
from richpath.
@tarek360
I saw PR #60. I appreciate your commits about #58, #59 and java/kotlin compatibility
.
I am going to convert java to kotlin in richpath module.
Also, I found out unexpected result.
icCommandRichPathView
dosen't repeat infinite. Do you have any ideas about it?
from richpath.
@step4me cool! go on 👍
I fixed it after many hours trying to find where is the problem :D
actually repeatMode
and repeatCount
were private properties but you didn't make them private in Kotlin and you called them by mistake instead of the methods.
https://github.com/tarek360/RichPath/pull/55/files#diff-2503c785024291f403b109b2ad1afd6aR57-R60
we should call:
animationBuilder.repeatMode(repeatMode)
animationBuilder.repeatCount(repeatCount)
instead of
animationBuilder.repeatMode = repeatMode
animationBuilder.repeatCount = repeatCount
from richpath.
@tarek360
Hi, I saw your last commit. I am sorry, it was my mistake.
I really appreciate your review and modifications.
I converted some classes java to kotlin in richpath module.
Please review and let me know for these changes on #60.
from richpath.
Related Issues (20)
- PathEffect HOT 1
- Path added using addPath not visible HOT 1
- please tarek could you add the zoom to the richpath HOT 1
- [FIXED] if the vector not exist in first time but after some seconds the app will crash.
- [FIXED] the click listener on RichPath would be specific if the offset=0 in PathUtils.class because if you zoom * 14 and click in path it will handle the click of next path.
- app crash when load map svg HOT 1
- android.content.res.Resources$NotFoundException: Can't find ColorStateList from drawable HOT 2
- Load Svg from String HOT 2
- crash on load :did not set the measured dimension by calling setMeasuredDimension() HOT 1
- Unresolved reference: richPathView Kotlin HOT 1
- Would it be possible to retrieve the paths coordinates within a view? HOT 1
- Crash on Android 4.1 and 4.4 - Binary XML file line #94: Error inflating class com.richpath.RichPathView HOT 2
- Detecting which group is clicked HOT 3
- Double/Long click path listener HOT 2
- Flow animation HOT 4
- Stop animation
- Can we set vector drawable from server and then access the path attribute?
- Non-SDK usage causing RichPathView.setVectorDrawable to throw an exception when targeting API Level 31 HOT 1
- Richpath and RichpathView code
- Working with large size SVG images
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from richpath.