Rodbjartson Rodbjartson - 1 year ago 95
Android Question

Adding features to my android project

I am new to android, and I started a project in android studio.
I found an interesting animation, which I would like to use, and perhaps edit in my project, it can be found here

Now I wonder, how can I use this? I find the description on github hard to understand, I know that AS uses gradle to build, but where in the gradle file should I add the compile? And should I download some additional java files? And should I change my xml files?

I tried searching SO for answers, but one of the most relevant answers was about downloading a jar file, but there is no jar file to download in this case!

Thanx in advance.

Answer Source

You should add the compile line to your module gradle (under the mobile app folder) dependency section, something like this (ordering of the dependencies doesn't matter)

dependencies {
    ... other stuff may be here
    compile 'pl.bclogic:pulsator4droid:1.0.3'

This will automatically download the java jar files required when you build.

Then where you want to use the pulsar control just add it to your activity xml file as specified in the projects readme under the usage section.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download