Page 1 of 1
How to use fragments of source code in Java
Posted: Mon Sep 10, 2012 8:08 pm
by 17063439
Hi,
We are using TeeChart Android Lib and I have the source code. According to your FAQ, We can integrate part of the source code into our application instead of the whole library. How can I do that? Is there any examples here? BTW, we currently only use the Pie Chart in our application.
Thanks,
Alex
Re: How to use fragments of source code in Java
Posted: Wed Sep 12, 2012 10:47 am
by narcis
Hi Alex,
Instead of referencing a compiled library you need to set a source code library reference in your project. We don't have a public demo available but that's how we work with the sources most of the time.
Re: How to use fragments of source code in Java
Posted: Wed Sep 12, 2012 3:03 pm
by 17063439
Hi NarcĂs,
Thanks for the reply. We will try to used library reference in stead of the apk file. Our main goal is to trim down the package size(it is over 1M). As I mentioned above, we only use the Pie Chart in our application. Could you provide some directions on how to trim the unnecessary code?
Thanks,
alex
Re: How to use fragments of source code in Java
Posted: Thu Sep 13, 2012 8:54 am
by yeray
Hi,
You can start removing the files in the "styles" folder that correspond to the classes you are not using. For the Pie series you only need Pie*.java, Circular.java, and some general classes like Series.java, SeriesCollection.java, SeriesMarks.java,...
And you can probably remove everything in the "functions" folder, "editors", "exports", "themes", "tools",...
To get the "as little as possible", I'd remove everything but Pie.java. And then, looking at the errors you get, I'd start adding the missing classes.
Re: How to use fragments of source code in Java
Posted: Thu Sep 13, 2012 9:53 pm
by 17063439
Thank you very much for the detailed instruction. Really appreciate it. I will do as you suggested.
Thanks,
Alex